Skip to content

Instantly share code, notes, and snippets.

@tomkershaw-bbc
Last active July 28, 2017 15:33
Show Gist options
  • Save tomkershaw-bbc/aaea82b23c0bd5d9df4db463871a5a01 to your computer and use it in GitHub Desktop.
Save tomkershaw-bbc/aaea82b23c0bd5d9df4db463871a5a01 to your computer and use it in GitHub Desktop.
{
"name": "personal homepage",
{
"stations" : {
"title" : "Stations",
"data" : "/radio/networks"
"type" : "networks"
},
"plays" : {
"title" : "Play history",
"data" : "/radio/plays"
"type" : "plays"
},
"favourites" : {
"title" : "Listen List",
"data" : "/radio/favourites"
"type" : "favourites"
},
"follows" : {
"title" : "Latest episodes from followed brands",
"data" : "/radio/follows"
"type" : "follows"
}
}
}
@mazurio
Copy link

mazurio commented Jul 28, 2017

My try:

{
	"structure": [
		{
			"type": "on-air",
			"title": "On Air",
			"description": null,
			"context": null
		},
		{
			"type": "collection",
			"title": "The Mercury Prize 2017 Nominees",
			"description": "Find out who's shortlisted, and listen to interviews with a selection of nominated acts.",
			"context": {
				"pid": "p007158l"
			}
		},
		{
			"type": "plays",
			"title": "Continue Listening",
			"description": null,
			"context": null
		},
		{
			"type": "recommendations",
			"title": "Recommended for You",
			"description": null,
			"context": null
		},
		{
			"type": "follows",
			"title": "Latest episodes from followed brands",
			"description": null,
			"context": null
		},
		{
			"type": "favourites",
			"title": "Listen List",
			"description": null,
			"context": null
		},
		{
			"type": "popular",
			"title": "Most Popular",
			"description": null,
			"context": null
		},
		{
			"type": "tracks",
			"title": "Tracks",
			"description": null,
			"context": null
		}
	]
}

@jamessheppard
Copy link

Here's a very basic starting point from @sharps51 and I.

It's enough to get to playback via a simple user interface, nothing more.

We've inlined required data to avoid multiple API requests from a mobile client.

{
  "name": "Jimi's Personal Homepage",
  "contents": [
    {
      "title" : "Stations",
      "data" : [
          {
              "title": "BBC Radio One",
              "vpid":"bbc_radio_one"
          },
          {
              "title": "BBC Radio 6 Music",
              "vpid":"bbc_6music"
          }
      ]
    },

    {
      "title" : "Play history",
      "data" : [
          {
              "title": "Unreliable Evidence - 21/09/2016",
              "vpid":"b07vs3kh",
              "offset_ms":"61250"
          }
      ]
    },

    {
      "title" : "Listen List",
      "data" : [
          {
              "title": "Stuart Maconie's Freak Zone - Dark Matter",
              "vpid":"b08y9w5k"
          }
      ]
    },

    {
      "title" : "Latest episodes from followed brands",
      "data" : [
          {
              "title": "I'm Sorry I Haven't A Clue",
              "data": [
                  {
                      "title":"Series 67 - Episode 5",
                      "vpid":"b08yncqb"
                  }
              ]
          }
      ]
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment