Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zoetrope69/letterboxd
:movie_camera::clapper: get public diary data for letterboxd users
https://github.com/zoetrope69/letterboxd
films letterboxd rss
Last synced: 1 day ago
JSON representation
:movie_camera::clapper: get public diary data for letterboxd users
- Host: GitHub
- URL: https://github.com/zoetrope69/letterboxd
- Owner: zoetrope69
- Created: 2016-06-19T01:02:29.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-09-11T08:40:15.000Z (4 months ago)
- Last Synced: 2024-09-18T14:13:33.273Z (4 months ago)
- Topics: films, letterboxd, rss
- Language: JavaScript
- Homepage:
- Size: 700 KB
- Stars: 48
- Watchers: 1
- Forks: 9
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# letterboxd
[![npm](https://img.shields.io/npm/v/letterboxd.svg)](https://www.npmjs.com/package/letterboxd)
get public data for letterboxd users
_currently only consumes the RSS feeds from letterboxd, when API is released this will be used_
## installation
```bash
npm install letterboxd --save
```## usage
### function(username, [callback])
Returns a promise if no callback is provided.
```javascript
import letterboxd from "letterboxd";letterboxd("rubencordeiro")
.then((items) => console.log(items))
.catch((error) => console.log(error));
```#### output
output is an array of items.
there are two types of items: diary entries and lists.
**due to the limitation of the data source (scraping a RSS feed), only the 20 most recent diary entries are returned**
items of note for the list type:
- `ranked`: shows if it was set to ranked (1, 2, 3, 4).
- `films`: films in the list, capped at 10
- `totalFilms`: the total amount of films in the list, only 10 films are given here.```javascript
[
{
type: "diary",
film: {
title: "Zootopia",
year: "2016",
image: { tiny: "...", small: "...", medium: "...", large: "..." },
},
rating: { text: "★★★★", score: 4 },
review: "proper cute, funny and interesting through out. ...",
spoilers: false,
isRewatch: false,
date: { watched: 1463702400000, published: 1463784779000 },
uri: "https://letterboxd.com/zoetrope69/film/zootopia/",
},
//...
{
type: "list",
date: {
published: 1473470608000,
},
title: "All The Toy Stories",
description: "I fucking love these films lol",
ranked: false,
films: [
{ title: "Toy Story", uri: "https://letterboxd.com/film/toy-story/" },
{ title: "Toy Story 2", uri: "https://letterboxd.com/film/toy-story-2/" },
{ title: "Toy Story 3", uri: "https://letterboxd.com/film/toy-story-3/" },
{
title: "Toy Story That Time Forgot",
uri: "https://letterboxd.com/film/toy-story-that-time-forgot/",
},
{
title: "Toy Story of Terror!",
uri: "https://letterboxd.com/film/toy-story-of-terror/",
},
],
totalFilms: 56,
uri: "https://letterboxd.com/zoetrope69/list/tiff-2016/",
},
//...
];
```