Skip to content

dlsrb6342/Kinggowarts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๋ฐฐํฌํŒŒ์ผ

1. ์ฃผ์†Œ

https://drive.google.com/drive/folders/0B7qbRQX6_VNxd0NabjNpSXAzRHc?usp=sharing

2. ์‹คํ–‰๋ฐฉ๋ฒ•

  1. cmd ์ฐฝ์—์„œ tomcat/bin/startup.bat ์‹คํ–‰
  2. locathost:8082/kinggowarts ์ ‘์†

3. ์ƒˆ๋กœ์šด ๋ฐฐํฌํŒŒ์ผ๋กœ ๋ฐ”๊พธ๊ธฐ

  1. ์œ„ ๋งํฌ์—์„œ ์ตœ์‹ ์˜ ๋ฐฐํฌํŒŒ์ผ์„ ๋ฐ›๋Š”๋‹ค. (kinggowartsXXXX_X.zip)
  2. ์••์ถ•์„ ํ’€๋ฉด kinggowarts.war๊ฐ€ ๋‚˜์˜จ๋‹ค.
  3. tomcat/webapps ์—์„œ kinggowarts ํด๋”์™€ kinggowarts.war๋ฅผ ์ง€์šด๋‹ค.
  4. ์ƒˆ๋กœ์šด kinggowarts.war๋ฅผ tomcat/webapps ์— ๋„ฃ์–ด์ค€๋‹ค.
  5. ํ†ฐ์บฃ ์‹คํ–‰

4. ๋กœ์ปฌ Xwiki

๋กœ์ปฌ ํ†ฐ์บฃ์—๋Š” ๋กœ์ปฌ XWiki ๋˜ํ•œ ํฌํ•จ๋˜์–ด์žˆ๋‹ค. ์ด๋Š” ์šด์˜(fanatic1.~)์˜ XWiki์™€ ๋™์ผํ•œ DB์ด์ง€๋งŒ ๋กœ์ปฌ์„œ๋ฒ„์—์„œ ๋Œ์•„๊ฐ„๋‹ค.

๋กœ์ปฌ์ฃผ์†Œ/xwiki ๋กœ ๋“ค์–ด๊ฐ€๋ฉด ๋กœ์ปฌ์˜ XWiki๊ฐ€ ์ดˆ๊ธฐํ™”๋œ๋‹ค. ์„œ๋ฒ„ ์žฌ์‹œ์ž‘์„ ํ• ๋•Œ ํ•œ๋ฒˆ ๋“ค์–ด๊ฐ€์„œ XWiki๋ฅผ ์ดˆ๊ธฐํ™” ํ•ด์ค˜์•ผ ํ•œ๋‹ค.

์ด๋ฅผ ํ†ตํ•ด ๋กœ์ปฌ์„œ๋ฒ„์—์„œ๋„ XWiki ๋กœ๊ทธ์ธ์„ ๋ฐ ์ ‘์†์ด ๊ฐ€๋Šฅํ•˜๋‹ค.(๋กœ์ปฌ XWiki๋ฅผ ์ด์šฉํ•˜์ง€ ์•Š์œผ๋ฉด CORS๋ฌธ์ œ๊ฐ€ ์ƒ๊ธด๋‹ค.)

5. ๊ธฐํƒ€

  • ํฌํŠธ๋ฒˆํ˜ธ ๋ณ€๊ฒฝ์€ tomcat/conf/server.xml ์˜ 8082 ๋ผ ๋˜์–ด์žˆ๋Š” ๋ถ€๋ถ„์„ ๋ฐ”๊พธ๋ฉด ๋จ
  • ์บ์‹ฑ ์˜ต์…˜์„ ๋„๊ธฐ ์œ„ํ•ด์„œ๋Š” tomcat/conf/context.xml ํŒŒ์ผ์˜ context ํƒœ๊ทธ๋ฅผ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ˆ˜์ •ํ•ด์ค€๋‹ค.(static ํŒŒ์ผ๋งŒ ํ•ด๋‹น)
<Context cacheMaxSize="0" cacheTTL="0" cachingAllowed="false"/>

ํ”„๋ก ํŠธ์—”๋“œ

1. ์‹คํ–‰๋ฐฉ๋ฒ•

  1. ์œ„์˜ ๋ฐฐํฌํŒŒ์ผ์˜ ๊ฒฝ์šฐ ํ†ฐ์บฃ์„ ์‹คํ–‰ํ•œ ํ›„ ์ƒ์„ฑ๋˜๋Š” tomcat/webapps/kinggowarts/WEB-INF/classes/static์œผ๋กœ, github ๊ฒฝ๋กœ๋Š” Kinggowarts/src/main/resources/static๋กœ ๊ฐ„๋‹ค.
  2. npm install์„ ์ž…๋ ฅํ•˜์—ฌ gulp api๋“ค์„ ๋ฐ›๋Š”๋‹ค.
  3. static/src๊ฒฝ๋กœ๋กœ ์ด๋™, gulp install์„ ์ž…๋ ฅํ•˜์—ฌ bower_components๋กœ ํ•„์š”ํ•œ ํ”„๋ก ํŠธ์—”๋“œ api๋ฅผ ๋ฐ›๋Š”๋‹ค.
  4. gulpfile.js๊ฐ€ ์žˆ๋Š” static ๊ฒฝ๋กœ๋กœ ๋‹ค์‹œ ์ด๋™ํ•˜์—ฌ gulp watch๋ฅผ ์ž…๋ ฅํ•œ๋‹ค. (js๋‚˜ css๊ฐ€ ๋ณ€ํ™”๋  ๊ฒฝ์šฐ ์ž๋™์œผ๋กœ injectํ•œ๋‹ค.)

2. Api ์„ค์น˜ ๋ฐฉ๋ฒ•

npm install --save๋กœ ์„ค์น˜๋˜๋Š” api๋“ค์€ ๋ชจ๋‘ nodejs ๋ชจ๋“ˆ์ด๊ธฐ ๋•Œ๋ฌธ์— ์šฐ๋ฆฌ๋Š” gulp๋ฅผ ์‹คํ–‰ํ• ๋•Œ๋งŒ ์‚ฌ์šฉํ•œ๋‹ค.
๋”ฐ๋ผ์„œ bower install --save๋ฅผ ์ด์šฉํ•˜์—ฌ bower ๋ชจ๋“ˆ๋กœ์จ ์„ค์น˜ํ•ด์•ผ ํ•œ๋‹ค. 
์ด ๋•Œ, --save๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ์„ค์น˜ํ•œ ๋ชจ๋“ˆ์ด ์ž๋™์œผ๋กœ ์ตœ์‹ ๋ฒ„์ ผ ๊ธฐ์ค€์œผ๋กœ bower.json์— ๊ธฐ๋ก๋˜์–ด ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค์€ bower install๋งŒ ์ž…๋ ฅํ•˜๋ฉด ๋œ๋‹ค. 
๋ฌผ๋ก  ์ด ๋•Œ bower.json์ด ์žˆ๋Š” ๊ฒฝ๋กœ์—์„œ bower install --save๋ฅผ ์ž…๋ ฅํ•ด์•ผ ํ•œ๋‹ค.

RESTful API ๋ช…์„ธ

1. ๋กœ๊ทธ์ธ

  • ์ฃผ์†Œ: /api/auth/login
  • HTTP Method: POST
  • Description: ๋กœ๊ทธ์ธ ์š”์ฒญ
  • Request Type: form data
  • Request Value
 username: ์œ ์ € ์•„์ด๋””(์ด๋ฉ”์ผ)   
 password: ๋น„๋ฐ€๋ฒˆํ˜ธ
  • Response Types: JSON

  • Response Value:

