Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

운세 푸시 알람 설정 API SPEC #119

Open
4 of 9 tasks
korea8378 opened this issue Jan 30, 2020 · 0 comments
Open
4 of 9 tasks

운세 푸시 알람 설정 API SPEC #119

korea8378 opened this issue Jan 30, 2020 · 0 comments
Assignees
Labels
API SPEC API SPEC

Comments

@korea8378
Copy link
Contributor

korea8378 commented Jan 30, 2020

운세 푸시 알람 설정 API SPEC

  • 헤더에 인증 토큰과 TIME-ZONE을 입력한다.
  • ture & false를 통하여 푸시 알람을 on & off 할 수 있다.

Request

HTTP Method URI
PATCH /users/horoscope-alarm
  • Header
Name Value Description
Authorization JWT 인증용 JWT
TIME-ZONE time-zone 클라이언트가 사용하는 타임존
  • parameter
Name Type Description
  • example
curl -X PATCH "http://localhost:8080/users/horoscope-alarm" -H "accept: */*" -H "Authorization: Bearer eyJ0eXBlIjoiSldUIiwiYWxnIjoiSFMzODQifQ.eyJpc3MiOiJBUEkgU2VydmVyIiwic3ViIjoiQXV0aGVudGljYXRpb24gVG9rZW4iLCJleHAiOjE5MjQ5MzI3MDksImlhdCI6MTU3OTMzMjcwOSwidXNlcklkIjoidGVzdCIsImlkIjoyfQ.ZfMQWUjZ4uhubsO_XIG-8uxOYizTofeV_RF2AY6cfmHc-g5qUmEHPpUqBS8NXQEJ" -H "Time-Zone: KST" -H "Content-Type: application/json" -d "{ \"horoscopeAlarm\": true}"


Response

Success

  • Status: 200 OK
  • Header
Name Value Description
content-type application/json
date
{
  "id": 2,
  "userId": "test",
  "constellation": "황소자리",
  "timeZone": "KST",
  "horoscopeAlarmFlag": true,
  "questionAlarmFlag": true,
  "horoscopeTime": "23:00:00",
  "questionTime": "13:00:00"
}

Fail

Status Description
400 BAD_REQUEST 잘 못 된 요청
401 UNAUTHORIZED 인증 실패
500 Internal Server Error unknown server error

400 BAD_REQUEST

//Request Worn Field
{
  "error": {
    "code": 4001,
    "message": "Request Field Null or Wrong Form - Check Request Field"
  }
}

401 UNAUTHORIZED

//Fail Authentication
{
  "error": {
    "code": 4101,
    "message": "Fail Authentication - check token”
  }
}

Check List

  • issue 제목은 유의미한가?
  • issue 내용은 issue 내용만 확인하고도 모르는 사람도 파악할 수 있을 정도로 기술되었는가? (무엇을, 언제, 어디서...)
  • reference가 있다면 추가했는가?
  • 관련 issue가 있다면 추가했는가?
  • 유의미한 Label을 추가했는가?
  • Assginees를 추가했는가?
  • Estimate를 추가했는가?
  • 관련 Milestone이 있다면 추가했는가?
  • 관련 Epics가 있다면 추가했는가?
@korea8378 korea8378 added the API SPEC API SPEC label Jan 30, 2020
@korea8378 korea8378 self-assigned this Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API SPEC API SPEC
Projects
None yet
Development

No branches or pull requests

1 participant