Skip to main content

LOTR coding test

Project description

Cast it into the fire!

Run pip3 install lotronexyz12_sdk

Import the SDK from lotronexyz12_sdk import LOTR_SDK

Examples

client = LOTR_SDK()

# query the movie endpoint
movie_endpoint = client.endpoint('movie')
# Fetch all movies
movies = movie_endpoint.fetch_all()
# Fetch all movies with OPTIONS
# limit -> int
# page -> int
# offset -> int
# sort -> str. 
    Sort by movie name -> "name:asc" or "name:desc"

# filter -> str
    - Less than, greater than or equal to.
    - Keys:  academyAwardWins, runtimeInMinutes, and budgetInMillions.
    - Example value: academyAwardWins>10&runtimeInMinutes>=160

movies = endpoint.fetch_all(
    options={
        'limit' : 5,
        #'page' : 2,
        #'offset' : 3,
        'sort' : 'name:asc',
    }, 
    filter = 'academyAwardWins>10&runtimeInMinutes>=160'
)
# Fetch a single movie
movies = endpoint.fetch_one(
    '5cd95395de30eff6ebccde5d',     # movie _id
    with_quotes=True,               # return quotes from movie, default is False
    
    options = {                     # Options similar to fetch_all
        'sort' : 'character:desc',  # Sort by movie name or character if with_quotes=True
        'limit' : 5
    }
)

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

lotronexyz12_sdk-0.1.3.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

lotronexyz12_sdk-0.1.3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file lotronexyz12_sdk-0.1.3.tar.gz.

File metadata

  • Download URL: lotronexyz12_sdk-0.1.3.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for lotronexyz12_sdk-0.1.3.tar.gz
Algorithm Hash digest
SHA256 0222099bf5d504fe6a18a6d7ad439c0fe337c14a4f0211b22123e5b8ca37af07
MD5 73b1a29b04fd02168eba2854e715ed0c
BLAKE2b-256 4479cc323650c2046302e78a559c8d2ed0c08d1acf0f653594a4f5e0d358f08d

See more details on using hashes here.

File details

Details for the file lotronexyz12_sdk-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for lotronexyz12_sdk-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 820f6448d43ec895e4e0f1a5756888d344f45dc3e24b0b753bcabe69c8703c09
MD5 33dcb1118daa5dd0594f52af8415099a
BLAKE2b-256 9c70387c8487f4e4e575ecfd93b09781409b6bb04f6229ed68272cdbc9738706

See more details on using hashes here.

Supported by

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