API

GET /api/v1/ideas/:id/actions
GET /api/v1/ideas/:id/actions    Show detailed information about all actions for an idea with the given id.

Returns actions for the given idea. An optional "filter" parameter controls the order of the actions. The filter may be "new" or "popular."
Actions 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/ideas/sf-superhighways-for-bikes/actions 
curl https://neighborland.com/api/v1/ideas/sf-superhighways-for-bikes/actions?filter=popular
curl https://neighborland.com/api/v1/ideas/sf-superhighways-for-bikes/actions?page=2
curl https://neighborland.com/api/v1/ideas/sf-superhighways-for-bikes/actions?filter=popular&page=2&per_page=2

Example Response

[
  {
    "id": 25662,
    "idea_id": "sf-protected-bike-lanes",
    "created_at": "2012-10-24 17:17:47 -0600",
    "done": false,
    "support_count": 4,
    "text": "The San Francisco Bicycle Coalition is working on a large multi-year project called Connecting the City: http://www.connectingthecity.org The goal is to build three major routes of separated bikeway that cross SF: \"bay to beach,\" \"north south,\" and \"bay trail.\"",
    "type": "resource",
    "neighbor": {
      "id": "drewda",
      "url": "https://neighborland.com/api/v1/neighbors/drewda",
      "alternate_url": "https://neighborland.com/neighbors/drewda",
      "name": "Drew Dara-Abrams",
      "username": "drewda",
      "avatar_thumb_url": "https://d3hab8wm9tteb6.cloudfront.net/images/11755/medium0c8dbba7002c0d536177394b0789aa08.JPG",
      "avatar_medium_url": "https://d3hab8wm9tteb6.cloudfront.net/images/11755/medium0c8dbba7002c0d536177394b0789aa08.JPG"
    },
    "idea": {
      "id": "sf-protected-bike-lanes",
      "url": "https://neighborland.com/api/v1/ideas/sf-protected-bike-lanes",
      "alternate_url": "https://neighborland.com/ideas/sf-protected-bike-lanes",
      "created_at": "2012-07-18 18:07:32 -0600",
      "i_want_text": "I want protected bike lanes in San Francisco",
      "latitude": 37.77532,
      "longitude": -122.41927,
      "name": "protected bike lanes",
      "past_month_support_count": 0,
      "support_count": 205,
      "neighbor": {
        "id": "johnbelarebar",
        "url": "https://neighborland.com/api/v1/neighbors/johnbelarebar",
        "alternate_url": "https://neighborland.com/neighbors/johnbelarebar",
        "name": "John Bela",
        "username": "johnbelarebar",
        "avatar_thumb_url": "https://d3hab8wm9tteb6.cloudfront.net/images/8005/medium1a841b4fceef50d868bd182f7174ce1c.txt",
        "avatar_medium_url": "https://d3hab8wm9tteb6.cloudfront.net/images/8005/medium1a841b4fceef50d868bd182f7174ce1c.txt"
      },
      "city": {
        "id": "sf",
        "url": "https://neighborland.com/api/v1/cities/sf",
        "alternate_url": "https://neighborland.com/cities/sf",
        "name": "San Francisco",
        "state": "CA"
      },
      "neighborhood": null,
      "question": null
    }
  }
]