This repository has been archived by the owner on Dec 22, 2019. It is now read-only.
Releases: Augora/api-wrapper
Releases · Augora/api-wrapper
Changing names to *real* english, lel.
💣 BREAKING CHANGE ⚠️
getDeputes()
=> getDeputies()
Just the name is changing so you have to rename all the calls in order to use this version.
First working version
Summary
This release includes only one function:
- getDeputes()
Usage
Install
npm install --save-dev lbp-wrapper
Calls
import { getDeputes } from 'lbp-wrapper';
getDeputes().subscribe(
deputes => console.log(deputes),
error => console.error(error)
);
Data normalization
All data returned from the API is normalized. The global structure of this call looks like this:
{
"entities": {
// All deputies will be listed here
"depute": {
"1": {
"id": "1",
"name": "...",
// Ids of site entities
"site": [ "http://twitter.com/qq" ],
},
"2": {
"id": "2",
"name": "...",
// Ids of site entities
"site": [ "http://twitter.com/qq2" ],
},
},
"site": {
"http://twitter.com/qq": {
"site": "http://twitter.com/qq",
},
"http://twitter.com/qq2": {
"site": "http://twitter.com/qq2",
},
},
},
// ids of deputies
"results": [ "1", "2" ],
}