All URIs are relative to https://localhost
Method | HTTP request | Description |
---|---|---|
login_post | POST /login | |
refresh_token_get | GET /refresh_token |
Token login_post(authentication_string)
Returns a session token to be included in the rest of the requests. Note that API key authentication is required for all subsequent requests and user auth is required for routes in the User
section
from __future__ import print_function
import time
import tvdb_api
from tvdb_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = tvdb_api.AuthenticationApi()
authentication_string = tvdb_api.Auth() # Auth | JSON string containing your authentication details.
try:
api_response = api_instance.login_post(authentication_string)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthenticationApi->login_post: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
authentication_string | Auth | JSON string containing your authentication details. |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Token refresh_token_get()
Refreshes your current, valid JWT token and returns a new token. Hit this route so that you do not have to post to /login
with your API key and credentials once you have already been authenticated.
from __future__ import print_function
import time
import tvdb_api
from tvdb_api.rest import ApiException
from pprint import pprint
# Configure API key authorization: jwtToken
configuration = tvdb_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = tvdb_api.AuthenticationApi(tvdb_api.ApiClient(configuration))
try:
api_response = api_instance.refresh_token_get()
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthenticationApi->refresh_token_get: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]