Skip to content

iamlordaubrey/chiemeka_alim-SDK

Repository files navigation

Lord Of The Rings SDK

Description: An SDK that makes it easy for developers to consume information about the Lord of The Rings trilogy.

SDK builds on an existing Lord of The Rings API

Tech Stack

Built using Python 3.10.5 (see .python-version file). External libraries are kept as minimal as possible (see requirements.in file)

Installation

pip install lord-aubrey-of-the-rings

Run

Register and login here to get your access token.

Import the class LordOfTheRings and call the available methods, passing params where necessary. Example:

from lord_of_the_rings.endpoints import LordOfTheRings

client = LordOfTheRings(access_token='your_access_token')

client.get_books()
client.get_movies('5cd95395de30eff6ebccde5b')
client.get_characters('5cd99d4bde30eff6ebccfe2e', 'quote')

There are also the options of

Pagination:

client.get_characters(limit=2)
client.get_characters(page=3)
client.get_characters(offset=11)

Sorting:

client.get_books(sort='name:asc')
client.get_quotes(sort='dialog:desc')

and Filtering:

client.get_characters(name='Gandalf')
client.get_characters(race='Hobbit,Human')

Consult the API docs for more information

Exposed methods:

METHOD          : PARAMETER(S)
get_books       : identifier (optional), 'chapter' (optional, requires identifier)
get_movies      : identifier (optional), 'quote' (optional, requires identifier)
get_characters  : identifier (optional), 'quote' (optional, requires identifier)
get_quotes      : identifier (optional)
get_chapters    : identifier (optional)

Install (to run SDK locally)

Clone github repo and run the following code. It creates a fresh virtual environment (called .venv) and installs requirements

make setup

Install pip requirements / Sync requirements.in with requirements.txt

make pip_sync

Run tests

make runtest

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published