Skip to content

Instantly share code, notes, and snippets.

@markevans
Last active December 16, 2015 21:49
Show Gist options
  • Save markevans/5502710 to your computer and use it in GitHub Desktop.
Save markevans/5502710 to your computer and use it in GitHub Desktop.

Objects

Channel

{
  "id": "251533197-CE3BEA67AA7ADB52D50206C44F9FA5DB",
  "title": "Cable News Network",
  "short_name": "CNN"
}

Program

{
  "id": "270492450-003C505A9FF2EB56D483276A36D45C96",
  "title": "Die Hard",
  "synopsis": "New York City policeman John McClane..."
}

Airing

{
  "id": "asdf-2323",
  "program_id": "270492450-003C505A9FF2EB56D483276A36D45C96",
  "channel_id": "251533197-CE3BEA67AA7ADB52D50206C44F9FA5DB",
  "start": "2012-09-04T08:00:00Z"
  "end": "2012-09-04T10:00:00Z",
}

Event

{
  display_size: "fullscreen",
  advert_type: "web",
  start: "2012-09-04T09:00:00Z",
  end: "2012-09-04T10:00:00Z",
  content: {
    ...
  }
}

Image

Could potentially use oEmbed standard here, but for now:

{
  url: "http://farm3.static.flickr.com/2011/2233714458_277f759ba4_z.jpg"
}

Content

{
  type: "image",
  source: "flickr",
  title: "Table mountain",
  url: "http://www.flickr.com/photos/30504915@N00/2233714458",
  image: {
    url: "ASFASFSDA"
  }
}

{
  type: "article",
  source: "wikipedia",
  title: "Pomegranate",
  text: "The pomegranate is a fruit-bearing shrub.",
  url: "http://en.wikipedia.org/wiki/Pomegranate",
  image: {...}
}

{
  type: "product",
  source: "amazon",
  product_type: "DVD",
  title: "Some book",
  text: "Jamie will teach you loads!",
  url: "http://www.amazon.co.uk/gp/product/0563494662/ref=s9_simh_gw_p14_d0_i3",
  image: {...}
  offer: {...}
}

{
  type: "factoid",
  text: ""
}

{
  type: "map",
  geolocation: {...}
  image: {...}
}

Notes

  • Timestamps as milliseconds (integer)
  • channel / program has an optional "image" field

Things not to be added by the end of initial 2 months build

  • versioning (for now /schedule, NOT /api/0/schedule )
  • "meta" attribute on response envelope (but we will use "data" to wrap data)
  • language and currency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment