This repository has been archived by the owner on Jan 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from datamade/text
Add pages for endpoints
- Loading branch information
Showing
3 changed files
with
78 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Endpoints | ||
========= | ||
|
||
The API contains eight different types of civic data. A unique endpoint represents each category: | ||
|
||
* bills | ||
|
||
* boundaries | ||
|
||
* divisions | ||
|
||
* events | ||
|
||
* jurisdictions | ||
|
||
* organizations | ||
|
||
* people | ||
|
||
* votes | ||
|
||
Independently filterable and searchable, the endpoints organize individual entries, each receiving a unique id. Displaying an entry reveals detailed information about a specified instance of civic data. | ||
|
||
Elements of an Endpoint | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Each endpoint has two parts: (1) the listing pages, which contain general information on each entity, and (2) the detail pages, which contain all available data on a given entity. Some entries also contain the names and ids of related entities stored in different endpoints. | ||
|
||
a. To access the listing pages for a given endpoint, enter the following URL: | ||
|
||
:: | ||
|
||
ocd.datamade.us/{end_point_name}/ | ||
|
||
The endpoint name should be one of the following categories listed above. Example: | ||
|
||
:: | ||
|
||
ocd.datamade.us/events | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Querying Endpoints | ||
================== | ||
|
||
Each of the API’s endpoints can be individually filtered and searched to provide more specific results. While users can search the API using basic URL query strings, OCD also supports a handful of more advanced queries, including certain Django URL Filters. (https://github.com/miki725/django-url-filter) | ||
|
||
Query basics | ||
~~~~~~~~~~~~ | ||
|
||
i. URL query strings always begin with a question mark (?) | ||
|
||
:: | ||
|
||
http://ocd.datamade.us/bills/?{query string} | ||
ii. If queries contain multiple parameters, separated them with an ampersand (&) | ||
|
||
:: | ||
|
||
i.e. http://ocd.datamade.us/bills/?{param1}&{param2}&{param3} |