Catalog PyPI
PACKAGE EXPLORERView in registry

AaronBlaser-SDK

PyPI

SDK for the lord of the rings API

Versions collected1
Direct dependencies5From release 1.0.1
Last observed20 Oct, 17:02 UTC

README

Version 1.0.1 documentation

LordOfTheRings SDK

Installation

pip install AaronBlaser-SDK==1.0.1

Usage

  1. Import the LordOfTheRings class
from lordoftherings import LordOfTheRings
  1. Initialize the class with your API Token
api = LordOfTheRings('YOUR API TOKEN')
  1. Make calls to the API
  • /movie
all_movies = api.movies().get_all().fetch()
  • /movie/{id}
movie = api.movies("5cd95395de30eff6ebccde56").get()
  • /movie/{id}/quote
movie_quotes = api.movies("5cd95395de30eff6ebccde5b").quotes.get_all().fetch()
  • /quote
quotes = api.quotes().get_all().fetch()
  • /quote/{id}
single_quote = api.quotes("5cd96e05de30eff6ebccebc9").get()
  1. Make calls using sorting, filtering, and pagination
  • Filtering
match = api.movies().get_all().filter_by(name='The Lord of the Rings Series').fetch() 
negate_match = api.movies().get_all().filter_by(name=('not', 'The Lord of the Rings Series')).fetch() 
include = api.movies().get_all().filter_by(name=['The Lord of the Rings Series', 'The Desolation of Smaug']).fetch()
exclude = api.movies().get_all().filter_by(name=[('not', 'The Lord of the Rings Series'), ('not', 'The Desolation of Smaug')]).fetch()
less_than = api.movies().get_all().filter_by(budgetInMillions=('<', 100)).fetch() 
greater_than = api.movies().get_all().filter_by(runtimeInMinutes=('>', 160)).fetch()
  • Sorting
sorted_movies = api.movies().get_all().sort_by("name:asc").fetch()
  • Pagination
paged_movies_1 = api.movies().get_all().limit(2).fetch()
paged_movies_2 = api.movies().get_all().limit(3).page(2).fetch()
paged_movies_3 = api.movies().get_all().limit(1).page(1).offset(1).fetch()
  • Combine all Three
filter_sorted_paged = api.movies().get_all().limit(5).filter_by(name=('not', 'The Lord of the Rings Series')).sort_by('name:asc').fetch()

Testing

  1. Unit Tests

There is a file called test_lordoftherings.py in the tests folder that has some unit tests in it. Run this file to run the tests

  • Replace with your token
    self.auth_token = 'YOUR API TOKEN'
    
  1. Example Usage File

There is a file called test_usage.py in the tests that has many examples of how you can use this SDK. Add your auth token and uncomment the examples you want to run, then run the file.

  • Replace with your token
    api = LordOfTheRings('YOUR API TOKEN')
    

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.15 Jun 20235

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
ablaser5/aaronblaser-sdk

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:02 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:181ee5b41e70cd44d53556ed92556944bd89b659d83efb84674eb48c1b6e7369