{
  "userId": "[email protected]",/*์œ ์ € ์•„์ด๋””*/
  "memberSeq": 51,/*์œ ์ € ๊ฐœ์ธํ‚ค*/
  "authorities": [
    {
      "authority": "ROLE_GUEST"
    }
  ],/*๊ถŒํ•œ์ •๋ณด(๊ต์ˆ˜๊ฐ€ ์—†์œผ๋ฉด ์˜๋ฏธ์—†์Œ)*/
  "token": "8c1a9901-4a07-4f1d-910c-d3244f3b9702",/*์ธ์ฆํ† ํฐ*/
  "nickname": "user1",/*์œ ์ € ๋‹‰๋„ค์ž„*/
  "name": "์œ ์ €1", /*์œ ์ € ์‹ค๋ช…*/
  "profileImgPath": "e2080ded-09ef-4a46-925b-f2e7665522b3_1.jpg"/*ํ”„๋กœํ•„์‚ฌ์ง„ ํŒŒ์ผ๋ช…*/
}
  • Status codes
400: ์ž˜๋ชป๋œ ์š”์ฒญ (์š”์ฒญ ํƒ€์ž…์ด ์ž˜๋ชป๋˜์—ˆ๋‹ค๊ฑฐ๋‚˜ ์š”์ฒญํ•œ ํŒŒ๋ผ๋ฏธํ„ฐ๊ฐ€ ์—†๋‹ค๊ฑฐ๋‚˜)
  • Comment
x-auth-token ๊ฐ’์œผ๋กœ token ๊ฐ’์„ ๋„ฃ์–ด์ฃผ๋ฉด ์ธ์ฆ์ด ๋œ๋‹ค. 
ex) req.setRequestHeader('x-auth-token', token/*ํ† ํฐ๊ฐ’*/);
ํ”„๋กœํ•„ ์‚ฌ์ง„์€ /profileimg/ํŒŒ์ผ๋ช… ์œผ๋กœ ์š”์ฒญํ•˜๋ฉด ๋ณด๋‚ด์ค€๋‹ค.
์—†์œผ๋ฉด ํฌ๊ธฐ๊ฐ€ 0์ธ ์ŠคํŠธ๋ง์ด ์˜ด ( "" )

2. XWiki ๋กœ๊ทธ์ธ

  • REST ์š”์ฒญ์€ ์•„๋‹˜
  • XWiki๋กœ basic authentication์™€ ํ•จ๊ฒŒ ์š”์ฒญ์„ ๋ณด๋‚ด๋ฉด ์ฟ ํ‚ค๋ฅผ ๊ฐ€์ ธ์™€์„œ XWiki ๋กœ๊ทธ์ธ ์ƒํƒœ๋ฅผ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ์Œ.
  • XWiki์˜ ์•„์ด๋””๋กœ๋Š” ๋‹‰๋„ค์ž„์„ ์“ฐ๊ณ  ํŒจ์Šค์›Œ๋“œ๋Š” ๋™์ผ.
  • ์˜ˆ์‹œ
var xhr = new XMLHttpRequest();
//์ด๋Ÿฐ์‹์œผ๋กœ ์ฃผ์†Œ๊ฐ€ ํ˜„์žฌ ํ˜ธ์ŠคํŠธ๋ฅผ ๋ฐ˜์˜ํ•˜๋„๋ก ํ•จ
xhr.open("GET", location.protocol+"//"+location.host+"/xwiki/bin/view/Main/", true);
xhr.withCredentials = true;
xhr.setRequestHeader("Authorization", 'Basic ' + btoa('์•„์ด๋””:ํŒจ์Šค์›Œ๋“œ'));
xhr.send();

3. ํšŒ์›๊ฐ€์ž… ๋ฐ ์ˆ˜์ •

  • ์ฃผ์†Œ: /api/member/signup

    • HTTP Method: POST
    • Description: ํšŒ์›๊ฐ€์ž… ์š”์ฒญ
    • Request Type: form data
    • Request Value
    userId: ์ด๋ฉ”์ผ ์ฃผ์†Œ
    passWd: ํŒจ์Šค์›Œ๋“œ (6~16์ž)
    nickname: ๋‹‰๋„ค์ž„ (1~16์ž)
    name: ์ด๋ฆ„ (1~16์ž)
    
    • Response Types: text
    • Response Value
    success: ์„ฑ๊ณต์ ์ธ ์š”์ฒญ
    duplicateId: ์•„์ด๋”” ๊ฒน์นจ
    duplicateNickName: ๋‹‰๋„ค์ž„ ๊ฒน์นจ
    
    • Status codes
    400: ์ž˜๋ชป๋œ ์š”์ฒญ (์š”์ฒญ ํƒ€์ž…์ด ์ž˜๋ชป๋˜์—ˆ๋‹ค๊ฑฐ๋‚˜ ์š”์ฒญํ•œ ํŒŒ๋ผ๋ฏธํ„ฐ๊ฐ€ ์—†๋‹ค๊ฑฐ๋‚˜)
    
    • Comment
    ํšŒ์›๊ฐ€์ž… ์™„๋ฃŒํ›„์— ์‚ฌ์šฉ์ž ์ด๋ฉ”์ผ๋กœ ํšŒ์›๊ฐ€์ž… ์š”์ฒญ ์ด๋ฉ”์ผ์ด ๊ฐ„๋‹ค. ๊ฑฐ๊ธฐ์— ์žˆ๋Š” ๋งํฌ๋ฅผ ๋ˆ„๋ฅด๋ฉด ํšŒ์›๊ฐ€์ž…์š”์ฒญ์ด ์™„๋ฃŒ๋œ๋‹ค.
    ํšŒ์›๊ฐ€์ž… ์š”์ฒญ๋งํฌ๋กœ ์ด๋™ํ•œ ๋’ค ๋กœ๊ทธ์ธ์„ ์‹œ๋„ํ•˜๋ฉด(์ฒซ ๋กœ๊ทธ์ธ) ์ด๋•Œ Xwiki ํšŒ์›๊ฐ€์ž…์ด ์ž๋™์œผ๋กœ ์™„๋ฃŒ๋œ๋‹ค.
    ๋”ฐ๋ผ์„œ Xwiki๋กœ๊ทธ์ธ์€ Kinggowarts ๋กœ๊ทธ์ธ์„ ๋งˆ์นœ ๋’ค์— callback์œผ๋กœ ํ•ด์•ผํ•จ.
    
  • ์ฃผ์†Œ: /api/member/profileImg

    • HTTP Method: POST
    • Description: ํ”„๋กœํ•„ ์‚ฌ์ง„ ์ˆ˜์ •
    • Request Type: form data
    • Request Value
    <!--๋Œ€๋žต ์ด๋Ÿฐ์‹์œผ๋กœ ๋ณด๋ƒ…๋‹ˆ๋‹ค. ์‹ค์ œ๋กœ ํ• ๋•Œ๋Š” ์ธ์ฆํ† ํฐ๋„ ๊ฐ™์ด ๋ณด๋‚ด์„ธ์š”-->
    <!--์š”์ฒญ ํŒŒ๋ผ๋ฏธํ„ฐ๋Š” Multipartํ˜•์˜ file ์ž…๋‹ˆ๋‹ค. -->
    <form id="uploadForm" enctype="multipart/form-data"> 
    <input type="file" id="file" name="file">
    </form>
    <script>
    var form = new FormData(document.getElementById('uploadForm'));
    $.ajax({      
            type:"POST",  
            url:"./api/member/profileImg",    
            data: form,
            dataType:'text',
            processData: false,
            contentType: false,
            success:function(args){   
                console.log(args  )  
            }
        });
    </script>
    
    • Response Types: text
    • Response Value
    success: ์„ฑ๊ณต์ ์ธ ์š”์ฒญ
    ๊ทธ ์ด์™ธ: ์—๋Ÿฌ๋ฉ”์„ธ์ง€(wrongType: ์ด๋ฏธ์ง€ํŒŒ์ผ์ด์•„๋‹˜, nullFile: ๋นˆํŒŒ์ผ ...)
    
  • ์ฃผ์†Œ: /api/member/changePassword

    • HTTP Method: POST
    • Description: ๋น„๋ฐ€๋ฒˆํ˜ธ ์ˆ˜์ •
    • Request Type: form data
    • Request Value
    newPassword: ์ƒˆ ๋น„๋ฐ€๋ฒˆํ˜ธ
    lastPassword: ๊ณผ๊ฑฐ ๋น„๋ฐ€๋ฒˆํ˜ธ
    
    • Response Types: text
    • Response Value
    success: ์„ฑ๊ณต์ ์ธ ์š”์ฒญ
    ๊ทธ ์ด์™ธ: ์—๋Ÿฌ ๋ฉ”์„ธ์ง€  
    

4. ์ง€๋„ ๊ตฌ์—ญ ๊ด€๋ฆฌ

  • ์ฃผ์†Œ: /api/map

    • HTTP Method: GET

      • Description: ์ง€๋„ ๊ตฌ์—ญ ๋ชฉ๋ก ์š”์ฒญ
      • Response Types: JSON
      • Response Value
        [
          {
            "id": 45,
            "name": "testregion",
            "center": {
              "id": 267,
              "lng": 126.9738347803545,
              "lat": 37.29410858054493
            },
            "path": [
              {
                "id": 268,
                "lng": 126.9738347803545,
                "lat": 37.29419858054493
              },
              {
                "id": 269,
                "lng": 126.9737347803545,
                "lat": 37.29429858054493
              },
              ...
            ],
            "type": "user",
            "shape": "POLYGON",
            "detail": "this is customEvent",
            "tags": [
              {
                "id": 45,
                "name": "test"
              },
              ...
            ]
          },
          ...
        ]
        
    • HTTP Method: POST

      • Description: ์ง€๋„ ๊ตฌ์—ญ ์ถ”๊ฐ€ ์š”์ฒญ

      • Request Type: application/json

      • Request Value

        name: ๊ตฌ์—ญ์ด๋ฆ„
        center: { lat : , lng : }
        shape: ๊ตฌ์—ญ ํ˜•ํƒœ
        path: [ { lat : , lng : }, { lat : , lng : } ... ]
        detail: ๊ตฌ์—ญ ์ƒ์„ธ ์„ค๋ช…
        tags: [ { name : }, { name : } ... ]
        
      • Response Types: text

      • Response Value

        success: ์„ฑ๊ณต์ ์ธ ์š”์ฒญ
        duplicatedName: ์ค‘๋ณต๋œ ๊ตฌ์—ญ ์ด๋ฆ„
        notAllowed: ํ—ˆ์šฉ๋˜์ง€ ์•Š์€ ์š”์ฒญ
        
  • ์ฃผ์†Œ: /api/map/{id}

    • HTTP Method: PUT

      • Description: ์ง€๋„ ๊ตฌ์—ญ ์ˆ˜์ • ์š”์ฒญ
      • Request Type: application/json
      • Request Value
      name: ๊ตฌ์—ญ์ด๋ฆ„
      center: { lat : , lng : }
      shape: ๊ตฌ์—ญ ํ˜•ํƒœ
      path: [ { lat : , lng : }, { lat : , lng : } ... ]
      detail: ๊ตฌ์—ญ ์ƒ์„ธ ์„ค๋ช…
      tags: [ { name : }, { name : } ... ]
      
      • Response Types: text
      • Response Value
      success: ์„ฑ๊ณต์ ์ธ ์š”์ฒญ
      notAllowed: ํ—ˆ์šฉ๋˜์ง€ ์•Š์€ ์š”์ฒญ
      duplicatedName: ์ค‘๋ณต๋œ ๊ตฌ์—ญ ์ด๋ฆ„
      noLocation: ๊ตฌ์—ญ ์ •๋ณด ์—†์Œ
      
    • HTTP Method: DELETE

      • Description: ์ง€๋„ ๊ตฌ์—ญ ์‚ญ์ œ ์š”์ฒญ

      • Response Types: text

      • Response Value

      success: ์„ฑ๊ณต์ ์ธ ์š”์ฒญ
      notAllowed: ํ—ˆ์šฉ๋˜์ง€ ์•Š์€ ์š”์ฒญ
      noLocation: ๊ตฌ์—ญ ์ •๋ณด ์—†์Œ
      

5. ์ด๋ฒคํŠธ ๊ด€๋ฆฌ

  • ์ฃผ์†Œ: /api/event

    • HTTP Method: GET
      • Description: ๋ชจ๋“  ์ด๋ฒคํŠธ ๋ชฉ๋ก

        • Response Types: JSON
        • Response Value
        [
          {
            "id": 1,
            "l_id": 1,
            "title": "testregion",
            "about": "this is customEvent",
            "creator": {
              "memberSeq": 1,
              "userId": "[email protected]",
              "nickname": "haha",
              "type": "S",
              "confirm": 3,
              "lng": -1,
              "lat": -1
            },
            "tags": [
              {
                "id": 40,
                "name": "testTag"
              }
            ],
            "fromDate": 1496709514000,
            "toDate": 1496191135000
          },
          ...
        ]
        
    • HTTP Method: POST
      • Description: ์ด๋ฒคํŠธ ์ถ”๊ฐ€ ์š”์ฒญ

      • Request Type: application/json

      • Request Value

        l_id: ๊ตฌ์—ญ ๊ณ ์œ  ๋ฒˆํ˜ธ
        title: ์ด๋ฒคํŠธ ํƒ€์ดํ‹€
        about: ์ด๋ฒคํŠธ ์ƒ์„ธ ์„ค๋ช…
        creator: { memberSeq: ์‚ฌ์šฉ์ž ๊ณ ์œ  ๋ฒˆํ˜ธ }
        tags: [ { name : }, { name : } ... ]
        fromDate: ์ด๋ฒคํŠธ ์‹œ์ž‘ ๋‚ ์งœ(Timestamp)
        toDate: ์ด๋ฒคํŠธ ์ข…๋ฃŒ ๋‚ ์งœ(Timestamp)
        
      • Response Types: text

      • Response Value

        success: ์„ฑ๊ณต์ ์ธ ์š”์ฒญ
        noMember: ์‚ฌ์šฉ์ž ์ •๋ณด ์—†์Œ
        
  • ์ฃผ์†Œ: /api/event/{id}

    • HTTP Method: PUT

      • Description: ์ด๋ฒคํŠธ ์ˆ˜์ • ์š”์ฒญ

      • Request Type: application/json

      • Request Value

        l_id: ๊ตฌ์—ญ ๊ณ ์œ  ๋ฒˆํ˜ธ
        title: ์ด๋ฒคํŠธ ํƒ€์ดํ‹€
        about: ์ด๋ฒคํŠธ ์ƒ์„ธ ์„ค๋ช…
        creator: { memberSeq: ์‚ฌ์šฉ์ž ๊ณ ์œ  ๋ฒˆํ˜ธ }
        tags: [ { name : }, { name : } ... ]
        fromDate: ์ด๋ฒคํŠธ ์‹œ์ž‘ ๋‚ ์งœ(Timestamp)
        toDate: ์ด๋ฒคํŠธ ์ข…๋ฃŒ ๋‚ ์งœ(Timestamp)
        
      • Response Types: text

      • Response Value

        success: ์„ฑ๊ณต์ ์ธ ์š”์ฒญ
        noEvent: ์ด๋ฒคํŠธ ์ •๋ณด ์—†์Œ
        noMember: ์‚ฌ์šฉ์ž ์ •๋ณด ์—†์Œ
        
    • HTTP Method: DELETE

      • Description: ์ด๋ฒคํŠธ ์‚ญ์ œ ์š”์ฒญ

      • Response Types: text

      • Response Value

      success: ์„ฑ๊ณต์ ์ธ ์š”์ฒญ
      noEvent: ์ด๋ฒคํŠธ ์ •๋ณด ์—†์Œ
      

6. Peer ๊ด€๋ฆฌ

  • ์ฃผ์†Œ: /api/member/reqPeerFromMe

    • HTTP Method: GET

      • Description: ๋‚ด๊ฐ€ Peer ์š”์ฒญ ๋ณด๋‚ธ ๋ชฉ๋ก์„ ๊ฐ€์ ธ์˜ด
      • Request Value: ์—†์Œ
      • Response Types: JSON
      • Request Value
      [
        {
          "memberSeq": 23,
          "nickname": "tuser1",
          "name": "jj",
          "profileImgPath": ""
        },
        {
          "memberSeq": 24,
          "nickname": "tuser2",
          "name": "afd",
          "profileImgPath": ""
        },
        {
          "memberSeq": 25,
          "nickname": "tuser3",
          "name": "asd",
          "profileImgPath": ""
        }
      ]
      
    • HTTP Method: POST

      • Description: Peer ์š”์ฒญ์„ ๋ณด๋ƒ„
      • Request Type: form data
      • Request Value
      toSeq: ๋ฐ›๋Š” ์‚ฌ๋žŒ์˜ member seq
      
      • Response Types: ์—†์Œ
  • ์ฃผ์†Œ: /api/member/reqPeerToMe

    • HTTP Method: GET

      • Description: ๋‚ด๊ฐ€ Peer ์š”์ฒญ ๋ฐ›์€ ๋ชฉ๋ก์„ ๊ฐ€์ ธ์˜ด
      • Request Value: ์—†์Œ
      • Response Types: JSON
      • Request Value
      [
        {
          "memberSeq": 23,
          "nickname": "tuser1",
          "name": "jj",
          "profileImgPath": ""
        },
        {
          "memberSeq": 24,
          "nickname": "tuser2",
          "name": "afd",
          "profileImgPath": ""
        },
        {
          "memberSeq": 25,
          "nickname": "tuser3",
          "name": "asd",
          "profileImgPath": ""
        }
      ]
      
    • HTTP Method: POST

      • Description: Peer ์š”์ฒญ์„ ์ˆ˜๋ฝ or ๊ฑฐ์ ˆ
      • Request Type: form data
      • Request Value
      toSeq: ๋ฐ›๋Š” ์‚ฌ๋žŒ์˜ member seq
      type: ("true", "false") ์ˆ˜๋ฝ: "true", ๊ฑฐ์ ˆ: "false"
      
      • Response Types: ์—†์Œ
  • ์ฃผ์†Œ: /api/member/peer

    • HTTP Method: GET

      • Description: Peer ๋ชฉ๋ก์„ ๊ฐ€์ ธ์˜ด(-1 ์ขŒํ‘œ๋Š” ์œ„์น˜๊ฐ€ ์—†๋‹ค๋Š” ์˜๋ฏธ)
      • Request Value: ์—†์Œ
      • Response Types: JSON
      • Request Value
      [
        {
          "memberSeq": 26,
          "nickname": "tuser4",
          "name": "gge",
          "lng": -1,
          "lat": -1,
          "profileImgPath": ""
        }
      ]
      
    • HTTP Method: DELETE

      • Description: Peer๋ฅผ ์‚ญ์ œ
      • Request Type: url ํŒŒ๋ผ๋ฏธํ„ฐ
      • Request Value
      toSeq: ๋ฐ›๋Š” ์‚ฌ๋žŒ์˜ member seq
      
      • Response Types: ์—†์Œ
  • ์ฃผ์†Œ: /api/member/coordinate

    • Description: ๋‚ด ์ขŒํ‘œ๋ฅผ ๊ฐฑ์‹ ํ•˜๊ณ  peer๋“ค์˜ ์œ„์น˜๋ฅผ ๋ถˆ๋Ÿฌ์˜ด
    • HTTP Method: PATCH
    • Request Type: form data
    • Request Value
    {
    "lng" : 123.23, /*์ขŒํ‘œ๊ฐ’ ... ์—†๋Š” ์ขŒํ‘œ๋ฅผ ๋„ฃ์„๋•Œ๋Š” -1*/
    "lat" : 123.53
    }
    
    • Response Types: JSON
    • Request Value
    [
      {
        "memberSeq": 26,
        "nickname": "user4",
        "lng": -1, // -1์ผ๋• ์—†๋Š” ์ขŒํ‘œ
        "lat": -1
      },
      {
        "memberSeq": 27,
        "nickname": "user5",
        "lng": -1,
        "lat": -1
      }
    ]
    

