Confreaks TV API - eXiga/ConfreaksMTV GitHub Wiki
Welcome to the ConfreaksMTV wiki!
official site)
CONFREAKS API ROUTES (taken fromNotice:
As of March 18, 2015, videos now have two new attributes: host and embed code. These are set up in order to take the place of the attribute youtube_code. The host, by default, is youtube, but can also be vimeo, or any other hosting platform that we may use in the future. The embed_code should be all you need to embed a video, given you know how to embed the video given its host.
CONFERENCES
A conference is defined without a year. For instance, RubyConf 2008 is not a conference - it's an event that belongs to the conference RubyConf. You can find a conference with its name. For example, you will find Ruby Conference at /ruby-conference.
-
RETURN ALL api/v1/conferences.json [{ name: #, id: #, event_count: # }]
-
RETURN ONE api/v1/conferences/:name.json [{ name: #, id: #, event_count: # events: [{ id: #, short_code: #, start_at: #, end_at: # }, {...}, {...}, ...]}]
EVENTS
Events can be found by their short codes, which follow the format of the conference name and the event year, i.e. rubyconf2012. They also accept parameters, sort and limit where sort can be set to 'recent' to return recent events and limit can be used to specify how many events you want returned.
-
RETURN COUNT api/v1/event_count.json { event_count: # }
-
RETURN ALL api/v1/events.json [{ id: #, conference: #, short_code: #, start_at: #, end_at: # }] with parameters: api/v1/events.json?sort=recent&limit=5 Returns top 5 most recent events.
-
RETURN ONE api/v1/events/:short_code.json { id: #, short_code: #, start_at: #, end_at: #, video_count: #, logo: # (returns a url), conference: { id: #, name: # } }
-
RETURN A GIVEN EVENT'S VIDEOS api/v1/events/:short_code/videos.json See below for videos#index json.
PRESENTERS
Presenters can be found by their display name. The majority of the time this will be their first name and their last name, i.e. giles-bowkett. Occassionally presenters are saved in our system without a first and/or last name, in which case their display name is what they are also known as - their aka_name, for example, simurai.
-
RETURN ALL api/v1/presenters.json [{ id: #, slug: #, first_name: #, last_name: #, aka_name: #, twitter_handle: # }, {...}, ...]
-
RETURN ONE api/v1/presenters/:display_name.json { id: #, slug: #, first_name: #, last_name: #, aka_name: #, twitter_handle: # }
-
RETURN A GIVEN PRESENTER'S VIDEOS api/v1/presenters/:display_name/videos.json See below for videos#index json.
VIDEOS
A video slug is made up of its event short code and its title. For example, the talk "Archaeopteryx: Lambdas In Detail," given at MountainWest RubyConf in 2010 can be found at /mwrc2010-archaeopteryx-lambdas-in-detail. They also accept parameters, sort and limit where sort can be set to 'most_viewed' to return most viewed videos or 'most_viewed_last_7' to return most viewed videos in the last 7 days, and limit can be used to specify how many videos you want returned. It is recommended to specify a limit for videos or the request will be slow.
-
COUNT api/v1/video_count.json { video_count: # }
-
FEATURED api/v1/featured-video.json Returns the featured video in the same format as Return one. Featured video is always produced by Confreaks.
-
RETURN ALL api/v1/videos.json || api/v1/videos.json?limit=50 [{ id: #, title: #, recorded_at: #, event: #, rating: #, abstract: #, post_date: #, announce_date: #, host: #, embed_code: #, views: #, views_last_7: #, views_last_30: #, license: #, attribution: #, {...}, {...}, ... }] with parameters: api/v1/videos.json?sort=most_viewed || api/v1/videos.json?sort=most_viewed&limit=5 Returns videos ordered by views DESC or top 5 most viewed videos.
-
RETURN ONE api/v1/videos/:slug.json { id: #, title: #, recorded_at: #, event: #, rating: #, abstract: #, post_date: #, announce_date: #, host: #, embed_code: #, image: # (returns a url), views: #, views_last_7: #, views_last_30: #, license: #, attribution: # }
-
RETURN VIDEOS FOR A GIVEN PRESENTER AT A GIVEN EVENT api/v1/presenters/:display_name/events/:short_code/videos.json See above for videos#index json.