Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gswalden/oscars
Academy Award nominees and winners in JSON
https://github.com/gswalden/oscars
nodejs
Last synced: 8 days ago
JSON representation
Academy Award nominees and winners in JSON
- Host: GitHub
- URL: https://github.com/gswalden/oscars
- Owner: gswalden
- License: isc
- Created: 2017-02-26T19:10:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-02-27T05:21:35.000Z (over 7 years ago)
- Last Synced: 2024-04-24T08:16:24.513Z (7 months ago)
- Topics: nodejs
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/oscars
- Size: 18.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![npm version](https://badge.fury.io/js/oscars.svg)](https://badge.fury.io/js/oscars)
[![Build status](https://travis-ci.org/gswalden/oscars.svg?branch=master)](https://travis-ci.org/gswalden/oscars)
[![Dependencies](https://david-dm.org/gswalden/oscars.svg)](https://david-dm.org/gswalden/oscars)### 2017 results: `complete in v1.0.2`
### Use
```sh
npm install oscars
```
```js
const oscarNominations = require('oscars/2017');
console.log(oscarNominations);
```### Structure
This module exports an Object indexed by Oscar categories. Here is an example:
```json
{
"Actor in a Supporting Role": [
{
"film": "Moonlight",
"persons": [
"Mahershala Ali"
],
"winner": true
},
{
"film": "Hell or High Water",
"persons": [
"Jeff Bridges"
],
"winner": false
},
{
"film": "Manchester by the Sea",
"persons": [
"Lucas Hedges"
],
"winner": false
},
{
"film": "Lion",
"persons": [
"Dev Patel"
],
"winner": false
},
{
"film": "Nocturnal Animals",
"persons": [
"Michael Shannon"
],
"winner": false
}
]
}
```If the `winner` property is `null`, no winner has been announced. If it is `true` or `false`, a winner has been announced and an item should have `winner: true`. See [below](#useful-operations) for an easy way to find the winner.
### Useful operations
Using the [lodash](//lodash.com) library, you can easily search/filter/transform this data set.```js
const _ = require('lodash');
const oscars2017 = require('oscars/2017');// Get an Array of all categories
const categories = _.map(oscars2017, (nominees, category) => {
return { category, nominees };
});
/* [
{
category: 'Best Picture',
nominees: [ … ]
},
…
] */// Find the winner of Best Picture
const bestPicture = _.find(oscars2017['Best Picture'], 'winner');
/* { film: '…', persons: [ … ] } */
```### Sources
Much of the data was sourced from [ordinaryzelig/oscars-madness](https://github.com/ordinaryzelig/oscars-madness), which originally pulled from the official [Oscars](http://oscar.go.com/) site.