thetvdb v1.0.0-alpha.5 TheTVDB
This module provides access to TheTVDB API.
Authentication
This module supports multiple ways to authenticate with TheTVDB API.
If only interested in globally-scoped endpoints (such as fetching
series/episode information), Authenticating via TheTVDB.authenticate/1
is all that’s required.
Token refreshes are handled automatically by the library.
User Authentication
This module supports multi-user authentication. All functions in TheTVDB.User
support an optional username. If the username is omitted, the last
authenticated user will be used.
It is recommended that if multiple users have been authenticated, the username should be specified.
TheTVDB.authenticate(api_key, "johnDoe", acct_id)
# => :ok
# Fetch user authentication for johnDoe
TheTVDB.User.info()
# => {:ok, %TheTVDB.User{user_name: "johnDoe", ...}}
TheTVDB.authenticate(api_key, "jamesDean", acct_id)
# => :ok
# Fetch user authentication for jamesDean
TheTVDB.User.info("jamesDean")
# => {:ok, %TheTVDB.User{user_name: "jamesDean", ...}}
Summary
Functions
Authenticate with TheTVDB API. This will provide access to globally scoped endpoints
Authenticate with TheTVDB API. This will provide access to both globally and user scoped endpoints
Functions
Authenticate with TheTVDB API. This will provide access to globally scoped endpoints.
authenticate(binary, String.t, binary) :: :ok | {:error, TheTVDB.NotAuthenticatedError.t}
Authenticate with TheTVDB API. This will provide access to both globally and user scoped endpoints.
Note: user_key
corresponds to the “Account Identifier” under the
user account page.
See authenticate/1
.
See authenticate/3
.