API Reference¶
API root is https://api.userfeeds.io/
Note
APIs that attempt to create Claims using HTTP require API key for access, before you start using them you should register and get your API Key at https://api.userfeeds.io/portal/apis/.
Read-Only APIs do not require API key.
Ranking¶
Get ranking for given context according to algorithm.
read-only
Available algorithms are described in Algorithms section.
$ curl https://api.userfeeds.io/ranking/ethereum/all/
-
GET
/ranking/
(string: context)/
(string: algorithm)/
¶ Example request:
GET /ranking/ethereum/all/ HTTP/1.1 Host: api.userfeeds.io Accept: application/json
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "items": [ { "target": "https://ethereum.org/", "score": 123 }, { "target": "https://userfeeds.io/", "score": 88 } ] }
Algorithms¶
Get all available algorithms for given context
read-only
$ curl https://api.userfeeds.io/ranking/ethereum/
-
GET
/ranking/
(string: context)/
¶ Example request:
GET /ranking/ethereum/ HTTP/1.1 Host: api.userfeeds.io Accept: application/json
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "items": [ { "description": "Simple hold-based algorithm", "source": "https://github.com/Userfeeds/Algorithms/simple/" "identifier": "simple" }, { "description": "All claims sorted by time", "source": "https://github.com/Userfeeds/Algorithms/all/" "identifier": "all" } ] }
Storage¶
Post claim
to Userfeeds Platform.
Note
This API requires Authorization header. Register at https://api.userfeeds.io/portal/apis/ to get one.
$ curl -X POST https://api.userfeeds.io/storage/ \
-H "Content-Type: application/json" \
-H "Authorization: API_KEY" \
--data @/path/to/claim.json
-
POST
/storage/
¶ Example request:
POST /storage/ HTTP/1.1 Host: api.userfeeds.io Content-Type: application/json Authorization: API_KEY Content-Length: 104
Example response:
HTTP/1.1 202 ACCEPTED Content-Type: application/json Content-Length: 27 {"status": "Accepted"}
Verification¶
Verify claim
signature.
Note
This API requires Authorization header. Register at https://api.userfeeds.io/portal/apis/ to get one.
$ curl -X POST https://api.userfeeds.io/verify/ \
-H "Content-Type: application/json" \
-H "Authorization: API_KEY" \
--data @/path/to/claim.json
-
POST
/verify/
¶ Example request:
POST /verify/ HTTP/1.1 Host: api.userfeeds.io Content-Type: application/json Authorization: API_KEY Content-Length: 104
Example response:
HTTP/1.1 200 OK Content-Type: application/json Content-Length: 27 {"valid": true, "error": null}
HTTP/1.1 400 BAD REQUEST Content-Type: application/json Content-Length: 27 {"valid": false, "error": "Invalid message format"}
Contexts¶
Get contexts supported by Userfeeds Platform
TODO
Tokens¶
Get token balance for given identifier
TODO