Skip to content

Instantly share code, notes, and snippets.

@loganek
Last active August 29, 2015 14:03
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 loganek/0accf2a4fb27a2cf881f to your computer and use it in GitHub Desktop.
Save loganek/0accf2a4fb27a2cf881f to your computer and use it in GitHub Desktop.
type AcoustIDJsonProvider = FSharp.Data.JsonProvider<"""
{
"status": "dummy-status",
"results": [
{
"recordings": [
{
"artists": [
{
"id": "dummy-recording-artist-id",
"name": "dymmy-recording-artist-name"
}
],
"duration": 123,
"releasegroups": [
{
"artists": [
{
"id": "dummy-releasegroups-artist-id",
"name": "dymmy-releasegroups-artist-name"
}
],
"secondarytypes": [
"dummy-secondarytypes-name"
],
"type": "dummy-releasegroup-name",
"id": "dummy-releasegroup-id",
"title": "dummy-releasegroup-title"
}
],
"title": "dummy-recording-title",
"id": "dummy-recording-id"
}
],
"score": 0.123,
"id": "dummy-result-id"
}
]
}
""">
let jsonProvider = AcoustIDJsonProvider.Parse(""" {"status": "ok", "results": [{"recordings": [{"artists": [{"id": "04f19c9f-f9c3-4645-bb26-7f7211ae7b6f", "name": "Varius Manx"}], "duration": 250, "releasegroups": [{"artists": [{"id": "04f19c9f-f9c3-4645-bb26-7f7211ae7b6f", "name": "Varius Manx"}], "secondarytypes": ["Compilation"], "type": "Album", "id": "c6ac2258-16c4-3362-8396-08c5fa49456d", "title": "Najlepsze z dobrych"}, {"artists": [{"id": "04f19c9f-f9c3-4645-bb26-7f7211ae7b6f", "name": "Varius Manx"}], "type": "Album", "id": "322c5fec-d0bf-37ba-82a9-c1d1b93608c3", "title": "Ego"}], "title": "Ten sen", "id": "cfe8e73c-09c1-4c86-a86c-d31da7448a08"}], "score": 0.960268, "id": "370f8c7a-ae8d-4ac4-9c41-f731929580e7"}]} """)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment