avis_client.MembershipApi
All URIs are relative to http://localhost:8000
| Method | HTTP request | Description |
|---|---|---|
| membership_create | POST /api/membership/ | |
| membership_destroy | DELETE /api/membership/{id}/ | |
| membership_list | GET /api/membership/ | |
| membership_retrieve | GET /api/membership/{id}/ | |
| membership_update | PUT /api/membership/{id}/ |
membership_create
Membership membership_create(membership_request)
A base read-only viewset that enables optimized queryset fetching and tracing. This is a combination of the following mixins: * OptimizedQuerySetMixin (from drf_jsonmask): allows the client to specify which fields to return by exposing a fields query parameter. If this parameter is not specified, all fields are returned. If it is specified, only the specified fields are returned and the other fields are not fetched from the database. * TracedModelViewSetMixin (from vue_instrumentation): adds tracing to the viewset's methods. * ListModelMixin, RetrieveModelMixin (from django-rest-framework): adds a list and retrieve method to the viewset making it read-only.
Example
- Api Key Authentication (cookieAuth):
- Api Key Authentication (ApiKeyAuth):
import time
import os
import avis_client
from avis_client.models.membership import Membership
from avis_client.models.membership_request import MembershipRequest
from avis_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = avis_client.Configuration(
host = "http://localhost:8000"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with avis_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = avis_client.MembershipApi(api_client)
membership_request = avis_client.MembershipRequest() # MembershipRequest |
try:
api_response = api_instance.membership_create(membership_request)
print("The response of MembershipApi->membership_create:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MembershipApi->membership_create: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| membership_request | MembershipRequest |
Return type
Authorization
HTTP request headers
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 201 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
membership_destroy
membership_destroy(id)
A base read-only viewset that enables optimized queryset fetching and tracing. This is a combination of the following mixins: * OptimizedQuerySetMixin (from drf_jsonmask): allows the client to specify which fields to return by exposing a fields query parameter. If this parameter is not specified, all fields are returned. If it is specified, only the specified fields are returned and the other fields are not fetched from the database. * TracedModelViewSetMixin (from vue_instrumentation): adds tracing to the viewset's methods. * ListModelMixin, RetrieveModelMixin (from django-rest-framework): adds a list and retrieve method to the viewset making it read-only.
Example
- Api Key Authentication (cookieAuth):
- Api Key Authentication (ApiKeyAuth):
import time
import os
import avis_client
from avis_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = avis_client.Configuration(
host = "http://localhost:8000"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with avis_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = avis_client.MembershipApi(api_client)
id = 56 # int | A unique integer value identifying this membership.
try:
api_instance.membership_destroy(id)
except Exception as e:
print("Exception when calling MembershipApi->membership_destroy: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | A unique integer value identifying this membership. |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 204 | No response body | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
membership_list
PaginatedMembershipList membership_list(page=page, page_size=page_size)
A base read-only viewset that enables optimized queryset fetching and tracing. This is a combination of the following mixins: * OptimizedQuerySetMixin (from drf_jsonmask): allows the client to specify which fields to return by exposing a fields query parameter. If this parameter is not specified, all fields are returned. If it is specified, only the specified fields are returned and the other fields are not fetched from the database. * TracedModelViewSetMixin (from vue_instrumentation): adds tracing to the viewset's methods. * ListModelMixin, RetrieveModelMixin (from django-rest-framework): adds a list and retrieve method to the viewset making it read-only.
Example
- Api Key Authentication (cookieAuth):
- Api Key Authentication (ApiKeyAuth):
import time
import os
import avis_client
from avis_client.models.paginated_membership_list import PaginatedMembershipList
from avis_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = avis_client.Configuration(
host = "http://localhost:8000"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with avis_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = avis_client.MembershipApi(api_client)
page = 56 # int | A page number within the paginated result set. (optional)
page_size = 56 # int | Number of results to return per page. (optional)
try:
api_response = api_instance.membership_list(page=page, page_size=page_size)
print("The response of MembershipApi->membership_list:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MembershipApi->membership_list: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| page | int | A page number within the paginated result set. | [optional] |
| page_size | int | Number of results to return per page. | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
membership_retrieve
Membership membership_retrieve(id)
A base read-only viewset that enables optimized queryset fetching and tracing. This is a combination of the following mixins: * OptimizedQuerySetMixin (from drf_jsonmask): allows the client to specify which fields to return by exposing a fields query parameter. If this parameter is not specified, all fields are returned. If it is specified, only the specified fields are returned and the other fields are not fetched from the database. * TracedModelViewSetMixin (from vue_instrumentation): adds tracing to the viewset's methods. * ListModelMixin, RetrieveModelMixin (from django-rest-framework): adds a list and retrieve method to the viewset making it read-only.
Example
- Api Key Authentication (cookieAuth):
- Api Key Authentication (ApiKeyAuth):
import time
import os
import avis_client
from avis_client.models.membership import Membership
from avis_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = avis_client.Configuration(
host = "http://localhost:8000"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with avis_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = avis_client.MembershipApi(api_client)
id = 56 # int | A unique integer value identifying this membership.
try:
api_response = api_instance.membership_retrieve(id)
print("The response of MembershipApi->membership_retrieve:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MembershipApi->membership_retrieve: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | A unique integer value identifying this membership. |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
membership_update
Membership membership_update(id, membership_request)
A base read-only viewset that enables optimized queryset fetching and tracing. This is a combination of the following mixins: * OptimizedQuerySetMixin (from drf_jsonmask): allows the client to specify which fields to return by exposing a fields query parameter. If this parameter is not specified, all fields are returned. If it is specified, only the specified fields are returned and the other fields are not fetched from the database. * TracedModelViewSetMixin (from vue_instrumentation): adds tracing to the viewset's methods. * ListModelMixin, RetrieveModelMixin (from django-rest-framework): adds a list and retrieve method to the viewset making it read-only.
Example
- Api Key Authentication (cookieAuth):
- Api Key Authentication (ApiKeyAuth):
import time
import os
import avis_client
from avis_client.models.membership import Membership
from avis_client.models.membership_request import MembershipRequest
from avis_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = avis_client.Configuration(
host = "http://localhost:8000"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with avis_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = avis_client.MembershipApi(api_client)
id = 56 # int | A unique integer value identifying this membership.
membership_request = avis_client.MembershipRequest() # MembershipRequest |
try:
api_response = api_instance.membership_update(id, membership_request)
print("The response of MembershipApi->membership_update:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MembershipApi->membership_update: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | A unique integer value identifying this membership. | |
| membership_request | MembershipRequest |
Return type
Authorization
HTTP request headers
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]