7. ๋งˆ์ปค ๊ด€๋ฆฌ

  • ์ฃผ์†Œ: /api/marker

    • HTTP Method: GET

      • Description: ๋ชจ๋“  ๋งˆ์ปค ๋ชฉ๋ก
        • Request Type: text
        • Request Value
        q: ๊ฒ€์ƒ‰ํ•  ๋งˆ์ปค์˜ ์นดํ…Œ๊ณ ๋ฆฌ
        
        • Response Types: JSON
        • Response Value
        [
          {
            "id": 2,
            "center": {
              "id": 313,
              "lng": 999.123,
              "lat": 8888.13312
            },
            "name": "marker test",
            "markerCategory": {
              "id": 3,
              "name": "์นดํŽ˜"
            }
          },
          ...
        ]
        
    • HTTP Method: POST

      • Description: ๋งˆ์ปค ์ถ”๊ฐ€ ์š”์ฒญ
      • Request Type: application/json
      • Request Value
      {
        "center": {
          "lng": 999.123,
          "lat": 8888.13312
        },
        "name": "marker test",
        "markerCategory": {
          "name": "์นดํŽ˜"
        }
      }
      
      • Response Types: text
      • Response Value
        success: ์„ฑ๊ณต์ ์ธ ์š”์ฒญ
        duplicatedName: ์ค‘๋ณต๋œ ๋งˆ์ปค ์ด๋ฆ„
        noCategory: ์นดํ…Œ๊ณ ๋ฆฌ ์ •๋ณด ์—†์Œ
        notAllowed: ํ—ˆ์šฉ๋˜์ง€ ์•Š์€ ์š”์ฒญ
        
  • ์ฃผ์†Œ: /api/marker/{id}

    • HTTP Method: PUT

      • Description: ๋งˆ์ปค ์ˆ˜์ • ์š”์ฒญ
      • Request Type: application/json
      • Request Value
      {
        "center": {
          "lng": 999.123,
          "lat": 8888.13312
        },
        "name": "marker test",
        "markerCategory": {
          "name": "์นดํŽ˜"
        }
      }
      
      • Response Types: text
      • Response Value
      success: ์„ฑ๊ณต์ ์ธ ์š”์ฒญ
      noMarker: ๋งˆ์ปค ์ •๋ณด ์—†์Œ
      duplicatedName: ์ค‘๋ณต๋œ ๋งˆ์ปค ์ด๋ฆ„
      noCategory: ์นดํ…Œ๊ณ ๋ฆฌ ์ •๋ณด ์—†์Œ
      notAllowed: ํ—ˆ์šฉ๋˜์ง€ ์•Š์€ ์š”์ฒญ
      
    • HTTP Method: DELETE

      • Description: ๋งˆ์ปค ์‚ญ์ œ ์š”์ฒญ

      • Response Types: text

      • Response Value

      success: ์„ฑ๊ณต์ ์ธ ์š”์ฒญ
      noMarker: ๋งˆ์ปค ์ •๋ณด ์—†์Œ
      

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published