Skip to content

Instantly share code, notes, and snippets.

@devonestes
Created January 6, 2015 18:39
Show Gist options
  • Save devonestes/e49eb33d95aa746db412 to your computer and use it in GitHub Desktop.
Save devonestes/e49eb33d95aa746db412 to your computer and use it in GitHub Desktop.

[GET] /articles/:user

Returns a collection of the most recent articles written by a user (as defined by the :user parameter).

Resource URL

https://api.awesomesite.com/articles/user_articles.json

Resource Information

---------- | ---------: Response format | JSON Requires authentication? | Not yet Rate limited? | Not yet

Parameters

Always specify a user in the request URL.

Example Request

GET https://api.awesomesite.com/articles/user_articles.json?user=testuser1

[
  {
    article_id: 12,
    user_id: 1,
    article_uri: "https://www.awesomesite.com/articles/12",
    comments:
      [
        {
          user_id: 2,
          comment_id: 3,
          comment_body: "<p>This is a comment!</p>"
        }
      ],
    article_body: "<p>This is an article. I created it!</p>",
  },
  {
    article_id: 14,
    user_id: 1,
    article_uri: "https://www.awesomesite.com/articles/14",
    comments:
      [
        {
          user_id: 4,
          comment_id: 1,
          comment_body: "<p>I didn't care for this article... :(</p>"
        }
      ],
    article_body: "<p>This is a second article. I created this one too!</p>",
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment