Skip to content

2. Accounts

Henry Chang edited this page Jun 27, 2016 · 13 revisions

GET /api/v1/accounts/{user-uuid}

  • 用途: 取得使用者資訊
  • header:
    • apiKey(required)
    • token(required)
  • response:
    {
      "userName": "Anthony Kong",
      "profilePhotoId": "randomized UUID",
      "profile": "I am Anthony Kong.",
      "location": "Taipei",
      "company": "HSNL",
      "jobTitle": "Student",
      "email": "lockys.tw@gmail.com",
      "qrCodeUuid": "randomized UUID",
      "availableStartTime": "14:00",
      "availableEndTime": "15:00"
    }

Optional

  • URL Parameter:
?field=credit
  • response
{"credit": 3000}

PUT /api/v1/accounts/{user-uuid}

  • 用途: 設定使用者資料與可通話時段
  • header:
    • apiKey(required)
    • token(required)
  • payload:
    {
      "userName": "lockys",
      "profile": "I am Anthony Kong.",
      "location": "Taipei",
      "company": "HSNL",
      "availableStartTime":"10:00:00",
      "availableEndTime":"23:59:59",
      "deviceOS": "ios | android",
      "devicekey": "uniqueKey"
"enableMVPNChecker":true
    }
  • parameter:
    {}
  • response:
    • status:
      • 200 OK
      • 404 Not found

DELETE /api/v1/accounts/{user-uuid}

  • 用途: 刪除此帳號
  • header:
    • apiKey(required)
    • token(required)
  • parameter:
    {}
  • response:
    • status:
      • 200 OK

POST /api/v1/accounts/{user-uuid}/avatar

  • 用途: 上傳大頭貼,將會壓縮成256256/ 128128/64*64 jpg 格式儲存在s3
  • header:
    • apiKey(required)
    • token(required)
  • payload: application/multi-form-data
    • photo : file
  • parameter:
  • response
    • status
    • 201 created
    • 415 不支持此圖片檔案類型
    {}

GET /api/v1/accounts/{user-uuid}/avatar?size={size}

  • 用途: 取得某userId 的頭像
  • header:
    • apiKey(required)
    • token(required)
  • parameter:
    • size: small | mid| large
  • response
    • status
    • 200 OK
    • 404 Not Found - 無頭像
    {}

POST /api/v1/accounts/{user-uuid}/qrcode

  • 用途: 建立 QRCode
  • header:
    • apiKey(required)
    • token(required)
  • payload:
    {}
  • parameter:
  • response:
    • status
    • 201 CREATED
    • 304 Not Modified

GET /api/v1/accounts/{user-uuid}/qrcode

  • 用途: 取得 QRCode
  • header:
    • apiKey(required)
    • token(required)
  • payload:
    {}
  • parameter:
  • response:
  image byteArray.

GET /avatars/{avatarUuid}?size={size}

  • 用途: 取得某 userId 的頭像
  • header:
    • apiKey(required)
    • token(required)
  • parameter:
    • size: small | mid | large
  • response
    • status
    • 200 OK
    • 404 Not Found - 無頭像

Clone this wiki locally