sfc-rg / rg-portal

Internal Website for Keio Univ. Technology joint research groups
https://portal.sfc.wide.ad.jp/
12 stars 5 forks source link

出席管理のためのAPIを作る #22

Closed miyukki closed 9 years ago

miyukki commented 9 years ago

Endpoint

POST /api/v1/attendances

Parameters

Name Description
access_token アクセストークン(コンソールから発行します)
student_id 学籍番号

Success Response

{
  "user": {
    "name": "Yusei Yamanaka",
    "nickname": "miyukki",
    "icon_url": "https://avatars.slack-edge.com/2015-01-08/3360245780_b34aaf467d966d97bd15_192.jpg"
  },
  "attendance_count": 1
}

Error Response (when access at out time of meeting)

{
  "error": "Not found meeting at current time."
}

Error Response (when set invalid student id)

{
  "error": "Not found user with student id."
}

Error Response (when attend duplicate with same meeting)

{
  "error": "Duplicated attendance."
}
demmys commented 9 years ago

こういうのWikiかPortal自身かどっちかに入れときたいね。 Portalに開発者用情報みたいなページ群を作ってもいいかもね

pasora commented 9 years ago

Error Response (when set invalid api key)

{
 "error": "Need valid api key."
}
miyukki commented 9 years ago

動作も確認したのでこちらのissueはクローズします。 仕様はひとまずこちらに移動しました! http://portal.gw.sfc.wide.ad.jp/pages/service/portal/api/v1/attendances