Crate letterboxd [−] [src]
This module wraps the Letterboxd API which provides easy and flexible access to data on the Letterboxd.com website.
Client's API follows the following rules:
- All Letterboxd API calls are asynchronous.
- Each method takes an optional argument
token
, which enabled authentication for the call. - Except for GET calls all methods include a path parameter.
Further, most of Client's methods take a request struct, which is then serialized to url encoded parameters and return a response type, which is deserialized from JSON. However, some methods omit the request or/and the response struct.
Entities are identified in the API by Letterboxd ID (or LID), an alpha-numeric string value that is returned where appropriate. For films, lists and reviews, the LID can also be found through the Letterboxd website as the path portion of the entity’s shareable boxd.it link.
For more information, cf. API docs at http://api-docs.letterboxd.com
Example
let mut core = Core::new().unwrap(); let client = letterboxd::Client::new(&core.handle(), api_key, api_secret); let get_token = client.auth(&USERNAME, &PASSWORD); let mut req = letterboxd::FilmRelationshipUpdateRequest::default(); req.watched = Some(true); let do_update = |token| { client.update_film_relationship("2a9q", &req, &token); // Fight Club }; // execute on core, e.g. with: // core.run(get_token.and_then(do_update).and_then(|response| { ... })).unwrap();
Macros
DELETE | |
GET | |
PATCH | |
POST |
Structs
Enums
Type Definitions
Cursor |
A cursor is a String value provided by the API. It should be treated as an opaque value — don’t change it. |