nerds-amp-mods / hackernewsclone

Hackernews - The Indian Version
1 stars 3 forks source link

API request response format for listing news #4

Open sakethramanujam opened 4 years ago

sakethramanujam commented 4 years ago

Request

GET /news
Authorization: Bearer <token>

Response

200 OK
{ 
    "articles": [
                      {  "title"       : '...',
                         "source"  : '....',
                         "topic"     :'....',
                          "url"        :'....'
                       },
                      { ... },
                  ],
    "next": "url"
}
---
404 Not Found
sakethramanujam commented 4 years ago

@rakhi2104 you can use this format to mock requests and go on with UI on your end. Also, comment here regarding setup details.

@Pac23 would like your comments here.

mm-git01 commented 4 years ago

this response looks fine to me, tags should also be returned in a list format.

sakethramanujam commented 4 years ago

i named tag as topic