Members API
Sign Up (회원가입)
POST
https://younghoonjean.com/api/members/signup/
로컬 계정을 생성하는 회원가입 API입니다. 이메일은 반드시 일반적인 이메일 형식에 맞게 작성되어야 합니다.
Headers
Name | Type | Description |
---|---|---|
Content-Type | string | application/json |
Request Body
Name | Type | Description |
---|---|---|
username | string | input user ID |
password | string | input user password |
last_name | string | input user last name |
first_name | string | input user first name |
string | input user email( ex) test001@gmail.com) | |
phone_number | string | input user phonenumber |
Check Unique Username(ID 중복검사)
POST
https://younghoonjean.com/api/members/checkID/
username 중복검사입니다.
Headers
Name | Type | Description |
---|---|---|
Content-Type | string | application/json |
Request Body
Name | Type | Description |
---|---|---|
username | string | input username you want to check |
Sign in(Login, 로그인)
POST
https://younghoonjean.com/api/members/login/
login에 성공하면 token이 주어집니다.
Headers
Name | Type | Description |
---|---|---|
Content-Type | string | application/json |
Request Body
Name | Type | Description |
---|---|---|
username | string | input username |
password | string | input password |
Soical Sign up&Sign in (소셜 회원가입/로그인)
POST
https://younghoonjean.com/api/members/social-login/
password는 자동 생성됩니다.
Headers
Name | Type | Description |
---|---|---|
Content-Type | string | application/json |
Request Body
Name | Type | Description |
---|---|---|
user_id | string | user_id as username(ID) |
last_name | string | input last name |
first_name | string | input first name |
string | input user email | |
phone_number | string | input phone_number |
User Profile(GET method : 유저 정보 조회)
GET
https://younghoonjean.com/api/members/profile/
회원정보 조회입니다. 로그인 시 전달받은 token값을 Header에 전달해야합니다.
Headers
Name | Type | Description |
---|---|---|
Authorization | string | token <token key> |
User Profile(PATCH method : 유저 정보 수정)
PATCH
https://younghoonjean.com/api/members/profile/
회원정보 수정입니다. 해당 URL로 GET요청을 하여 받은 유저정보를 바탕으로, 수정한 값을 PATCH로 전달합니다. username의 경우는 수정할 경우 Unique Constraint를 발생할 위험이 있으므로, 수정을 막는 편이 좋습니다.
Headers
Name | Type | Description |
---|---|---|
Autorization | string | token <token key> |
Content-Type | string | application/json |
Request Body
Name | Type | Description |
---|---|---|
username | string | input username |
password | string | input password you want to change |
first_name | string | input first name you want to change |
last_name | string | input last name you want to change |
string | input email you want to change | |
phone_number | string | input phone number you want to change |
Logout (Terminate Token, 로그아웃)
DELETE
https://younghoonjean.com/api/members/logout/
로그아웃입니다. Header에 전달한 Token이 파기됩니다.
Headers
Name | Type | Description |
---|---|---|
Autorization | string | token <token key> |
User List
GET
https://younghoonjean.com/api/members/user-list/
등록된 모든 유저 리스트를 보여줍니다.
Check Password(for Profile access)
POST
https://younghoonejean.com/api/memebers/check-password/
Headers
Name | Type | Description |
---|---|---|
Content-Type | string | application/json |
Authorization | string | token <token key> |
Request Body
Name | Type | Description |
---|---|---|
password | string | input user password |
User Account Delete
DELETE
https://younghoonjean.com/api/members/user-delete/
유저 삭제 api 삭제가 완료되면 status.204
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Token <token key> |
GET User Reservation History
GET
https://younghoonjean.com/api/members/reservations/1/
로그인 한 유저의 모든 예매 기록을 가져옵니다.
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Token <token key> |
Cancel User Reservation
PATCH
https://younghoonjean.com/api/members/reservations/<int:pk>/
u유저가 예매한 티켓을 비활성화합니다. int값(예매번호= 티켓 pk값)을 전달받습니다.
Path Parameters
Name | Type | Description |
---|---|---|
reservation pk | integer | ticket number(=reservation instance pk) |
Last updated