Get recent articles from users you follow

GET /feed

Get most recent articles from users you follow. Use query parameters to limit. Auth is required

Query parameters

  • limit integer

    Limit number of articles returned

    Default value is 20.

  • offset integer

    Offset/skip number of articles

    Default value is 0.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • articles array[object] Required
      Hide articles attributes Show articles attributes object
      • slug string Required
      • title string Required
      • description string Required
      • body string Required
      • tags array[string] Required
      • createdAt string(date-time) Required
      • updatedAt string(date-time) Required
      • favorited boolean Required
      • favoritesCount integer Required
      • author object Required
        Hide author attributes Show author attributes object
        • username string Required
        • bio string Required
        • image string Required
        • following boolean Required
    • articlesCount integer Required
  • 401

    Unauthorized

  • 422 application/json

    Unexpected error

    Hide response attribute Show response attribute object
    • errors object Required
      Hide errors attribute Show errors attribute object
      • body array[string] Required
GET /feed
curl \
 --request GET '/api/feed' \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "articles": [
    {
      "body": "It takes a Jacobian",
      "slug": "how-to-train-your-dragon",
      "tags": [
        "dragons",
        "training"
      ],
      "title": "How to train your dragon",
      "author": {
        "bio": "I work at State Farm.",
        "image": "https://i.stack.imgur.com/xHWG8.jpg",
        "username": "jake",
        "following": false
      },
      "createdAt": "2021-02-18T03:22:56.637Z",
      "favorited": false,
      "updatedAt": "2021-02-18T03:48:35.824Z",
      "description": "Ever wonder how?",
      "favoritesCount": 0
    },
    {
      "body": "It is a dragon",
      "slug": "how-to-train-your-dragon-2",
      "tags": [
        "dragons",
        "training"
      ],
      "title": "How to train your dragon 2",
      "author": {
        "bio": "I work at State Farm.",
        "image": "https://i.stack.imgur.com/xHWG8.jpg",
        "username": "jake",
        "following": false
      },
      "createdAt": "2021-02-18T03:22:56.637Z",
      "favorited": false,
      "updatedAt": "2021-02-18T03:48:35.824Z",
      "description": "So toothless",
      "favoritesCount": 0
    }
  ],
  "articlesCount": 2
}
Response examples (422)
{
  "errors": {
    "body": [
      "string"
    ]
  }
}