Skip to content

Instantly share code, notes, and snippets.

@EdwinGuzman
Last active October 12, 2017 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EdwinGuzman/505d2dcd2c5696c634b263c5e9b23f3a to your computer and use it in GitHub Desktop.
Save EdwinGuzman/505d2dcd2c5696c634b263c5e9b23f3a to your computer and use it in GitHub Desktop.
var endpoint = 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-lists?filter[list-type]=monthly&fields[staff-pick-tag]=tag&fields[staff-pick-age]=age&fields[staff-pick-item]=title,author,catalog-slug,image-slug,tags,ebook-uri&page[size]=1&include=previous-list,next-list,picks.item.tags,picks.age';
var filters = [ { type: 'staff-pick-tag',
id: 'action-packed',
attributes: { tag: 'Action-packed' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/action-packed' } },
{ type: 'staff-pick-tag',
id: 'adventure',
attributes: { tag: 'Adventure' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/adventure' } },
{ type: 'staff-pick-tag',
id: 'animals',
attributes: { tag: 'Animals' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/animals' } },
{ type: 'staff-pick-tag',
id: 'atmospheric',
attributes: { tag: 'Atmospheric' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/atmospheric' } },
{ type: 'staff-pick-tag',
id: 'biographies-memoirs',
attributes: { tag: 'Biographies & memoirs' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/biographies-memoirs' } },
{ type: 'staff-pick-tag',
id: 'character-driven',
attributes: { tag: 'Character-driven' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/character-driven' } },
{ type: 'staff-pick-tag',
id: 'comics-graphic-novels',
attributes: { tag: 'Comics & graphic novels' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/comics-graphic-novels' } },
{ type: 'staff-pick-tag',
id: 'compelling',
attributes: { tag: 'Compelling' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/compelling' } },
{ type: 'staff-pick-tag',
id: 'culturally-diverse',
attributes: { tag: 'Culturally diverse' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/culturally-diverse' } },
{ type: 'staff-pick-tag',
id: 'dystopian',
attributes: { tag: 'Dystopian' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/dystopian' } },
{ type: 'staff-pick-tag',
id: 'easy-readers',
attributes: { tag: 'Easy readers' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/easy-readers' } },
{ type: 'staff-pick-tag',
id: 'essays-short-stories',
attributes: { tag: 'Essays & short stories' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/essays-short-stories' } },
{ type: 'staff-pick-tag',
id: 'family',
attributes: { tag: 'Family' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/family' } },
{ type: 'staff-pick-tag',
id: 'fantasy',
attributes: { tag: 'Fantasy' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/fantasy' } },
{ type: 'staff-pick-tag',
id: 'fantasy-science-fiction',
attributes: { tag: 'Fantasy & science fiction' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/fantasy-science-fiction' } },
{ type: 'staff-pick-tag',
id: 'fast-paced',
attributes: { tag: 'Fast-paced' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/fast-paced' } },
{ type: 'staff-pick-tag',
id: 'friendship',
attributes: { tag: 'Friendship' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/friendship' } },
{ type: 'staff-pick-tag',
id: 'funny',
attributes: { tag: 'Funny' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/funny' } },
{ type: 'staff-pick-tag',
id: 'graphic-novels',
attributes: { tag: 'Graphic novels' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/graphic-novels' } },
{ type: 'staff-pick-tag',
id: 'gritty',
attributes: { tag: 'Gritty' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/gritty' } },
{ type: 'staff-pick-tag',
id: 'haunting',
attributes: { tag: 'Haunting' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/haunting' } },
{ type: 'staff-pick-tag',
id: 'historical',
attributes: { tag: 'Historical' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/historical' } },
{ type: 'staff-pick-tag',
id: 'interactive',
attributes: { tag: 'Interactive' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/interactive' } },
{ type: 'staff-pick-tag',
id: 'love-stories',
attributes: { tag: 'Love stories' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/love-stories' } },
{ type: 'staff-pick-tag',
id: 'middle-grade',
attributes: { tag: 'Middle-grade' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/middle-grade' } },
{ type: 'staff-pick-tag',
id: 'moving',
attributes: { tag: 'Moving' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/moving' } },
{ type: 'staff-pick-tag',
id: 'multicultural',
attributes: { tag: 'Multicultural' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/multicultural' } },
{ type: 'staff-pick-tag',
id: 'multiple-perspectives',
attributes: { tag: 'Multiple perspectives' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/multiple-perspectives' } },
{ type: 'staff-pick-tag',
id: 'mysteries',
attributes: { tag: 'Mysteries' },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-tags/mysteries' } },
];
var currentMonth = {
type: 'staff-pick-list',
id: 'monthly-2017-09-01',
attributes:
{ 'list-date': '2017-09-01',
'list-type': 'monthly',
features: null,
'next-list': null },
relationships:
{ picks: { data: [Object], links: [Object] },
'previous-list': { data: [Object], links: [Object] } },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-lists/monthly-2017-09-01' },
picks:
[ { type: 'staff-pick',
id: 'a773a68178d943f6d4558f65756ac009',
attributes: [Object],
relationships: [Object],
links: [Object],
item: [Object],
age: [Object] },
{ type: 'staff-pick',
id: 'efa31c997203d6401558acb59679229d',
attributes: [Object],
relationships: [Object],
links: [Object],
item: [Object],
age: [Object] },
{ type: 'staff-pick',
id: 'dc6111510d87933698aa7ab0a4652f03',
attributes: [Object],
relationships: [Object],
links: [Object],
item: [Object],
age: [Object] },
{ type: 'staff-pick',
id: 'eec5791b4e45c8bc43fdb9198aa31af3',
attributes: [Object],
relationships: [Object],
links: [Object],
item: [Object],
age: [Object] },
{ type: 'staff-pick',
id: '3bc4963f69cb4b2ce1f0ecb7c6d3be2b',
attributes: [Object],
relationships: [Object],
links: [Object],
item: [Object],
age: [Object] },
{ type: 'staff-pick',
id: '532c217fa23b0a55de93f1eb7c7b78d4',
attributes: [Object],
relationships: [Object],
links: [Object],
item: [Object],
age: [Object] },
{ type: 'staff-pick',
id: 'a24fb7166acbbecd77aee7d25a318509',
attributes: [Object],
relationships: [Object],
links: [Object],
item: [Object],
age: [Object] },
{ type: 'staff-pick',
id: 'e9e1e8adb6900bdeee25deeda9874fcb',
attributes: [Object],
relationships: [Object],
links: [Object],
item: [Object],
age: [Object] },
{ type: 'staff-pick',
id: '44268c1a6691103564255420ae0fde72',
attributes: [Object],
relationships: [Object],
links: [Object],
item: [Object],
age: [Object] },
{ type: 'staff-pick',
id: 'a43ab415be03965a74d09c107c147fd0',
attributes: [Object],
relationships: [Object],
links: [Object],
item: [Object],
age: [Object] },
{ type: 'staff-pick',
id: '737fbaf5d5ccac36990473e04dc4f018',
attributes: [Object],
relationships: [Object],
links: [Object],
item: [Object],
age: [Object] },
{ type: 'staff-pick',
id: '0af6ed15c0baa45a1b0eb2c2e81a999b',
attributes: [Object],
relationships: [Object],
links: [Object],
item: [Object],
age: [Object] },
{ type: 'staff-pick',
id: '23c50f46be6288ef9fd21d66c28c4d89',
attributes: [Object],
relationships: [Object],
links: [Object],
item: [Object],
age: [Object] },
{ type: 'staff-pick',
id: 'd8acd6b775c7a30777d225114c5fd9be',
attributes: [Object],
relationships: [Object],
links: [Object],
item: [Object],
age: [Object] },
... X more items ],
'previous-list':
{ type: 'staff-pick-list',
id: 'monthly-2017-06-01',
attributes:
{ 'list-date': '2017-06-01',
'list-type': 'monthly',
features: null },
relationships:
{ picks: [Object],
'previous-list': [Object],
'next-list': [Object] },
links: { self: 'https://refinery.nypl.org/api/nypl/ndo/v0.1/staff-picks/staff-pick-lists/monthly-2017-06-01' } }
};
var currentMonthPicks = { id: 'monthly-2017-09-01',
type: 'staff-pick-list',
date: '2017-09-01',
listType: 'monthly',
picks:
[ { id: 'a773a68178d943f6d4558f65756ac009',
type: 'staff-pick',
text: 'Lovers of short stories, meet the best-kept secret in the genre: Lucia Berlin. Her all-too-real tales of strong women are a haunting mix of melancholy and comedy that\'ll leave you wishing she wrote more.',
location: 'St. George',
picker: 'Tara Thomas',
item:
{ id: '9780374202392-a-manual-for-cleaning-women-selected-stories',
type: 'staff-pick-item',
title: 'A Manual For Cleaning Women: Selected Stories',
author: 'Lucia Berlin',
catalogSlug: 'http://browse.nypl.org/iii/encore/record/C__Rb20750395__SA%20Manual%20For%20Cleaning%20Women%3A%20Selected%20Stories__Orightresult__U__X4?lang=eng&suite=def',
imageSlug: '9780374202392',
ebookUri: 'https://browse.nypl.org/iii/encore/record/C__Rb20800942__SA%20Manual%20For%20Cleaning%20Women%3A%20Selected%20Stories__P0%2C1__Orightresult__U__X4?lang=eng&suite=def',
tags: [
{ id: 'essays-short-stories',
type: 'staff-pick-tag',
tag: 'Essays & short stories' },
{ id: 'on-the-dark-side',
type: 'staff-pick-tag',
tag: 'On the dark side' },
{ id: 'seriously-good-writing',
type: 'staff-pick-tag',
tag: 'Seriously good writing' }
],
age: { id: 'adult', type: 'staff-pick-age', age: 'Adult' } }
{ id: 'efa31c997203d6401558acb59679229d',
type: 'staff-pick',
text: 'Thrilling, shocking, intriguing. It\'s amazing how someone can appear to have everything from the outside looking in... but behind closed doors lies something sinister and devious, to say the least. And even more shocking: the people who pay attention to the smallest details of your despair.',
location: 'New Amsterdam',
picker: 'La\'Dawn Lee',
item: [Object],
age: [Object] },
{ id: 'dc6111510d87933698aa7ab0a4652f03',
type: 'staff-pick',
text: 'The action-filled journey of a powerful sorceress; an immature, thousand-year-old wizard; and a youthful, overly positive cabbage farmer. Did I mention that they must save the world? Includes well-written descriptions of shipwrecks, sea battles, magic, engaging battles, and humor to boot! I\'d have read it all in one sitting if I could have.',
location: '67th Street',
picker: 'Alex Mouyios',
item: [Object],
age: [Object] },
{ id: 'eec5791b4e45c8bc43fdb9198aa31af3',
type: 'staff-pick',
text: 'Interweaves the story of Punjabi widows in Southall, London with Nikki (a young woman torn between her feminist principles and Punjabi traditions) and Kulwinder (a woman grieving for her daughter). The writing workshop Nikki is hired to teach doesn\'t go as planned, but she begins to discover that these widows are more than they seem. Funny, thought-provoking, and heartwarming.',
location: 'Washington Heights',
picker: 'Sarah Spanburgh',
item: [Object],
age: [Object] },
{ id: '3bc4963f69cb4b2ce1f0ecb7c6d3be2b',
type: 'staff-pick',
text: '"Everyone\'s a aliebn when ur a aliebn too" is the illustrated story of a lonely alien sent to observe Earth. It meets all sorts of creatures with all sorts of perspectives on life, love, and happiness, while also learning to feel a little better about being an alien. The book is based on the enormously popular Twitter account, @jonnysun. ',
location: 'Grand Concourse',
picker: 'Rachael Wettenstein',
item: [Object],
age: [Object] },
{ id: '532c217fa23b0a55de93f1eb7c7b78d4',
type: 'staff-pick',
text: 'Growing up on Long Island, Shelby Richmond is an ordinary girl... until, one night, an extraordinary tragedy changes her fate, and she starts receiving anonymous, handmade postcards encouraging her to keep pressing on.',
location: '53rd Street',
picker: 'Samantha Simoes',
item: [Object],
age: [Object] },
{ id: 'a24fb7166acbbecd77aee7d25a318509',
type: 'staff-pick',
text: 'New York has always been a city of tremendous social experiment, often serving as a litmus test for new ideas. The bankruptcy of the city set up a new social experiment markedly different from the social welfare programs the city had championed for decades and allow the market to decide the city\'s fate. Phillips-Fein\'s book is an extremely readable, detailed account of this story.',
location: 'Seward Park',
picker: 'Andrew Fairweather',
item: [Object],
age: [Object] },
{ id: 'e9e1e8adb6900bdeee25deeda9874fcb',
type: 'staff-pick',
text: 'Look for the small things that make you happy! Lende\'s voice is light and comforting, despite the fact that death is integral to her job. The enchanting tales of life in Haines, Alaska, and the positivity that flows from Lende\'s writing will inspire you to find your own good today.',
location: 'Webster Library',
picker: 'Alexandria Abenshon',
item: [Object],
age: [Object] },
{ id: '44268c1a6691103564255420ae0fde72',
type: 'staff-pick',
text: 'Fun essays and practical advice about work-family balance. A great choice for fans (or critics) of Lean In and anyone interested in parenting, gender, feminism, and public policy. ',
location: 'Battery Park City',
picker: 'Jeremy Czerw',
item: [Object],
age: [Object] },
{ id: 'a43ab415be03965a74d09c107c147fd0',
type: 'staff-pick',
text: 'A companion and capstone to France\'s documentary of the same name, which tracks the spread of AIDS and the tragedy of American negligence. Remarkable acts of bravery, subversion, and espionage make this dense history a thrilling, heartbreaking perspective from the front lines of an ongoing war.',
location: 'Mulberry Street',
picker: 'Grace Yamada',
item: [Object],
age: [Object] },
{ id: '737fbaf5d5ccac36990473e04dc4f018',
type: 'staff-pick',
text: 'Whether you\'re hooked on jeans and athleisure or you sport monocles with bespoke suits, the beautifully cultivated looks presented here will fascinate you — because they\'re all about style, not just fashion. What\'s the difference? Individuality, and a true artistic vision. The huge photos bring you into the apartments, streetscapes, and closets where these men make their mark and give the rest of us something to talk about. ',
location: 'Battery Park City',
picker: 'Jeremy Czerw',
item: [Object],
age: [Object] },
{ id: '0af6ed15c0baa45a1b0eb2c2e81a999b',
type: 'staff-pick',
text: 'For so long, it was taken as scientific fact that women were the inferior sex. Even Charles Darwin agreed that women hadn’t evolved the same way that men had and that it would take them years to catch up. But now, these so-called facts are getting turned on their heads. ',
location: 'Kingsbridge',
picker: 'Rebecca Kluberdanz ',
item: [Object],
age: [Object] },
{ id: '23c50f46be6288ef9fd21d66c28c4d89',
type: 'staff-pick',
text: 'Sea, sand, sex and, scandal. Welcome to summer in the Hamptons.',
location: 'Mulberry Street',
picker: 'Anne Rouyer',
item: [Object],
age: [Object] },
{ id: 'd8acd6b775c7a30777d225114c5fd9be',
type: 'staff-pick',
text: 'Action-packed, steamy, romantic suspense. Tasked with hunting down a female assassin believed to utilize the most cold-blooded methods, Devereaux Security Services recruit Isaac discovers that his target, Maggie, is being hunted by ruthless adversaries who force him to question his loyalties.',
location: 'Grand Concourse',
picker: 'Sherise Pagan',
item: [Object],
age: [Object] },
{ id: 'ef3fe6c2e34f351e267c427714804391',
type: 'staff-pick',
text: 'Quirky and colorful. Meet rising chef Eva Thorvald and the people who influence her life and her cooking. Well-drawn characters and mouthwatering descriptions of meals.',
location: 'Andrew Heiskell',
picker: 'Anthony Murisco',
item: [Object],
age: [Object] },
{ id: '0113b7f6591f64dcc06b569e07344fdd',
type: 'staff-pick',
text: 'A strong sense of place and complex characters. One of Lydia\'s favorite customers commits suicide in the bookstore where she works. As she sorts through his possessions, her own past comes back to haunt her. ',
location: 'Mid-Manhattan',
picker: 'Susen Shi',
item: [Object],
age: [Object] },
{ id: '0e57c2aa98d62e75e36da397e2bc7c8c',
type: 'staff-pick',
text: 'I had heard about Mozart\'s pet starling, which could sing a tune from one of his concertos, but I had no idea the birds are so controversial today. Haupt acquires one as a pet and describes how intelligent and precocious it is as it ingratiates itself into her life.',
location: 'Chief Branch Library Officer',
picker: 'Christopher Platt',
item: [Object],
age: [Object] },
{ id: '38dd06715f6bf146d5b707da53e5c68b',
type: 'staff-pick',
text: 'Northlanders is epic in scope, collecting stories set during the Viking Age from the raid of Lindisfarne in England to the Battle of Clontarf in Ireland. Comic fans will enjoy Brian Wood\'s deft plotting and the work of artists like Davide Gianfelice, Fiona Staples, and Leandro Fernandez.',
location: 'Woodstock',
picker: 'Crystal Chen',
item: [Object],
age: [Object] },
{ id: '2934d6cacee46027a590461272ee3d66',
type: 'staff-pick',
text: 'Lee\'s novel follows several generations of one family over about seven decades as they struggle to make their way in a country that never fully welcomes them. The characters are rich, the drama is high, and I found this book impossibly difficult to put down.',
location: 'Public Programming',
picker: 'Aidan Flax-Clark',
item: [Object],
age: [Object] },
{ id: '30a25faa334da27e138a3e0f947043a0',
type: 'staff-pick',
text: 'A rumination on New York\'s "Adventure Playgrounds," this book is something between graphic novel and narrative art book, and the result is a surprisingly personal (and beautiful) look at an architectural relationship.',
location: 'Ottendorpher',
picker: 'Seth Pompi',
item: [Object],
age: [Object] },
{ id: 'e9d1f99520f0df299be1b039a1eebce5',
type: 'staff-pick',
text: '1989 was the supposed to be the year that capitalism triumphed. They real story, however, is that the predatory financial practices marking the \'80s should have told us that capitalism was nothing if not desperate to force a growth spurt which, for the most of us, could only end in tears. Yet, Mason has an optimistic vision of a future based on the ethos of the commons rather than profit.',
location: 'Seward Park',
picker: 'Andrew Fairweather',
item: [Object],
age: [Object] },
{ id: '46050e7330b15cdac2e74ad8f4ad99c4',
type: 'staff-pick',
text: 'An unconventional (and funny!) poetic memoir about being the daughter of a Catholic priest in the Midwest, and going home again as an adult.',
location: 'Jefferson Market',
picker: 'Jenny Baum',
item: [Object],
age: [Object] },
{ id: 'a28c1676896ba616106f23c47853583f',
type: 'staff-pick',
text: 'Imagine that instead of continuing to raise cattle, the American government chose to supplement them with herds of hippopotamuses. Gailey takes this idea (which really was proposed in the early 20th century!) and runs with it. In this novella, Feral hippos have overrun the Mississippi bayou and an odd group of people work to bring them under control.',
location: 'Kingsbridge',
picker: 'Rebecca Kluberdanz ',
item: [Object],
age: [Object] },
{ id: '12436063321e0f5dcea040fd2f2340d0',
type: 'staff-pick',
text: 'This narrative account of the Clinton campaign gives readers a behind-the-scenes view of the headlines that dominated the 2016 news cycle. The experience of reading a historical account of such recent events is fascinating and enlightening, but also threatens to leave readers with a lingering sense of deja vu. ',
location: 'Morris Park',
picker: 'Benjamin Sapadin',
item: [Object],
age: [Object] },
{ id: '38f450e3615fc0671f135a2042218994',
type: 'staff-pick',
text: 'If season 7 of "Game of Thrones" makes you want to read about historical women who played the "Great Game" in British history, this book is for you. Six out of seven maesters give it a thumbs up.',
location: 'Pelham Bay',
picker: 'Judd Karlman',
item: [Object],
age: [Object] },
{ id: '19467e2ed749c646c3dcb1069195bf38',
type: 'staff-pick',
text: 'Tech journalist Katya Pasternack and her unlikely partner, former stay-at-home mom and current social-media grunt Sabrina Blum, stumble upon a scandal coming from the office of the city\'s hippest startup. ',
location: 'Francis Martin',
picker: 'Erin Horanzy',
item: [Object],
age: [Object] },
... X more items ],
previousList:
{ id: 'monthly-2017-06-01',
type: 'staff-pick-list',
date: '2017-06-01',
listType: 'monthly' },
nextList: undefined
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment