Skip to content

API DOC

洧杰 廖 edited this page May 30, 2019 · 16 revisions
API 網址: https://www.thef2e.com/api/{router功能路由}

API 列表

  1. 報名驗證
  2. 報名人數
  3. 個人闖關記錄查詢
  4. 標籤列表
  5. 作品列表

報名驗證

[API]: /isSignUp
[方法]: post
[參數]:
  {
    "email": "hexscholl@test.com"
  }
[成功回應]
  {
    "success": true,
    "message": "報名成功!",
    "nickName": "gonsakon",
    "timeStamp": 1527035405000,
    "Certificate": "獎狀網址"
  }
[失敗回應]: 未報名成功
  {
    "success": false,
    "message": "此 Mail 尚未報名"
  }
[失敗回應]: 參數錯誤
  {
    "success": false,
    "message": "email 參數未提供"
  }

報名人數

[API]: /signUpTotal
[方法]: get
[成功回應]
  {
    "success": true,
    "total": 899
  }

個人闖關記錄查詢

欄位介紹

  • mail:報名郵件
  • stage:關卡
  • tag:技能標籤
  • timeStamp:投稿時間戳記
  • url:投稿作品網址
[API]: /stageCheck
[方法]: post
[參數]:
  {
    "email": "hexschool@test.com"
  }
[成功回應]
  [
    {
        "mail": "hexschool@gmail.com",
        "stage": 1,
        "tag": "UI, CSS  web layout, CSS Flexbox",
        "timeStamp": 1526566114000,
        "url": "https://www.google.com.tw"
    },
    {
        "mail": "hexschool@gmail.com",
        "stage": 2,
        "tag": "UI, CSS  web layout, CSS Flexbox",
        "timeStamp": 1526566114000,
        "url": "https://www.yahoo.com.tw"
    },
]
[失敗回應]: 參數錯誤
  {
    "success": false,
    message: 'email 參數未提供'
  }

標籤列表

[API]: /tagList
[方法]: get
[成功回應]
  [
    "html preprocessor",
    "ES6",
    "JavaScript API",
    "AJAX",
    "JavaScript Design Pattern",
    ...
  ]

作品列表

API 範例:/codeList?stage=1&tag=Vue

欄位介紹

  • stage:關卡
  • tag:標籤

備註

  • 未填參數則抓最新投稿列表前 100 筆
[API]: /codeList
[方法]: get
[成功回應]
  [
    {
        "tag": "CSS Flexbox, ES6, Vue",
        "timeStamp": 1528712062000,
        "url": "https://codepen.io/HydraSu/pen/oybVPN",
        "stage": 1
    },
    ...
  ] 
Clone this wiki locally
You can’t perform that action at this time.