Skip to content

Instantly share code, notes, and snippets.

@miguno
Last active May 19, 2017 22:10
Show Gist options
  • Save miguno/dca71dd9e6fd80c6579256e99fa6be6e to your computer and use it in GitHub Desktop.
Save miguno/dca71dd9e6fd80c6579256e99fa6be6e to your computer and use it in GitHub Desktop.
REST API example 2: get the latest Top 5 songs across all music genres
# Retrieve the latest Top 5 songs across all music genres
$ curl -sXGET http://localhost:7070/kafka-music/charts/top-five
# You should see output similar to following, though here
# the output is pretty-printed so that it's easier to read:
[
{
"artist": "Jello Biafra And The Guantanamo School Of Medicine",
"album": "The Audacity Of Hype",
"name": "Three Strikes",
"plays": 70
},
{
"artist": "Hilltop Hoods",
"album": "The Calling",
"name": "The Calling",
"plays": 67
},
... rest omitted...
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment