Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

REST API 인터페이스 #1

Description

@allieus
1. 새 유저 등록
/users/ (POST)
- 페이스북 로그인하고 나서 호출
- 기존 존재하면, 무시

$ curl -X POST -d uid=1234567890 -d name="Chinseok Lee" -d profile_image_url=http://example.com/profile.png -d email=allieuslee@gmail.com http://localhost:8000/survey/v1/users/


2. 유저 정보 변경
/users/\d+/ (PUT)
- name, profile_image_url, email 변경

$ curl -X PUT -d name="Chinseok Lee" -d profile_image_url=http://example.com/profile.png -d email=allieuslee@gmail.com http://localhost:8000/survey/v1/users/1234567890/


3. 현재 활성화된 이벤트 목록 요청
/events/ (GET)

$ curl -X GET http://localhost:8000/survey/v1/events/
[{"begin": "2015-03-22T05:43:03Z", "props": null, "end": "2015-03-22T05:43:05Z", "id": 1, "name": "GDG 컨퍼런스"}]


4. 특정 이벤트에 대한 정보 요청
/events/\d+/ (GET)
 - 이벤트명
 - 각종 질문 리스트

$ curl -X GET http://localhost:8000/survey/v1/events/1/
{"begin": "2015-03-22T05:43:03Z", "props": null, "end": "2015-03-22T05:43:05Z", "id": 1, "name": "GDG 컨퍼런스"}


5. 이벤트 신청

URL 형식 : /events/\d+/users/new/ (POST)
request> curl -X POST -d event=1 -d user=1 -d props="[1, 2, 3, 4, 5]"  http://localhost:8000/survey/v1/events/1/users/


6. 이벤트 신청내용 조회
- 모든 입력 내용 및 승인 여부

URL 형식 : /events/\d+/users/\d+/ (GET)
request> curl -X GET http://localhost:8000/survey/v1/events/1/users/12341234/
{"is_approved": false, "props": [1, 2, 3, 4, 5, 6]}%


7. 이벤트 신청내용 수정
URL 형식 : /events/\d+/users/\d+/ (PUT)
request> curl -X PUT -d props="[1, 2, 3, 4, 5, 6]"  http://localhost:8000/survey/v1/events/1/users/12341234/


8. 이벤트 신청 삭제
URL 형식 : /events/\d+/users/\d+/ (DELETE)
request> curl -X DELETE http://localhost:8000/survey/v1/events/1/users/12341234/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions