Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jinyoungchoi95] Article 전체 조회 기능 #65

Closed
1 task done
jinyoungchoi95 opened this issue Oct 25, 2021 · 0 comments
Closed
1 task done

[jinyoungchoi95] Article 전체 조회 기능 #65

jinyoungchoi95 opened this issue Oct 25, 2021 · 0 comments
Assignees
Labels
feature ori 오리의 이슈

Comments

@jinyoungchoi95
Copy link
Member

jinyoungchoi95 commented Oct 25, 2021

[AS-IS]

  • 게시글 전체 조회 기능 미구현
    • tag param filtering
    • author param filtering
    • favorited param filtering
    • page limit, offset

[TO-BE]

  • GET /api/articles

Accepted query parameter

Filtering by tag, author, favorited: ?tag=AngularJS ,?author=jake, ?favorited=jake

Limit number of articles (default is 20): ?limit=20

Offset / Skip number of articles (default is 0): ?offset=0

Response:

{
  "articles":[{
    "slug": "how-to-train-your-dragon",
    "title": "How to train your dragon",
    "description": "Ever wonder how?",
    "body": "It takes a Jacobian",
    "tagList": ["dragons", "training"],
    "createdAt": "2016-02-18T03:22:56.637Z",
    "updatedAt": "2016-02-18T03:48:35.824Z",
    "favorited": false,
    "favoritesCount": 0,
    "author": {
      "username": "jake",
      "bio": "I work at statefarm",
      "image": "https://i.stack.imgur.com/xHWG8.jpg",
      "following": false
    }
  }, {
    "slug": "how-to-train-your-dragon-2",
    "title": "How to train your dragon 2",
    "description": "So toothless",
    "body": "It a dragon",
    "tagList": ["dragons", "training"],
    "createdAt": "2016-02-18T03:22:56.637Z",
    "updatedAt": "2016-02-18T03:48:35.824Z",
    "favorited": false,
    "favoritesCount": 0,
    "author": {
      "username": "jake",
      "bio": "I work at statefarm",
      "image": "https://i.stack.imgur.com/xHWG8.jpg",
      "following": false
    }
  }],
  "articlesCount": 2
}
@jinyoungchoi95 jinyoungchoi95 added feature ori 오리의 이슈 labels Oct 25, 2021
@jinyoungchoi95 jinyoungchoi95 self-assigned this Oct 25, 2021
jinyoungchoi95 added a commit that referenced this issue Oct 26, 2021
- Collection join으로 인해 List<Tag> 내에 BatchSize 조절
jinyoungchoi95 added a commit that referenced this issue Oct 27, 2021
- page -> offset
- limit -> size
jinyoungchoi95 added a commit that referenced this issue Oct 27, 2021
- inner class 를 갖게하고, 해당 inner class 객체를 JsonProperty 로 json 객체 네임 변경으로 변경
jinyoungchoi95 added a commit that referenced this issue Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ori 오리의 이슈
Projects
None yet
Development

No branches or pull requests

1 participant