API

GET /api/v1/neighbors/:id/comments
GET /api/v1/neighbors/:id/comments    Show detailed information about all comments made by the neighbor with the given id.

Returns comments by the given neighbor. An optional "filter" parameter controls the order of the comments. The filter may be "new" or "popular."
Comments are returned in paged chunks. Two optional parameters control paging: "page" and "per page" (see below). The default "page" value is 1. The default "per_page" value is 10.

Parameters

filter
(optional)
Valid values are "new" and "popular". Default is "new".
page
(optional)
The number of the page. Default is 1. Must be between 1 and 10000.
per_page
(optional)
The number of ideas returned per page. Default is 10. Must be between 1 and 500.

curl Examples

curl https://neighborland.com/api/v1/neighbors/tee/comments 
curl https://neighborland.com/api/v1/neighbors/tee/comments?page=2
curl https://neighborland.com/api/v1/neighbors/tee/comments?filter=popular
curl https://neighborland.com/api/v1/neighbors/tee/comments?filter=popular&page=2&per_page=2

Example Response

[
  {
    "id": 16,
    "idea_id": "nola-algiers-point-a-hostel",
    "text": "I would go to Algiers Point more often if there was a cheap place to stay the night. There is often good music over there that I would like to go see, and I have heard there are a couple of good breakfast joints.",
    "support_count": 2,
    "created_at": "2011-03-31 12:24:50 -0600",
    "neighbor": {
      "id": "alanjosephwilliams",
      "url": "https://neighborland.com/api/v1/neighbors/alanjosephwilliams",
      "alternate_url": "https://neighborland.com/neighbors/alanjosephwilliams",
      "name": "Alan Joseph Williams",
      "username": "alanjosephwilliams",
      "avatar_thumb_url": "https://d2u1agwg7jcs4a.cloudfront.net/images/17117/medium8688eb3dfb477b2554b8030409a2dd17.jpg",
      "avatar_medium_url": "https://d2u1agwg7jcs4a.cloudfront.net/images/17117/medium8688eb3dfb477b2554b8030409a2dd17.jpg"
    },
    "idea": {
      "id": "nola-algiers-point-a-hostel",
      "url": "https://neighborland.com/api/v1/ideas/nola-algiers-point-a-hostel",
      "alternate_url": "https://neighborland.com/ideas/nola-algiers-point-a-hostel",
      "created_at": "2011-06-04 12:36:19 -0600",
      "i_want_text": "I want a hostel in Algiers Point, New Orleans",
      "latitude": 29.9527076,
      "longitude": -90.0539857,
      "name": "a hostel",
      "past_month_support_count": 0,
      "support_count": 3,
      "neighbor": {
        "id": "candy",
        "url": "https://neighborland.com/api/v1/neighbors/candy",
        "alternate_url": "https://neighborland.com/neighbors/candy",
        "name": "Candy Chang",
        "username": "candy",
        "avatar_thumb_url": "https://d3hab8wm9tteb6.cloudfront.net/images/10824/medium0b6a2a7e4b0e056cbe704d5e8a63a16e.jpg",
        "avatar_medium_url": "https://d3hab8wm9tteb6.cloudfront.net/images/10824/medium0b6a2a7e4b0e056cbe704d5e8a63a16e.jpg"
      },
      "city": {
        "id": "nola",
        "url": "https://neighborland.com/api/v1/cities/nola",
        "alternate_url": "https://neighborland.com/cities/nola",
        "name": "New Orleans",
        "state": "LA"
      },
      "neighborhood": {
        "id": "nola-algiers-point",
        "url": "https://neighborland.com/api/v1/neighborhoods/nola-algiers-point",
        "alternate_url": "https://neighborland.com/neighborhoods/nola-algiers-point",
        "name": "Algiers Point"
      },
      "question": null
    }
  }
]