Accesses The One API
Project description
Daniel Cavazos SDK
The daniel-cavazos-sdk
package provides a Python client library for interacting with The One API. This library provides a convenient TheOneClient
class that provides methods for interacting with The One API.
Installation
You can install the daniel-cavazos-sdk
package using pip
:
pip install daniel-cavazos-sdk
Usage
First, import the TheOneClient
class from the daniel_cavazos_sdk
module:
from daniel_cavazos_sdk.client import TheOneClient
Then, create an instance of the TheOneClient
class with your API token:
client = TheOneClient(token="your-api-token")
Now, you can use the various methods available in the TheOneClient
class to interact with TheOneAPI:
# get all movies
all_movies = client.get_movies()
# get a specific movie by ID
movie = client.get_movie(id="123")
# get all quotes for a specific movie by ID
movie_quotes = client.get_movie_quotes(id="123")
# get all quotes
all_quotes = client.get_quotes()
# get a specific quote by ID
quote = client.get_quote(id="123")
Each method returns the parsed JSON response from the API. If the response has a non-2xx status code, a requests.exceptions.HTTPError
is raised.
Contributing
If you find any bugs or issues with this package, please report them on the GitHub Issues page.
If you would like to contribute to the development of this package, please fork the repository and submit a pull request with your changes.
License
This package is distributed under the MIT License. See the LICENSE
file for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file daniel-cavazos-sdk-0.1.0.tar.gz
.
File metadata
- Download URL: daniel-cavazos-sdk-0.1.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f9d8238af56758d74f7ee4544abd25f97e13f90d3b501c52fa77f2f58ec59df |
|
MD5 | eacfce55b8745cdb66d6c40898ca8799 |
|
BLAKE2b-256 | b7755a761904ae1eb4dead572d1b815a010de25bb3bc33944cad7dd2a2dafea3 |