-
Notifications
You must be signed in to change notification settings - Fork 1
API reference
#Welcome to the binWatch wiki!
Web URL : http://binwatch-ghci.rhcloud.com/
Requirements Doc : http://www.acehacker.com/ghci2015/project3.pdf
-
Returns all the bins (default limit 15)
URL : [BASE_URL]/get/bins
METHOD : GET
Response Format : https://api.myjson.com/bins/3omdc
http://binwatch-ghci.rhcloud.com/get/bins -
Returns bins for a page (page limit 15)
URL : [BASE_URL]/get/bins/page/:pagenumber
METHOD : GET
Response Format : https://api.myjson.com/bins/3omdc
http://binwatch-ghci.rhcloud.com/get/bins/page/1 -
Returns bins for a page and specify custom page limit (max page limit 15)
URL : [BASE_URL]/get/bins/page/:pagenumber/:limit
METHOD : GET
Response Format : https://api.myjson.com/bins/3omdc
http://binwatch-ghci.rhcloud.com/get/bins/page/1/3
URL : http://binwatch-ghci.rhcloud.com/get/bin/:id
METHOD : GET
Response Format : https://api.myjson.com/bins/4zrwg
3. GET bins near a location **
-
Returns all the bins (default limit 15)
URL : [BASE_URL]/get/bins/:latitude/:longitude
METHOD : GET
Response Format : https://api.myjson.com/bins/3omdc
http://binwatch-ghci.rhcloud.com/get/bins/12.92/77.60 -
Returns bins for a page (page limit 15)
URL : [BASE_URL]/get/bins/:latitude/:longitude/page/:pagenumber
METHOD : GET
Response Format : https://api.myjson.com/bins/3omdc
http://binwatch-ghci.rhcloud.com/get/bins/12.92/77.60/page/1 -
Returns bins for a page and specify custom page limit (max page limit 15)
URL : [BASE_URL]/get/bins/:latitude/:longitude/page/:pagenumber/:limit
METHOD : GET
Response Format : https://api.myjson.com/bins/3omdc
http://binwatch-ghci.rhcloud.com/get/bins/12.92/77.60/page/1/3
-
Returns sensor data of the bin the bins (default limit 15)
URL : [BASE_URL]/get/bin/:id/activity
METHOD : GET
Response Format : https://api.myjson.com/bins/3omdc
http://binwatch-ghci.rhcloud.com/get/bin/562115d1990b1b59a5000001/activity -
Returns sensor data of the bin for a page (page limit 15)
URL : [BASE_URL]/get/bin/:id/activity/page/:pagenumber
METHOD : GET
Response Format : https://api.myjson.com/bins/3omdc
http://binwatch-ghci.rhcloud.com/get/bin/562115d1990b1b59a5000001/activity/page/1 -
Returns sensor data of the bin for a page and specify custom page limit (max page limit 15)
URL : [BASE_URL]/get/bin/:id/activitypage/:pagenumber/:limit
METHOD : GET
Response Format : https://api.myjson.com/bins/3omdc
http://binwatch-ghci.rhcloud.com/get/bin/562115d1990b1b59a5000001/activity/page/1/3
URL : http://binwatch-ghci.rhcloud.com/get/bin/:id/activity
METHOD : POST
PARAMS :
`start`: Start Date
`end`: End Date
`param`: bin attribute (humidity|temperature) `Optional`
URL : http://binwatch-ghci.rhcloud.com/get/bin/:id/prediction
METHOD : GET
Note : Pagination params for time range api are same as for all the api's
{
"errorCode": 102,
"errorText": "Invalid Input"
}
** : https://github.com/hkasera/binWatch/wiki/How-nearby-bins-are-calculated%3F