#nodejs #api #opendata #hackthenorth
codx.ca/hackthenorth
ahmadnassri.com
GET /who HTTP/1.1
Host: www.ahmadnassri.com
Accept: application/json
HTTP/1.1 200 OK
Date: Sat, 17 Sep 2016 12:00:00 GMT
Content-Type: application/json
{
"name": "Ahmad Nassri",
"website": "http://www.ahmadnassri.com/",
"twitter": "@AhmadNassri",
"email": "ahmad@ahmadnassri.com",
"bio": "Technologist, Entrepreneur, Dog Lover"
}
GET /who HTTP/1.1
Host: joseph.by
Accept: application/json
HTTP/1.1 200 OK
Date: Sat, 17 Sep 2016 12:00:00 GMT
Content-Type: application/json
{
"name": "Joseph Bou-Younes",
"website": "http://joseph.by/",
"twitter": "@josephby",
"email": "joseph.bouyounes@codx.ca",
"bio": "Business, Tech, Data, Diapers"
}
In Egyptian mythology, Apis, is a bull-deity that was worshipped in the Memphis region. Apis served as an intermediary between humans and an all-powerful god.
an application programming interface (API) is a set of routines, protocols, and tools for building software applications.
A Web service is a method of communication between two electronic devices over a network. It is a software function provided at a network address over the web with the service always on.
REST (REpresentational State Transfer) is a simple stateless architecture style that generally runs over HTTP.
Collection+JSON
Hypertext Application Language (HAL)
ATOM
GET /player/1234567890 HTTP/1.1
{
"@context": {
"@vocab": "https://schema.org/",
"image": { "@type": "@id" },
"friends": { "@type": "@id" }
},
"@id": "https://api.example.com/player/1234567890",
"playerId": "1234567890",
"name": "Kevin Sookocheff",
"alternateName": "soofaloofa",
"image": "https://api.example.com/player/1234567890/avatar.png",
"friends": "https://api.example.com/player/1234567890/friends"
}RFC 2617
# URL Versioning:
GET /api/v2/foo HTTP/1.1
# Custom Header:
GET /api/foo
X-VERSION: 2
# Content Type
GET: /api/foo
Accept: application/vnd.github.v3.raw+json"Open [data] means anyone can freely access, use, modify, and share the data for any purpose (subject, at most, to requirements that preserve provenance and openness)." - the Open Definition project
It's the fastest and easiest way to bring the outside world into your hack.
codx.ca/hackthenorth
Useful Examples!
codx.ca/hackthenorth
| Level of Gov't | Responsibilities | Example Data |
|---|---|---|
| Federal | Agriculture, Financial Services, Economic Data, Natural Resources, CRA, Census, Weather Agriculture, Financial Services, Economic Data, Natural Resources, CRA, Census, Weather |
Criminal Code Weather GIS and Imagery Economic Data Tax Code |
| Provincial | Courts, Education, Environment, Energy, Health Care |
K-12 Curriculum Court Rulings |
| Municipal | Water, Traffic, Parking, Property Tax | Property Tax Traffic Flows |
codx.ca/hackthenorth
WARNING:
Data is often old, out of date, or inconsistent.
LOOK FIRST
codx.ca/hackthenorth
codx.ca/hackthenorth
2. Google
codx.ca/hackthenorth
3. Portals
codx.ca/hackthenorth
4. Check Usability
Text
Text
Text
NO!
codx.ca/hackthenorth
5. Download!
codx.ca/hackthenorth
Twitter
@AhmadNassri
Slack
@AhmadNassri
Website / Blog
AhmadNassri.com
Twitter
@josephby
Slack
@josephby
RFTM
codx.ca/hackthenorth