Skip to content
This repository has been archived by the owner on Mar 8, 2018. It is now read-only.

Commit

Permalink
Add the posts API endpoint to the root of the API
Browse files Browse the repository at this point in the history
The API now supports distinct posts and memberships, as in the Popolo
specification, but language bindings that explore the top level API to
discover available collections (e.g. popit-python) previously
wouldn't have discovered the posts collection.  This commit adds that
link.
  • Loading branch information
mhl committed Jul 10, 2014
1 parent 3b4b562 commit 5735435
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/apps/api/index.js
Expand Up @@ -28,6 +28,7 @@ api_01_app.get('/', function (req, res, next) {
persons_api_url: req.api_base_url + '/persons',
organizations_api_url: req.api_base_url + '/organizations',
memberships_api_url: req.api_base_url + '/memberships',
posts_api_url: req.api_base_url + '/posts',
image_proxy_url: base_url(req) + config.image_proxy.path,
},
});
Expand Down
1 change: 1 addition & 0 deletions test/api-app.js
Expand Up @@ -14,6 +14,7 @@ describe("API v0.1", function() {
persons_api_url: "http://test.popit.example.org/api/v0.1/persons",
organizations_api_url: "http://test.popit.example.org/api/v0.1/organizations",
memberships_api_url: "http://test.popit.example.org/api/v0.1/memberships",
posts_api_url: "http://test.popit.example.org/api/v0.1/posts",
image_proxy_url: "http://test.popit.example.org/image-proxy/"
}
}, done)
Expand Down

0 comments on commit 5735435

Please sign in to comment.