Skip to main content

SDK for interacting with the Lord of the Rings API

Project description

The Lord Of The Rings SDK

A SDK built upon The One API (https://the-one-api.dev/) written in Python.

Installation

pip install dr-sdk-lotr==0.0.1

Usage

To use the SDK, get an Access Token from https://the-one-api.dev/sign-up. Once installed and the Access Token is obtained, you can start using the SDK by following the below:

Using the SDK

Book Data

from dr_sdk_lotr.books import Books

books = Books('YOUR_API_KEY')

# Lists of all "The Lord of the Rings" Books
books.get_books()

# Request one specific Lord of the Rings book by ID
books.get_book_by_id('5cf58077b53e011a64671583')

# Request all chapters of one specific book
books.get_book_by_id('5cf58077b53e011a64671583')

Character Data

from dr_sdk_lotr.chracters import Characters

characters = Characters('YOUR_API_KEY')

# Lists of all characters including metadata like name, gender, realm, race and more
characters.get_all_characters()

# Request one specific character by id
characters.get_character_by_id('5cd99d4bde30eff6ebccfbed')

# Request all movie quotes of one specific character
characters.get_quotes_by_character_id('5cd99d4bde30eff6ebccfbed')

# Get character details by name
characters.get_character_by_name('Gandalf')

Movie Data

from dr_sdk_lotr.movies import Movies

movies = Movies('YOUR_API_KEY')

# List of all movies including "The Lord of the Rings" and the "The Hobbit" trilogies
movies.get_movies()

# Request one specific movie by id
movies.get_movie_by_id('5cd95395de30eff6ebccde56')

# Request all movie quotes for one specific movie (only working for LOTR Trilogy)
movies.get_all_quotes_by_movie('5cd95395de30eff6ebccde5c')

Quote Data

from dr_sdk_lotr.quotes import Quotes

quotes = Quotes('YOUR_API_KEY')

#  List of all movie quotes
quotes.get_all_movie_quotes()

# Request one specific movie quote
quotes.get_movie_by_id("5cd96e05de30eff6ebccebce")

Chapter Data

from dr_sdk_lotr.chapters import Chapters

chapters = Chapters('YOUR_API_KEY')

# Lists of all book chapters
chapters.get_all_book_chapters()

# Request one specific book chapter
chapters.get_book_chapter_by_id('6091b6d6d58360f988133bc5')

# Get book chapter by name
chapters.get_book_chapter_by_name('A Long-expected Party')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dr-sdk-lotr-0.0.5.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

dr_sdk_lotr-0.0.5-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file dr-sdk-lotr-0.0.5.tar.gz.

File metadata

  • Download URL: dr-sdk-lotr-0.0.5.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for dr-sdk-lotr-0.0.5.tar.gz
Algorithm Hash digest
SHA256 2fec4e995d025546cd9940be781e4bbbe69e02d283a3b97d12b4a30da5c5bf1b
MD5 668f5dd2adce49baa733557a88dfcb54
BLAKE2b-256 03496a1dd50c28606873cf0592fce75695e248831c3a3b7ab1ccb5aa4d551042

See more details on using hashes here.

File details

Details for the file dr_sdk_lotr-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: dr_sdk_lotr-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for dr_sdk_lotr-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fbb21181794b2de30dca0a35206e9f43af6b395dceac3186a21ea18511c706fd
MD5 38678aa24246db0bf6a00752fe5fa047
BLAKE2b-256 c154841f43db2b20281ca4cc50eb2000124582e064bae0b6b8c0515bf87cadcb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page