SDK for the Lord of the Rings API
Project description
Lord of the Rings SDK
The Lord of the Rings SDK provides a convenient way to access the Lord of the Rings API endpoints for movies and quotes. This SDK allows developers to retrieve information about movies and quotes from the Lord of the Rings series.
Installation
You can install the Lord of the Rings SDK using pip
. Open a terminal and run the following command:
pip install lord-of-the-rings-sdk
Usage
To use the Lord of the Rings SDK in your Python project, follow these steps:
- Import the necessary classes from the SDK:
from lord_of_the_rings_sdk import LordOfTheRingsSDK
- Initialize the LordOfTheRingsSDK class with your API key:
api_key = 'your-api-key'
sdk = LordOfTheRingsSDK(api_key)
- Use the
movie
andquote
methods of the SDK to access the respective endpoints:
# Get a list of movies
movies = sdk.movie().by_list()
# Get movie by ID
movie_id = '5cd95395de30eff6ebccde56'
movie = sdk.movie().by_id(movie_id)
# Get quotes by random
quotes = sdk.quote().by_random()
# Get quote by ID
quote_id = '5cd95395de30eff6ebccde56'
quote = sdk.quote().by_id(quote_id)
Testing
The Lord of the Rings SDK includes a set of unit tests to ensure its functionality. To run the tests, follow these steps:
- Install the testing dependencies by running the following command in your terminal:
pip install -r requirements.txt
- Run the tests using the following command:
python -m unittest test_lord_of_the_rings_sdk.py
The test suite will execute and display the results in the terminal.
Feel free to modify and extend the SDK according to your specific use cases and requirements.
If you encounter any issues or have questions, please contact the SDK maintainers.
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
Built Distribution
Hashes for lord-of-the-rings-sdk-seanmavley-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1e7f45122d2221211aee9172db3b7aa77d8dd9d37dbfb48756745f1bfdba7f7 |
|
MD5 | 111d68c553022303702a99c9e32698dd |
|
BLAKE2b-256 | b5d26b8fe79943f09974a9f464e1170a007179593c9a8d42feaf27fc8f07fe08 |
Hashes for lord_of_the_rings_sdk_seanmavley-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1325eedc9eedd11a066e1dad63ff1f2c5e9c0232ba03b8e67d9fbe259306be58 |
|
MD5 | 33453373884cbd4cd3a43af0acfcd672 |
|
BLAKE2b-256 | a871ad30d352e666c3376b40d95cdf1295ab9ebf5a4285017463b9e502581640 |