Skip to content

YujinHa/seouling-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

seouling-server

서울 앱 공모전 서울링 서버

API Docs

/auth/token
/auth/signup
/auth/signin/email
/auth/signin/sns
/plan
/plan/{plan_id}
/plan/{plan_id}/schedule
/schedule/{schedule_id}
/tag
/spot/search/tag
/spot/search/name
/spot/{spot_id}
/spot/{spot_id}/comment
/myseoul
/me

/auth/token

-POST

Check Token

header

Key Value
Content-Type application/json

request

{
  "token": String
}

response

{
  "message": String
}

/auth/signup

-POST

Sign up

header

Key Value
Content-Type application/json

request

{
  "sns_token": String(Optional),
  "email": String(Optional),
  "password": String(Optional),
  "login_type": String,
  "nickname": String,
  "profile_picture": String(Optional)
}

response

{
  "data": {
    "id": Integer,
    "sns_token": String,
    "email": String,
    "password": String,
    "nickname": String,
    "profile_picture": String,
    "is_push": Boolean,
    "login_type": Integer,
    "last_login": String,
    "created_at": String
  }
}

/auth/signin/email

-POST

login

header

Key Value
Content-Type application/json

request

{
  "email": String,
  "password": String
}

response

{
  "token": String
}

/auth/signin/sns

-POST

login from facebook / google

header

Key Value
Content-Type application/json

request

{
  "sns_token": String,
  "type": String
}

response

{
  "token": String
}

/plan

-GET

Get Plans

header

Key Value
Content-Type application/json
Authorization Bearer token

param

{
  "last_id": Integer
}

response

{
  data: [
    {
      "id": Integer,
      "scheme": String,
      "name": String,
      "picture": String,
      "created_date": String,
      "start_date": String,
      "end_date": String
    },
    ...
  ],

  "paging": {
    "after": String,
    "before": String
  }
}

-POST

Create Plans

header

Key Value
Content-Type application/json
Authorization Bearer token

request

{
  "start_date": String,
  "end_date": String,
  "name": String
},

response

{
  data: {
    "id": Integer,
    "scheme": String,
    "name": String,
    "picture": String,
    "created_date": String,
    "start_date": String,
    "end_date": String
  }
}

/plan/{plan_id}

-PUT

Edit Plans

header

Key Value
Content-Type application/json
Authorization Bearer token

request

{
  "name": String(Optional),
  "start_date": String(Optional),
  "end_date": String(Optional),
},

response

{
  "data": {
    "id": Integer,
    "scheme": String,
    "name": String,
    "picture": String,
    "created_date": String,
    "start_date": String,
    "end_date": String
  },
}

-DELETE

Delete Plans

header

Key Value
Content-Type application/json
Authorization Bearer token

request

response

{
  "message": String
}

/plan/{plan_id}/schedule

-GET

Get Plan's schedule

header

Key Value
Content-Type application/json
Authorization Bearer token

param

{
}

response

{
  data: {
    "id": Integer,
    "date": String,
    "morning": [
      {
        "spot_id": Integer,
        "scheme": String,
        "picture": String,
        "name": String
      },
      ...
    ]
    "after_noon": [
      {
        "spot_id": Integer,
        "scheme": String,
        "picture": String,
        "name": String
      },
      ...
    ]
    "night": [
      {
        "spot_id": Integer,
        "scheme": String,
        "picture": String,
        "name": String
      },
      ...
    ]
}

/schedule/{schedule_id}

-PUT

Edit Plan's schedule

header

Key Value
Content-Type application/json
Authorization Bearer token

param


request

{
  "type": "morning" / "after_noon" / "night",
  "add": List(Integer),
  "remove": List(Integer)
}

response

{
  "data": {
    "id": Integer,
    "date": String,
    "morning": [
      {
        "spot_id": Integer,
        "scheme": String,
        "picture": String,
        "name": String
      },
      ...
    ]
    "after_noon": [
      {
        "spot_id": Integer,
        "scheme": String,
        "picture": String,
        "name": String
      },
      ...
    ]
    "night": [
      {
        "spot_id": Integer,
        "scheme": String,
        "picture": String,
        "name": String
      },
      ...
    ]
  }
}

/tag

-GET

Get tags

header

Key Value
Content-Type application/json
Authorization Bearer token

param

response

{
  "data": [
    {
      id: Integer,
      bundle: List(String)
    }
    ...
  ]
}

/spot/search/tag

-POST

Search Spot from tag

header

Key Value
Content-Type application/json
Authorization Bearer token

param

{
  "last_id": Integer
}

request

{
  "tag": [
    {
      "id": Integer,
      "selected": String
    },
    ...
  ]
}

response

{
  "data": [
    {
      "id": Integer,
      "scheme": String,
      "picture": String,
      "name": String
    },
    ...
  ],

  "paging": {
    "after": String,
    "before": String
  }
}

/spot/search/name

-POST

Search Spot from name

header

Key Value
Content-Type application/json
Authorization Bearer token

param

{
  "last_id": Integer
}

request

{
  "name": String
}

response

{
  "data": [
    {
      "id": Integer,
      "scheme": String,
      "picture": String,
      "name": String
    },
    ...
  ],

  "paging": {
    "after": String,
    "before": String
  }
}

/spot/{spot_id}

-GET

Get Spot

header

Key Value
Content-Type application/json
Authorization Bearer token

param

response

{
  "data": {
    "id": Integer,
    "name": String,
    "content": String,
    "pictures": List(String),
    "like": Integer,
    "visitor": Integer
  }
}

/spot/{spot_id}/comment

-GET

Get Spot's message

header

Key Value
Content-Type application/json
Authorization Bearer token

param

{
  "last_id": Integer
}

response

{
  "data": [
    {
      "id": Integer,
      "author_name": String,  
      "author_picture": String,  
      "content": String,
      "created_date": String
    }
    ...
  ],

  "paging": {
    "after": String,
    "before": String
  }
}

-POST

Post Spot's message

header

Key Value
Content-Type application/json
Authorization Bearer token

request

{
  "content": String
}

response

{
  "data": {
    "author": User,  
    "content": String,
    "created_date": String
  }
}

/myseoul

-GET

Get MySeoul Info

header

Key Value
Content-Type application/json
Authorization Bearer token

param

response

{
  "data": [
    {
      "order": Number,
      "picture": String
    }
    ...
  ]
}

/me

-GET

Get my Info

header

Key Value
Content-Type application/json
Authorization Bearer token

param

response

{
  "data": {
    "profile_picture": String,
    "nickname": String,
    "is_push": Boolean
  }
}

-PUT

Edit my Info

header

Key Value
Content-Type application/json
Authorization Bearer token

request

{
  "profile_picture": File(Optional),
  "nickname": String(Optional),
  "is_push": Boolean(Optional)
}

response

{
  "data": {
    "profile_picture": String,
    "nickname": String,
    "is_push": Boolean
  }
}

About

서울 앱 공모전 서울링 서버

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages