API Documentation

COSCUP 2011 Webiste move to GitHub Pages since 2018/08/27, therefore we not offer JSON-P API anymore, only static JSON file below. Access-Control-Allow-Origin: * is added to HTTP header to all URLs

Old API document HTML file can be found at here

You may contact timdream@gmail.com if there is any questions regarding APIs.

Navigation menu (menu)

Provide HTMLs of navigation menus of the three languages. Intend to be used internally on sub-domains of coscup.org. Hyper references (href) within do not come with hostnames, they are absolute path that begins with /2011/. The hostname to serve these pages are almost always coscup.org.

Program (program)

A ~50KB JSON object that represents all the talks that will be given at COSCUP 2011. Your application should cache the result when possible (Web app may utilize localStorage; see introduction). The talk array may ordered by time but not necessary — your application must be able to accept and process an unsorted list. Also, the placement of a talk on the list could vary as programs being updated — your application must not rely on the placement to identify the session.

Program time is represented in UNIX timestamp (seconds since 0:00 UT Jan 1st, 1970). Breaks can be determined by the property isBreak.

Important: Language and topic types are optional information.

Sponsors (sponsors)

List of COSCUP 2011 sponsors. You must hard-code the order of sponsorship levels. The list of sponsors within each of the sponsorship level is ordered, when shown as whole, the order must be maintained; if only one of the sponsors could be shown, the one to be shown must picked randomly with following weighted factor:

diamond:gold:silver:bronze:media = 10:5:2:1:0

The picking algorithm has been implemented in Javascript for COSCUP 2011 website mobile layout; the source code can be found here in mobileSponsorLogo().

Your application should update the list of sponsors at least once a day.