Permalink
Browse files

2011 -> 2012 for API documentation

  • Loading branch information...
1 parent c5ab567 commit 938ec27e94f9ef9d2573b12a4e4ba2f7dfdb0eec @timdream timdream committed Apr 28, 2012
Showing with 17 additions and 17 deletions.
  1. +9 −9 en/api/index.md
  2. +8 −8 zh-tw/api/index.md
View
@@ -1,26 +1,26 @@
## API Documentation
-COSCUP 2011 website provide following **read-only** JSON-P APIs for your application to access. Since they are provided in JSON-P, they are useful in client-side web applications too — just add the `callback` parameter. You many also utilize Cross-Origin Resource Sharing if the browser targeted supports it. `Access-Control-Allow-Origin: *` is added to HTTP header to all URLs.
+COSCUP 2012 website provide following **read-only** JSON-P APIs for your application to access. Since they are provided in JSON-P, they are useful in client-side web applications too — just add the `callback` parameter. You many also utilize Cross-Origin Resource Sharing if the browser targeted supports it. `Access-Control-Allow-Origin: *` is added to HTTP header to all URLs.
You may contact <timdream@gmail.com> if there is any questions regarding APIs.
### Navigation menu (`menu`)
-* URL: `http://coscup.org/2011/api/menu/`. [Indented view](http://json-indent.appspot.com/indent?url=http://coscup.org/2011/api/menu/).
+* URL: `http://coscup.org/2012/api/menu/`. [Indented view](http://json-indent.appspot.com/indent?url=http://coscup.org/2012/api/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`, with `ipv6.coscup.org` as exception should you would like to test IPv6 connectivity.
+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 `/2012/`. The hostname to serve these pages are almost always `coscup.org`, with `ipv6.coscup.org` as exception should you would like to test IPv6 connectivity.
### Plurks mentioning COSCUP (`plurk`)
-* URL: `http://coscup.org/2011/api/plurk/`. [Indented view](http://json-indent.appspot.com/indent?url=http://coscup.org/2011/api/plurk/).
+* URL: `http://coscup.org/2012/api/plurk/`. [Indented view](http://json-indent.appspot.com/indent?url=http://coscup.org/2012/api/plurk/).
Simply a proxy of `http://www.plurk.com/API/PlurkSearch/search?query=COSCUP`. See [Plurk API 1.0 documentation](http://www.plurk.com/API#search) for detail. The search term is hard-coded and the refresh rate is limited to 10 min. You should access Plurk directly (with your own API key) if you need real-time data.
### Program (`program`)
-* URL: `http://coscup.org/2011/api/program/`. [Indented view](http://json-indent.appspot.com/indent?url=http://coscup.org/2011/api/program/).
+* URL: `http://coscup.org/2012/api/program/`. [Indented view](http://json-indent.appspot.com/indent?url=http://coscup.org/2012/api/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](http://diveintohtml5.org/storage.html)). The talk array *may* ordered by time but not necessary &mdash; 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 &mdash; your application **must not** rely on the placement to identify the session.
+A ~50KB JSON object that represents all the talks that will be given at COSCUP 2012. Your application **should** cache the result when possible (Web app may utilize `localStorage`; see [introduction](http://diveintohtml5.org/storage.html)). The talk array *may* ordered by time but not necessary &mdash; 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 &mdash; your application **must not** rely on the placement to identify the session.
List of topics and the rooms in the venue is also included.
@@ -30,12 +30,12 @@ Program time is represented in UNIX timestamp (seconds since 0:00 UT Jan 1st, 19
### Sponsors (`sponsors`)
-* URL: `http://coscup.org/2011/api/sponsors/`. [Indented view](http://json-indent.appspot.com/indent?url=http://coscup.org/2011/api/sponsors/).
+* URL: `http://coscup.org/2012/api/sponsors/`. [Indented view](http://json-indent.appspot.com/indent?url=http://coscup.org/2012/api/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:
+List of COSCUP 2012 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](http://coscup.org/2011-theme/assets/script.js) in `mobileSponsorLogo()`.
+The picking algorithm has been implemented in Javascript for COSCUP 2012 website mobile layout; the source code can be found [here](http://coscup.org/2012-theme/assets/script.js) in `mobileSponsorLogo()`.
Your application should update the list of sponsors at least once a day.
View
@@ -1,26 +1,26 @@
## API 文件
-COSCUP 2011 網站提供下列**唯讀** JSON-P API 供第三方程式取用。因為具有 JSON-P 的能力,您可以用在 client 端網路應用程式;在引用時加上 `callback` 參數即可。若目標瀏覽器支援跨來源資源共享 (Cross-Origin Resource Sharing),您也可以不使用 `callback` 參數;各 URL 皆會輸出 `Access-Control-Allow-Origin: *` HTTP 標頭。
+COSCUP 2012 網站提供下列**唯讀** JSON-P API 供第三方程式取用。因為具有 JSON-P 的能力,您可以用在 client 端網路應用程式;在引用時加上 `callback` 參數即可。若目標瀏覽器支援跨來源資源共享 (Cross-Origin Resource Sharing),您也可以不使用 `callback` 參數;各 URL 皆會輸出 `Access-Control-Allow-Origin: *` HTTP 標頭。
有任何關於 API 的建議與問題請洽 <timdream@gmail.com> 。
### 導覽選單 (`menu`)
-* URL: `http://coscup.org/2011/api/menu/`。[縮排顯示](http://json-indent.appspot.com/indent?url=http://coscup.org/2011/api/menu/)。
+* URL: `http://coscup.org/2012/api/menu/`。[縮排顯示](http://json-indent.appspot.com/indent?url=http://coscup.org/2012/api/menu/)。
提供三種語言的網站導覽選單 HTML,設計給 `coscup.org` 的子網站使用。超連結(`href`)沒有 hostname,只有絕對路徑。取用這些頁面的網站通常是 `coscup.org`,除非您想要測試 IPv6 連線(改用 `ipv6.coscup.org`)。
### 提到 COSCUP 的噗 (`plurk`)
-* URL: `http://coscup.org/2011/api/plurk/`。[縮排顯示](http://json-indent.appspot.com/indent?url=http://coscup.org/2011/api/plurk/)。
+* URL: `http://coscup.org/2012/api/plurk/`。[縮排顯示](http://json-indent.appspot.com/indent?url=http://coscup.org/2012/api/plurk/)。
只是個 `http://www.plurk.com/API/PlurkSearch/search?query=COSCUP` 的 Proxy。資料結構請參考 [Plurk API 1.0 文件](http://www.plurk.com/API#search)。搜尋詞彙是寫死的,且更新速率限制在 10 分鐘以上。如果需要即時的資訊請自己申請 API key 直接存取噗浪。
### 議程 (`program`)
-* URL: `http://coscup.org/2011/api/program/`。[縮排顯示](http://json-indent.appspot.com/indent?url=http://coscup.org/2011/api/program/)。
+* URL: `http://coscup.org/2012/api/program/`。[縮排顯示](http://json-indent.appspot.com/indent?url=http://coscup.org/2012/api/program/)。
-大約 ~50KB 大的 JSON 文件,列出 COSCUP 2011 的所有議程。可能的話,應用程式**應**留存此資料的快取(網路應用程式可以使用`localStorage`;[參考資料](http://diveintohtml5.org/storage.html))。議程*可能*是照時間順序排列,但是不一定;程式**應**具有處理不照時間排列的資料的能力。另外,議程更新的時候講次在列表上的順序可能會改變;程式**不應**使用順序來辨識講次。
+大約 ~50KB 大的 JSON 文件,列出 COSCUP 2012 的所有議程。可能的話,應用程式**應**留存此資料的快取(網路應用程式可以使用`localStorage`;[參考資料](http://diveintohtml5.org/storage.html))。議程*可能*是照時間順序排列,但是不一定;程式**應**具有處理不照時間排列的資料的能力。另外,議程更新的時候講次在列表上的順序可能會改變;程式**不應**使用順序來辨識講次。
主題列表以及會場會議廳的資訊也在此提供。
@@ -30,12 +30,12 @@ COSCUP 2011 網站提供下列**唯讀** JSON-P API 供第三方程式取用。
### 贊助單位 (`sponsors`)
-* URL: `http://coscup.org/2011/api/sponsors/`。[縮排顯示](http://json-indent.appspot.com/indent?url=http://coscup.org/2011/api/sponsors/)。
+* URL: `http://coscup.org/2012/api/sponsors/`。[縮排顯示](http://json-indent.appspot.com/indent?url=http://coscup.org/2012/api/sponsors/)。
-COSCUP 2011 的贊助商資訊。程式**應**內建各贊助等級的順序,各等級內的贊助單位順序在列出時**應**保存;在只能顯示一個贊助單位的場合,要顯示哪個贊助單位的機制必須使用加權隨機的方式挑選,加權比率如下:
+COSCUP 2012 的贊助商資訊。程式**應**內建各贊助等級的順序,各等級內的贊助單位順序在列出時**應**保存;在只能顯示一個贊助單位的場合,要顯示哪個贊助單位的機制必須使用加權隨機的方式挑選,加權比率如下:
> diamond:gold:silver:bronze:media = 10:5:2:1:0
-此演算法的 Javascript 版本在 COSCUP 2011 手機版網頁有實作,您可以參考[此處](http://coscup.org/2011-theme/assets/script.js)位於 `mobileSponsorLogo()` 的程式碼。
+此演算法的 Javascript 版本在 COSCUP 2012 手機版網頁有實作,您可以參考[此處](http://coscup.org/2012-theme/assets/script.js)位於 `mobileSponsorLogo()` 的程式碼。
程式至少需每日更新贊助單位資訊。

0 comments on commit 938ec27

Please sign in to comment.