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
Built Distribution
File details
Details for the file lotronexyz12_sdk-0.1.1.tar.gz
.
File metadata
- Download URL: lotronexyz12_sdk-0.1.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b25532ccffc042ef147ecab1edd7c34455dd4efae8e2c1d9263e4f53322f3a58 |
|
MD5 | e9a1ca92f66a45ef783313c1b4a9ed5a |
|
BLAKE2b-256 | 8c9e065bfebca9ebced9ab63cdcee6372ac6f88f9271bc23499b037aac8b6594 |
File details
Details for the file lotronexyz12_sdk-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: lotronexyz12_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f6edadf0e79bfc9c9dece9e76d4ab23521e785bca3065524f2ded1279c46f49 |
|
MD5 | 0da252ae4c54cf3a83e068aa7a22d26a |
|
BLAKE2b-256 | d11c03b7ac1a509426d5ed46edfa25b4d6dfb949073bcba22b21d38546eae593 |