{"info":{"_postman_id":"3d906e67-b2fc-4080-876a-4ae3b293b3d4","name":"user","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"8738620","collectionId":"3d906e67-b2fc-4080-876a-4ae3b293b3d4","publishedId":"T1LV9PdQ","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-08-23T05:59:21.000Z"},"item":[{"name":"회원가입","id":"7c60ed00-4d1c-4568-b0ca-bcdc2b37a9bc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\":\"testemail@gmail.com\",\n    \"name\":\"testname\",\n    \"password\":\"testpassword1!\"\n}","options":{"raw":{"language":"json"}}},"url":"http://18.223.188.215:8000/user/signup","description":"<h1 id=\"정의\">정의</h1>\n<p>사용자가 회원가입을 위해 입력한 정보를 받고 해당 정보를 기반으로 회원가입 기능을 수행하는 API입니다.</p>\n<h1 id=\"기능\">기능</h1>\n<p>email, name, password가 json에 key로 반드시 전달되어야 하며\n해당 email을 중복검사, password validation 검사, 비밀번호 암호화 기능을 수행하여 데이터 베이스에 저장합니다.</p>\n<h1 id=\"response\">response</h1>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"SIGNUP_SUCCESS\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"8000","path":["user","signup"],"host":["18","223","188","215"],"query":[],"variable":[]}},"response":[],"_postman_id":"7c60ed00-4d1c-4568-b0ca-bcdc2b37a9bc"},{"name":" 로그인","id":"cff6da99-672b-48a6-b148-312ca0c5ad57","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\":\"john@naver.com\",\n    \"password\":\"a123123!\"\n}","options":{"raw":{"language":"json"}}},"url":"http://18.223.188.215:8000/user/signin","description":"<h1 id=\"정의\">정의</h1>\n<p>사용자로부터 email과 password를 입력받아 해당 정보를 기반으로 로그인 기능을 수행하는 API 입니다.</p>\n<h1 id=\"기능\">기능</h1>\n<p>email, pasword가 json에 반드시 포함되어야 하며, 데이터베이스 저장된 유저정보와 일치하여 로그인이 성공하는 경우 유저의 프로필 이미지 정보와, 유의 id 값을 기반으로 access token을 생성 및 전달합니다.</p>\n<h1 id=\"response\">response</h1>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"access_token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxNjl9.yyeXyvVfztXd00WR9Z3Cc_5a_LJA3tLhwsbXYZgHtb4\",\n    \"profile_url\": \"https://d3sz5r0rl9fxuc.cloudfront.net/assets/default/user/photo_file_name_small-bc8b334acec6a4e386249dedf9e763b5e6aff523fa85cc29211f22e6bed540df.jpg\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"8000","path":["user","signin"],"host":["18","223","188","215"],"query":[],"variable":[]}},"response":[],"_postman_id":"cff6da99-672b-48a6-b148-312ca0c5ad57"},{"name":"댓글 등록 api","id":"3e1b3f19-745a-4aa4-b346-391d3914b558","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxNjl9.yyeXyvVfztXd00WR9Z3Cc_5a_LJA3tLhwsbXYZgHtb4"}],"body":{"mode":"raw","raw":"{\n    \"film_id\":\"189\",\n    \"review_text\" : \"gooo0000000000000000000od\",\n    \"review_rating\":\"2\",\n    \"review_type\" : \"R\"\n}","options":{"raw":{"language":"json"}}},"url":"http://18.223.188.215:8000/user/review","description":"<h1 id=\"정의\">정의</h1>\n<p>영화의 id, 리뷰 내용, 별점점수, 리뷰타입 그리고 유저의 access token 정보를 request로 받아 해당 리뷰를 등록또는 수정하는 api입니다</p>\n<h1 id=\"기능\">기능</h1>\n<p>token정보에서 유저의 id를 추출하여 영화 id정보와 함께 영화테이블과 유저테이블가 형성하는 다대다관계의 중간테이블인 리뷰테이블에 해당 리뷰정보를 등록합니다. 만약 해당 영화id와 유저id를 가지고 있는 리뷰가 존재한다면 기존의 리뷰 내용을 수정합니다.</p>\n<h1 id=\"response\">response</h1>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"POST_REVIEW_SUCCESS\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"8000","path":["user","review"],"host":["18","223","188","215"],"query":[],"variable":[]}},"response":[],"_postman_id":"3e1b3f19-745a-4aa4-b346-391d3914b558"},{"name":"댓글 삭제 api","id":"27856576-6b26-4685-acea-fb2656b38d31","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxMzd9.d--OWiVu3nyjIOC8zOXlrp9IaPwXvKpb46CMebIXThI","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"film_id\":\"72\"\n}","options":{"raw":{"language":"json"}}},"url":"http://18.223.188.215:8000/user/review","description":"<h1 id=\"정의\">정의</h1>\n<p>유저의 access token과 영화 id 정보를 request로 받아 해당 리뷰를 삭하는 api입니다</p>\n<h1 id=\"기능\">기능</h1>\n<p>token정보에서 유저의 id를 추출하여 영화 id정보와 함께 리뷰테이블에서 해당 유저가 쓴 리뷰를 찾는지 확인후 존재하면 삭제합니다.</p>\n<h1 id=\"response\">response</h1>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"NOT_EXISTS_REVIEW\"\n}\n\n{\n    \"message\": \"DELETE_REVIEW_SUCCESS\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"8000","path":["user","review"],"host":["18","223","188","215"],"query":[],"variable":[]}},"response":[],"_postman_id":"27856576-6b26-4685-acea-fb2656b38d31"},{"name":"총 리뷰 갯수 조회","id":"e0d39019-3dfa-4aba-94c1-53a1f9a2a6c9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://18.223.188.215:8000/user/review/count","description":"<h1 id=\"정의\">정의</h1>\n<p>모든 리뷰의 갯수 정보를 조회하는 api입니다.</p>\n<h1 id=\"기능\">기능</h1>\n<p>리뷰테이블에 저장되어있는 모든 리뷰 데이터의 갯수를 count하여 해당 갯수 정보를 전달합니다.</p>\n<h1 id=\"response\">response</h1>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"review_count\": 3190\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"8000","path":["user","review","count"],"host":["18","223","188","215"],"query":[],"variable":[]}},"response":[],"_postman_id":"e0d39019-3dfa-4aba-94c1-53a1f9a2a6c9"},{"name":"리뷰 좋아요 api","id":"f484cc02-9f94-4ceb-9772-46adae867721","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxMzV9.G9KgLUgvdmTM9WeK7O2VLv-wSA2TrnPhxdRGWXShpRI","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"comment_id\":\"11\",\n    \"like_count\": \"12\"\n}","options":{"raw":{"language":"json"}}},"url":"http://18.223.188.215:8000/user/review/like","description":"<h1 id=\"정의\">정의</h1>\n<p>특정 리뷰에 대해 좋아요 버튼 클릭시 해당 리뷰의 좋아요 갯수를 업데이트하는 api 입니다.</p>\n<h1 id=\"기능\">기능</h1>\n<p>access token, 리뷰의 id, 리뷰의 좋아요 갯수 정보를 전달받아 해당 리뷰의 좋아요 갯수를 업데이트합니다. 이때 access token이 전달되지 않거나 해당 유저 정보가 없는 경우 좋아요 기능을 수행할 권리가 없으므로 업데이트를 수행하지 못합니다.</p>\n<h1 id=\"response\">response</h1>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"NOT_EXISTS_REVIEW\"\n}\n\n{\n    \"message\": \"COMMENT_LIKE_SUCCESS\"\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"8000","path":["user","review","like"],"host":["18","223","188","215"],"query":[],"variable":[]}},"response":[],"_postman_id":"f484cc02-9f94-4ceb-9772-46adae867721"},{"name":"토큰으로 유저 정보 조회","id":"f2cf70a2-6df2-4b1e-a30e-3f6200dfec69","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxNDB9.jXa0jKfGWg0DUmR3hFG19Uq31JMPNx_cNbIqQc4lPlU","type":"text"}],"body":{"mode":"raw","raw":""},"url":"http://18.223.188.215:8000/user/info","description":"<h1 id=\"정의\">정의</h1>\n<p>유저 토큰 정보를 기반으로 해당 유저의 정보를 데이터베이스에서 조회하는 api 입니다.</p>\n<h1 id=\"기능\">기능</h1>\n<p>유저 토큰 정보를 기반으로 해당 유저의 정보를 데이터베이스에서 조회하여, 유저의 이름, 프로필사진, 해당 유저가 작성한 리뷰정보를 전달합니다. </p>\n<h1 id=\"response\">response</h1>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"user_name\": \"ryu\",\n    \"user_profile\": \"https://1.gall-gif.com/tdgall/files/attach/images/82/975/415/073/3ee8b49e9f78561a86f0beaee786a4d0.gif\",\n    \"user_review_films\": [\n        {\n            \"film_id\": 1,\n            \"title\": \"명량\",\n            \"rating\": \"4.5\",\n            \"poster_url\": \"https://dhgywazgeek0d.cloudfront.net/watcha/image/upload/c_fill,h_400,q_80,w_280/v1466141792/ily8rsxuqw98pdd1b7cv.jpg\"\n        },\n        {\n            \"film_id\": 2,\n            \"title\": \"극한직업\",\n            \"rating\": \"3.5\",\n            \"poster_url\": \"https://dhgywazgeek0d.cloudfront.net/watcha/image/upload/c_fill,h_400,q_80,w_280/v1547742906/dqcjjakz78fkti41ynw3.jpg\"\n        },\n        {\n            \"film_id\": 3,\n            \"title\": \"신과함께-죄와 벌\",\n            \"rating\": \"4.0\",\n            \"poster_url\": \"https://dhgywazgeek0d.cloudfront.net/watcha/image/upload/c_fill,h_400,q_80,w_280/v1512525324/vpkx11sjxbspgpqedl14.jpg\"\n        },\n        {\n            \"film_id\": 67,\n            \"title\": \"늑대소년\",\n            \"rating\": \"5.0\",\n            \"poster_url\": \"https://dhgywazgeek0d.cloudfront.net/watcha/image/upload/c_fill,h_400,q_80,w_280/v1466086997/uiog2oinyldfuvoengg0.jpg\"\n        },\n        {\n            \"film_id\": 76,\n            \"title\": \"미션 임파서블: 로그네이션\",\n            \"rating\": \"5.0\",\n            \"poster_url\": \"https://dhgywazgeek0d.cloudfront.net/watcha/image/upload/c_fill,h_400,q_80,w_280/v1466143079/enwdxupabp9esjdaxy38.jpg\"\n        },\n        {\n            \"film_id\": 80,\n            \"title\": \"인셉션\",\n            \"rating\": \"5.0\",\n            \"poster_url\": \"https://dhgywazgeek0d.cloudfront.net/watcha/image/upload/c_fill,h_400,q_80,w_280/v1578965504/apfhyvzm1318qu0ihejc.jpg\"\n        },\n        {\n            \"film_id\": 81,\n            \"title\": \"레미제라블\",\n            \"rating\": \"5.0\",\n            \"poster_url\": \"https://dhgywazgeek0d.cloudfront.net/watcha/image/upload/c_fill,h_400,q_80,w_280/v1466080740/mlmdji4p1kohgofwo5fd.jpg\"\n        },\n        {\n            \"film_id\": 82,\n            \"title\": \"쉬리\",\n            \"rating\": \"5.0\",\n            \"poster_url\": \"https://dhgywazgeek0d.cloudfront.net/watcha/image/upload/c_fill,h_400,q_80,w_280/v1466065534/fix4a3kgiytzsgcq0xf5.jpg\"\n        },\n        {\n            \"film_id\": 83,\n            \"title\": \"캡틴 마블\",\n            \"rating\": \"5.0\",\n            \"poster_url\": \"https://dhgywazgeek0d.cloudfront.net/watcha/image/upload/c_fill,h_400,q_80,w_280/v1551072024/oqcnscdjfixr2zzuzbvc.jpg\"\n        },\n        {\n            \"film_id\": 84,\n            \"title\": \"미션 임파서블 3\",\n            \"rating\": \"5.0\",\n            \"poster_url\": \"https://dhgywazgeek0d.cloudfront.net/watcha/image/upload/c_fill,h_400,q_80,w_280/v1466064590/v3f0rlskgnkbznkaj0ao.jpg\"\n        }\n    ]\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"8000","path":["user","info"],"host":["18","223","188","215"],"query":[],"variable":[]}},"response":[],"_postman_id":"f2cf70a2-6df2-4b1e-a30e-3f6200dfec69"}]}