Develope http-streaming-server
(2020/05/18 ~ 2020/05/27)
-
users
-
Get/
./users/ -
Response JSON about all of users
-
Get/
./users/:id/ -
Response JSON about a user
-
Post/
./users/ -
Register a user ( Inster a user )
-
Put/
./users/ -
Update data of a user
-
Delete/
./users/ -
Delete a user
- Post/
./users/auth/ - Check authorization(login) of a user
- Android 에서 테스트 완료
-
-
contents ( image or video )
( 2020/05/28 ~ 2020/06/03 )
-
capsules
-
Get/
./capsules/ -
Response JSON about all of Capsules
-
Get/
./capsules/capsuleID -
Response JSON about a Capsule
-
Get/
./capsules/location?lat=__&lng=__ -
Response Json about capsules within 5KM
-
Get/
./capsules/user?user_id=__ -
Response Json about capsules of a user
-
Post/
./capsules -
Post a capsule temporarily
-
Put/
./capsules -
Complete a posted capsule
-
with multipart/form-data
- 결과
-
Delete/
./capsules -
Delete all about a capsule
- 결과
-
( 2020/7/5 ~ 2020/7/8 )
-
Post/
./follow/- user's follow is added 1
- dest's follwer is added 1
- create a row of follow table in DB
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
{
"nick_name" : "__",
"dest_nick_name" : "__"
} [
{
nick_name: "nick11",
first_name: "민성",
last_name: "박",
date_created: "2020-06-14T19:17:46.000Z",
date_updated: "2020-06-14T19:17:46.000Z",
follow: 1,
follower: 0,
image_url: "http://118.44.168.218:7070/contents/1592162266492.jpg",
image_name: "1592162266492.jpg"
},
{
...
},
{
...
}
]-
Delete/
./follow?nick_name="__"&dest_nick_name="__"- user's follow is subtracted 1
- dest's follower is subtracted 1
- delete a row of follow table in DB
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/like?nick_name="__"&dest_nick_name="__"{
"success": true
}-
Post/
./like/- like of the capsule of user is added 1
- create a row of like table in DB
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
{
"capsule_id" : __,
"nick_name" : "__"
}{
"success": true
}-
Delete/
./like?capsule_id=__&nick_name="__"- like of the capsule of user is subtracted 1
- delete a row of like table in DB
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/like?capsule_id=__&nick_name="__"
{
"success": true
}( 2020/7/8 ~ 2020/7/10 )
-
Get/
./follow/followlist/:nickName- response followlist of A user has nickName
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/follow/followlist/"Input the Nick"
[
{
nick_name: "nick11",
first_name: "민성",
last_name: "박",
date_created: "2020-06-14T19:17:46.000Z",
date_updated: "2020-06-14T19:17:46.000Z",
follow: 1,
follower: 0,
image_url: "http://118.44.168.218:7070/contents/1592162266492.jpg",
image_name: "1592162266492.jpg"
},
{
...
},
{
...
}
]-
Get/
./follow/followerlist/:nickName- response followerlist of A user has nickName
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/follow/followerlist/"Input the Nick"
[
{
nick_name: "nick11",
first_name: "민성",
last_name: "박",
date_created: "2020-06-14T19:17:46.000Z",
date_updated: "2020-06-14T19:17:46.000Z",
follow: 1,
follower: 0,
image_url: "http://118.44.168.218:7070/contents/1592162266492.jpg",
image_name: "1592162266492.jpg"
},
{
...
},
{
...
}
]-
Get/
./capsules/nick/:nickName- response capsulelist of A user has nickName
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/capsule/nick/"Input the Nick"
[
{
capsule_id: 63,
user_id: "hhheum",
nick_name: "nick12",
title: "hhh",
text: "hhh",
likes: 0,
views: 0,
date_created: "2020-07-07T13:37:01.000Z",
date_opened: "2020-07-07T13:37:01.000Z",
status_temp: 0,
lat: 56,
lng: 100,
content: [
{
content_id: null,
url: null
}
]
},
{
capsule_id: 62,
user_id: "hhheum",
nick_name: "nick12",
title: "소영이랑 첫 여행!!",
text: "소영이랑 첫 여행으로 부산에 캡슐!! 너무 더워서 기억에 남던 여행~~ 다음에 올때는 우리가 어떻게 달라져있을지 궁금하다~~",
likes: 0,
views: 0,
date_created: "2020-07-01T05:22:17.000Z",
date_opened: "2020-07-01T05:22:17.000Z",
status_temp: 0,
lat: 35.1567,
lng: 129.1524,
content: [
{
content_id: 58,
url: "http://118.44.168.218:7070/contents/1593581760709.jpg"
},
{
content_id: 59,
url: "http://118.44.168.218:7070/contents/1593581760717.jpg"
}
]
}
]-
Post/
./capsules- Post a capsule stored temporally
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
{
"nick_name" : "__",
"lat": __,
"lng": __
}{
"success": true
}-
Get/
./comment/list/:capsule_id- response list of comments
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/comment/list/"Input the Capsule Id"
[
{
nick_name: "nick12",
comment: "comment Test1",
date_created: "2020-07-09T15:44:27.000Z",
date_updated: "2020-07-09T15:44:27.000Z",
replies: [ ]
},
{
nick_name: "nick12",
comment: "comment Test2",
date_created: "2020-07-09T15:44:31.000Z",
date_updated: "2020-07-09T15:44:31.000Z",
replies: [
{
nick_name: "nick12",
comment: "comment Test9",
date_created: "2020-07-09T15:46:13.000Z",
date_updated: "2020-07-09T15:46:13.000Z"
}
]
},
{
nick_name: "nick12",
comment: "comment Test3",
date_created: "2020-07-09T15:44:33.000Z",
date_updated: "2020-07-09T15:44:33.000Z",
replies: [ ]
},
{
nick_name: "nick12",
comment: "comment Test4",
date_created: "2020-07-09T15:44:36.000Z",
date_updated: "2020-07-09T15:44:36.000Z",
replies: [
{
nick_name: "nick12",
comment: "comment Test6",
date_created: "2020-07-09T15:46:01.000Z",
date_updated: "2020-07-09T15:46:01.000Z"
},
{
nick_name: "nick12",
comment: "comment Test7",
date_created: "2020-07-09T15:46:05.000Z",
date_updated: "2020-07-09T15:46:05.000Z"
},
{
nick_name: "nick12",
comment: "comment Test8",
date_created: "2020-07-09T15:46:08.000Z",
date_updated: "2020-07-09T15:46:08.000Z"
}
]
},
{
nick_name: "nick12",
comment: "comment Test5",
date_created: "2020-07-09T15:44:40.000Z",
date_updated: "2020-07-09T15:44:40.000Z",
replies: [ ]
}
]-
Post/
./comment- Create a Comment
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
- case 1 (Parent Comment)
{
"user_id" : "__",
"capsule_id" : __,
"nick_name" : "__",
"conmment": ""
}- case 2 (Child Comment : reply)
{
"user_id" : "__",
"capsule_id" : __,
"nick_name" : "__",
"conmment": "",
"parent_id": __
}{
"success": true
}-
Delete/
./comment/:id- Delete a Comment
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/comment/"Input the Comment ID"{
"success": true
}-
Delete/
./comment/reply/:id- Delete a Reply
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/comment/reply/"Input the Comment ID"{
"success": true
}-
Post/
./users/auth- Post authrization info
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
{
"user_id": "__",
"password": __,
}{
"nick_name": "__"
}(2020/07/11 ~ 2020/7/26)
- Update Get-Comment-list Router(Add user_image_url) and Post-Comment,Reply (delete user_id)
- Update Get-capsules Router (with location, with nick_name, with capsule id)
- Add Session Router (Restful server and android app)
- Add Logout Router (Destroy Session)
-
Get/
./comment/list/:capsule_id- response list of comments
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/comment/list/"Input the Capsule Id"
[
{
nick_name: "nick11",
comment: "Test1",
date_created: "2020-07-15T11:49:04.000Z",
date_updated: "2020-07-15T11:49:04.000Z",
user_image_url: "http://211.248.58.81:7070/contents/1592162266492.jpg",
replies: [
{
nick_name: "nick11",
comment: "Test5",
date_created: "2020-07-15T11:49:39.000Z",
date_updated: "2020-07-15T11:49:39.000Z",
user_image_url: "http://211.248.58.81:7070/contents/1592162266492.jpg"
},
{
nick_name: "nick11",
comment: "Test6",
date_created: "2020-07-15T11:49:43.000Z",
date_updated: "2020-07-15T11:49:43.000Z",
user_image_url: "http://211.248.58.81:7070/contents/1592162266492.jpg"
},
{
nick_name: "nick11",
comment: "Test7",
date_created: "2020-07-15T11:49:46.000Z",
date_updated: "2020-07-15T11:49:46.000Z",
user_image_url: "http://211.248.58.81:7070/contents/1592162266492.jpg"
},
{
nick_name: "nick12",
comment: "Test10",
date_created: "2020-07-15T11:50:10.000Z",
date_updated: "2020-07-15T11:50:10.000Z",
user_image_url: "http://211.248.58.81:7070/contents/1592162405325.jpg"
},
{
nick_name: "nick11",
comment: "Test8",
date_created: "2020-07-15T11:49:52.000Z",
date_updated: "2020-07-15T11:49:52.000Z",
user_image_url: "http://211.248.58.81:7070/contents/1592162266492.jpg"
},
{
nick_name: "nick13",
comment: "Test10",
date_created: "2020-07-15T11:50:16.000Z",
date_updated: "2020-07-15T11:50:16.000Z",
user_image_url: "http://211.248.58.81:7070/contents/1592162490258.jpg"
}
]
},
{
nick_name: "nick11",
comment: "Test2",
date_created: "2020-07-15T11:49:06.000Z",
date_updated: "2020-07-15T11:49:06.000Z",
user_image_url: "http://211.248.58.81:7070/contents/1592162266492.jpg",
replies: [ ]
},
{
nick_name: "nick11",
comment: "Test3",
date_created: "2020-07-15T11:49:09.000Z",
date_updated: "2020-07-15T11:49:09.000Z",
user_image_url: "http://211.248.58.81:7070/contents/1592162266492.jpg",
replies: [
{
nick_name: "nick11",
comment: "Test9",
date_created: "2020-07-15T11:49:59.000Z",
date_updated: "2020-07-15T11:49:59.000Z",
user_image_url: "http://211.248.58.81:7070/contents/1592162266492.jpg"
}
]
}
]-
Post/
./comment- Create a Comment
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
- case 1 (Parent Comment)
{
"capsule_id" : __,
"nick_name" : "__",
"conmment": ""
}- case 2 (Child Comment : reply)
{
"capsule_id" : __,
"nick_name" : "__",
"conmment": "",
"parent_id": __
}{
"success": true
}-
Put/
./capsules/lock- Put a capsule
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
-
Unauthorized user Response : Header with Code 401
{
"capsule_id" : __,
"text": "__",
"title": "__",
"expire": "YYYY-MM-DD hh:mm:ss",
"members": [
"friend1_nick",
"friedn2_nick"
]
}{
"success": true
}-
Put/
./capsules/lock/images- Put a capsule with image
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
-
Unauthorized user Response : Header with Code 401
@multipart
"capsule_id" : __,
"text": "__",
"title": "__",
"expire": "YYYY-MM-DD hh:mm:ss",
"members": [
"friend1_nick",
"friedn2_nick"
]
"file":{
"success": true
}-
Get/
./comment/list/:capsule_id- response nick_name if session in header is valid;
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/comment/list/"Input the Capsule Id"
{
"nick_name": "__"
}-
Post/
./users/logout- Logout user's session
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
{
"success": "__"
}(2020/07/27 ~ 2020/8/10)
- Update Get-capsule with location (Add sharedCapsuleUser Members)
- Update Get-capsule with nick_name (Add sharedCapsuleUser Members)
- Update Get-capsule with capsule_id (Get -> Post, etc..)
- Add Get-follow with follow for follow Member
- Add Get-capsule with follow for follow Member
- Add Get-capsule with follow Member
- Add Get-capsule with follower Member
- Add Post-capsule for Using key to open lockedCapsule
-
Get/
./capsules/location?lnt=__&lat=__- Response capsules within 100 meter
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/capsules/location?lnt=__&lat=__
[
{
capsule_id: 89,
nick_name: "nick14",
title: null,
text: null,
likes: 0,
views: 0,
date_created: "2020-07-27T07:08:27.000Z",
date_opened: "2020-07-27T07:08:27.000Z",
status_temp: 1,
location: {
x: 13.0000001,
y: 13
},
expire: null,
status_lock: 0,
key_count: 0,
used_key_count: 0,
members: [ ]
},
{
capsule_id: 87,
nick_name: "nick14",
title: "lockTest1",
text: "lockTest1",
likes: 0,
views: 0,
date_created: "2020-07-27T06:57:16.000Z",
date_opened: "2020-07-27T06:57:16.000Z",
status_temp: 0,
location: {
x: 13.0000001,
y: 13.0000001
},
expire: "2020-12-12T02:11:11.000Z",
status_lock: 1,
key_count: 2,
used_key_count: 0,
members: [
{
nick_name : "nick16",
status_key : 1
},
{
nick_name : "nick17",
status_key : 1
}
]
}
]-
Get/
./capsules/nick/:nickName- Response capsulelist of A user has nickName
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/capsules/nick/"Input the nick"
[
{
capsule_id: 88,
user_id: "mingso0",
nick_name: "nick14",
title: "lockTest1",
text: "lockTest1",
likes: 0,
views: 0,
date_created: "2020-07-27T07:08:22.000Z",
date_opened: "2020-07-27T07:08:22.000Z",
status_temp: 0,
lat: 13.0000002,
lng: 13.0000001,
expire: "2020-12-12T02:11:11.000Z",
status_lock: 1,
key_count: 3,
used_key_count: 0,
content: [ ],
members: [
"nick16",
"nick17",
"nick18"
]
},
{
capsule_id: 84,
user_id: "mingso0",
nick_name: "nick14",
title: "lockTest1",
text: "lockTest1",
likes: 0,
views: 0,
date_created: "2020-07-20T12:15:34.000Z",
date_opened: "2020-07-20T12:15:34.000Z",
status_temp: 0,
lat: 37.6057548522949,
lng: 127.009429931641,
expire: null,
status_lock: 0,
key_count: 0,
used_key_count: 0,
content: [ ],
members: [
"nick16",
"nick17",
"nick18"
]
}
]- Post/
./capsules/id- Response a capsule has this capsule_id including whether a user has Nick_name likes this capsule
- Success Response : Header with Code 200
- Fail Response : Header with Code 404
{
capsule_id: __,
nick_name: "__"
}{
capsule_id: 84,
user_id: "mingso0",
nick_name: "nick14",
title: "lockTest1",
text: "lockTest1",
likes: 0,
views: 0,
date_created: "2020-07-20T12:15:34.000Z",
date_opened: "2020-07-20T12:15:34.000Z",
status_temp: 0,
lat: 37.6057548522949,
lng: 127.009429931641,
expire: "2020-12-12T02:11:11.000Z",
status_lock: 1,
key_count: 3,
used_key_count: 0,
like_flag: 1,
content: [ ],
members: [
{
nick_name : "nick16",
status_key : 1
},
{
nick_name : "nick17",
status_key : 1
},
{
nick_name : "nick18",
status_key : 1
},
{
nick_name : "nick14",
status_key : 1
}
]
}-
Get/
./follow/forfollow/list/:nickName- Response list of users who have f4f relation with a user has nickName
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/capsules/nick/"Input the nick"
[
{
nick_name: "nini22",
first_name: "민성",
last_name: "박",
date_created: "2020-06-14T19:17:46.000Z",
date_updated: "2020-07-19T02:56:31.000Z",
follow: 1,
follower: 1,
image_url: "http://59.13.134.140:7070/contents/1592162266492.jpg",
image_name: "1592162266492.jpg"
},
{
nick_name: "nick13",
first_name: "세종",
last_name: "김",
date_created: "2020-06-14T19:21:30.000Z",
date_updated: "2020-06-14T19:21:30.000Z",
follow: 1,
follower: 1,
image_url: "http://59.13.134.140:7070/contents/1592162490258.jpg",
image_name: "1592162490258.jpg"
}
]-
Get/
./capsules/f4f/:nickName- Response list of capsules which friends made
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/capsules/nick/"Input the nick"
[
{
capsule_id: 33,
user_id: "x_sungjun_x",
nick_name: "nick15",
title: "당일치기 제주도 !!",
text: "소영이랑 첫 여행으로 부산에 캡슐!! 너무 더워서 기억에 남던 여행~~ 다음에 올때는 우리가 어떻게 달라져있을지 궁금하다~",
likes: 0,
views: 0,
date_created: "2020-06-14T19:49:07.000Z",
date_opened: "2020-06-14T19:49:07.000Z",
status_temp: 0,
lat: 37.431,
lng: 126.6801,
expire: null,
status_lock: 0,
key_count: 0,
used_key_count: 0,
content: [ ],
members: [ ]
},
{
capsule_id: 24,
user_id: "x_sungjun_x",
nick_name: "nick15",
title: "당일치기 제주도 !!",
text: "소영이랑 첫 여행으로 부산에 캡슐!! 너무 더워서 기억에 남던 여행~~ 다음에 올때는 우리가 어떻게 달라져있을지 궁금하다~",
likes: 0,
views: 0,
date_created: "2020-06-14T19:28:57.000Z",
date_opened: "2020-06-14T19:28:57.000Z",
status_temp: 0,
lat: 37.5382,
lng: 126.9772,
expire: null,
status_lock: 0,
key_count: 0,
used_key_count: 0,
content: [
{
content_id: 47,
url: "http://59.13.134.140:7070/contents/1592162947453.jpg"
}
],
members: [ ]
}
]-
Get/
./capsules/follow/:nickName- Response list of capsules which a user of follow-list-members made
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/capsules/follow/"Input the nick"
[
{
capsule_id: 33,
user_id: "x_sungjun_x",
nick_name: "nick15",
title: "당일치기 제주도 !!",
text: "소영이랑 첫 여행으로 부산에 캡슐!! 너무 더워서 기억에 남던 여행~~ 다음에 올때는 우리가 어떻게 달라져있을지 궁금하다~",
likes: 0,
views: 0,
date_created: "2020-06-14T19:49:07.000Z",
date_opened: "2020-06-14T19:49:07.000Z",
status_temp: 0,
lat: 37.431,
lng: 126.6801,
expire: null,
status_lock: 0,
key_count: 0,
used_key_count: 0,
content: [ ],
members: [ ]
},
{
capsule_id: 24,
user_id: "x_sungjun_x",
nick_name: "nick15",
title: "당일치기 제주도 !!",
text: "소영이랑 첫 여행으로 부산에 캡슐!! 너무 더워서 기억에 남던 여행~~ 다음에 올때는 우리가 어떻게 달라져있을지 궁금하다~",
likes: 0,
views: 0,
date_created: "2020-06-14T19:28:57.000Z",
date_opened: "2020-06-14T19:28:57.000Z",
status_temp: 0,
lat: 37.5382,
lng: 126.9772,
expire: null,
status_lock: 0,
key_count: 0,
used_key_count: 0,
content: [
{
content_id: 47,
url: "http://59.13.134.140:7070/contents/1592162947453.jpg"
}
],
members: [ ]
}
]-
Get/
./capsules/follow/:nickName- Response list of capsules which a user of follower-list-members made
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
http://address:port/capsules/follower/"Input the nick"
[
{
capsule_id: 33,
user_id: "x_sungjun_x",
nick_name: "nick15",
title: "당일치기 제주도 !!",
text: "소영이랑 첫 여행으로 부산에 캡슐!! 너무 더워서 기억에 남던 여행~~ 다음에 올때는 우리가 어떻게 달라져있을지 궁금하다~",
likes: 0,
views: 0,
date_created: "2020-06-14T19:49:07.000Z",
date_opened: "2020-06-14T19:49:07.000Z",
status_temp: 0,
lat: 37.431,
lng: 126.6801,
expire: null,
status_lock: 0,
key_count: 0,
used_key_count: 0,
content: [ ],
members: [ ]
},
{
capsule_id: 24,
user_id: "x_sungjun_x",
nick_name: "nick15",
title: "당일치기 제주도 !!",
text: "소영이랑 첫 여행으로 부산에 캡슐!! 너무 더워서 기억에 남던 여행~~ 다음에 올때는 우리가 어떻게 달라져있을지 궁금하다~",
likes: 0,
views: 0,
date_created: "2020-06-14T19:28:57.000Z",
date_opened: "2020-06-14T19:28:57.000Z",
status_temp: 0,
lat: 37.5382,
lng: 126.9772,
expire: null,
status_lock: 0,
key_count: 0,
used_key_count: 0,
content: [
{
content_id: 47,
url: "http://59.13.134.140:7070/contents/1592162947453.jpg"
}
],
members: [ ]
}
]-
Post/
./capsules/lock/key- Use key to open LockedCapsule
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
-
Unauthorized user Response : Header with Code 401
{
"nick_name" : "__",
"capsule_id" : __
}{
"success": true
}-
Put/
./users/image/nick- Put a user with image
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
-
Unauthorized user Response : Header with Code 401
@multipart
{
"pre_nick_name": "__",
"new_nick_name": "__",
"file": __
}{
"success": "__"
}-
Put/
./users/nick- Put a user with nick name
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
-
Unauthorized user Response : Header with Code 401
{
"pre_nick_name": "__",
"new_nick_name": "__"
}{
"success": "__"
}-
Put/
./users/only/image- Put image of a user
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
-
Unauthorized user Response : Header with Code 401
@multipart
{
"nick_name": "__",
"file": __
}{
"success": "__"
}-
Put/
./users/nick- Put a user with password
-
Success Response : Header with Code 200
-
Fail Response : Header with Code 404
-
Unauthorized user Response : Header with Code 401
{
"nick_name": "__",
"password": "__"
}{
"success": "__"
}















