Skip to main content

No project description provided

Project description

Lord of ring SDK

Installation

pip install lord_of_rings_sdk

Import

The Client object is the cornerstone of the Lord of the Rings API SDK. Use it to make calls to the API endpoints and retrieve the corresponding data.

from lord_rings_sdk import Client
client = Client(version="v2", env="dev")

Methods

  • movie.get This method is used to retrieve a list of all the movies available.
    client.movie.get()
    client.movie.get(movie_id)
    
  • movie.get_quote This method is used to retrieve all the quotes from a specific movie. Note that this method only works for the Lord of the Rings trilogy. You can specify the movie's ID using the id parameter.
    client.movie.get_quote(id=movie_id)
    

Parameters

The SDK methods support parameters to include in the query. They allow pagination, sorting and filtering by marching values.

client.movie.get(
    parameters=Parameters(
        pagination=PaginationOptions(limit=1, page=1, offset=0),
        sorting=SortingOptions(direction="desc", parameter="name"),
        filtering=FilteringOptions(
            matches={Match(parameter="runtimeInMinutes", value="462")}
        ),
    )
)

Test

In order to try the SDK follow the next steps:

  • Install the SDK
  • Import the SDK
  • Sign up in the API https://the-one-api.dev/
  • Login in the API https://the-one-api.dev/
  • Get the access token
  • Export the access token in the LORD_RINGS_TOKEN env variable or set the headers argument when calling the methods with the Authorization header.
  • Try SDK methods

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

lord_rings_sdk-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lord_rings_sdk-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file lord_rings_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: lord_rings_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.11 Linux/5.15.0-60-generic

File hashes

Hashes for lord_rings_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 40a565ee9a41d9cea13bb340cc6420e0b6e8b92f0bf44bced9d32c894466e696
MD5 2700113709fed6d1076e312d2bc87184
BLAKE2b-256 ce011879dbaa7fe9fd2058bb73904fb2fe8f5bd5e1c8afcc8454193b6fd39fa4

See more details on using hashes here.

File details

Details for the file lord_rings_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lord_rings_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.11 Linux/5.15.0-60-generic

File hashes

Hashes for lord_rings_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cebb57d5da164aadc862ce43723c64076b5e0b944cdac7dfa83431009b4865b7
MD5 bb0179c3d258c31a6b02294a1d841ff5
BLAKE2b-256 2795d48caf3075b6a7b0f52c72e5cf7fc5001b4c1f33446459eba4cb8bf1cb6d

See more details on using hashes here.

Supported by

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