Skip to content

Instantly share code, notes, and snippets.

@rupertbates
Created February 6, 2015 11:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rupertbates/f51570b9690d612c1f29 to your computer and use it in GitHub Desktop.
Save rupertbates/f51570b9690d612c1f29 to your computer and use it in GitHub Desktop.
Retrieve all 5 star album reviews from the Guardian content api
URL="http://content.guardianapis.com/search?api-key=test&show-fields=starRating&page-size=100&tag=tone/albumreview,tone/reviews&from-date=2015-01-03&to-date=2015-02-03"
curl -s $URL | jq '.response.results[]|select(.fields.starRating != null)|{webTitle, url: .webUrl, starRating: (.fields.starRating|tonumber)}|select(.starRating == 5)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment