Wiki
Clone wikima3route-api-documentation / External Stream
#!https GET /externalstream
To access externalstream send a GET request to https://www.ma3route.com/findit-api/v2/json/externalstream
Parameters
Note: If no other parameter other than the default parameters is supplied, the server returns a list of 100 items.
- id a long value. The server returns a json object of the news item whose id equals the value supplied.
Server Response
The response is a JSON object with "meta" and "data" properties.
data is a json object/array representing an external stream item or a list of external stream items respectively.
Sample Response
#!json { "meta":{ "listsize":1 }, "data":[ { "id":788366, "date":"Jul 20, 2015 2:44:54 AM", "isactive":true, "description":"On top of one flyover along Msa Rd. The Rd looks rather clean @Ma3Route @KenyanTraffic @BarackObama @UKenyatta http://t.co/mQpdUQooHZ", "descriptionjs":"On top of one flyover along Msa Rd. The Rd looks rather clean @Ma3Route @KenyanTraffic @BarackObama @UKenyatta http:\\/\\/t.co\\/mQpdUQooHZ", "reportedby":"@vismartCab_KE", "datelong":1437385494289, "mediaurl":"http://pbs.twimg.com/media/CKWTyHMUwAAKiEk.jpg", "profilepic_url":"http://pbs.twimg.com/profile_images/601738970863673345/NE96cXBk_bigger.jpg", "csmediaurls":"http://pbs.twimg.com/media/CKWTyHMUwAAKiEk.jpg,http://pbs.twimg.com/media/CKWTzTXUEAAOI-s.jpg,http://pbs.twimg.com/media/CKWT0P9UcAAlyn6.jpg", "linkedtweetid":"-1" } ] }
Create update from stream
- severity String value and is mandatory. This is the severity. Fetch supported severities at https://www.ma3route.com/findit-api/v2/json/severities
- latitude and longitude are also not mandatory, but important for mapping updates. Get from the streamed object.
- town_id represents the id of the town. To get all towns and their respective ids, send a GET request to https://www.ma3route.com/findit-api/v2/json/towns . The data part of the response json object is a JSON array with each JSON object representing a town. The country property denotes the country that the town belongs to.
- email email of the user posting the update. In this case, this is the email of the moderator.
- reportedby identifier text of the user posting the update. This MUST be provided. Pick from "reportedby" of the streamed object.
- mediaurl a fully qualified url of the photo attached to an update. Pick from "mediaurl" of the streamed object.
- csmediaurls a comma separated string of fully qualified urls of the photos attached to an update. Pick from "csmediaurls" of the streamed object.
- sharelocation boolean true/false. Indicates whether a user wants location to be shared. Always true.
- linkedtweetid numeric. This is the id of a of the original tweet/post linked to an update. pick from the "linkedtweetid" of the streamed object.
Create report from stream
- regno String value and is mandatory. This is the registration number of the reported vehicle. It's entered.
- drivetype String value and is mandatory. Fetch supported drivetypes at https://www.ma3route.com/findit-api/v2/json/drivetypes
- latitude and longitude are also not mandatory, but important for mapping updates. Get from the "latitude" and "longitude" from streamed object.
- town_id represents the id of the town. To get all towns and their respective ids, send a GET request to https://www.ma3route.com/findit-api/v2/json/towns . The data part of the response json object is a JSON array with each JSON object representing a town. The country property denotes the country that the town belongs to.
- email email of the user posting the update. In this case, this is the email of the moderator.
- reportedby identifier text of the user posting the update. This MUST be provided. Pick from "reportedby" of the streamed object.
- mediaurl a fully qualified url of the photo attached to an update. Pick from "mediaurl" of the streamed object.
- csmediaurls a comma separated string of fully qualified urls of the photos attached to an update. Pick from "csmediaurls" of the streamed object.
- sharelocation boolean true/false. Indicates whether a user wants location to be shared. Always true.
- linkedtweetid numeric. This is the original tweet/post id linked to a report. Pick from "linkedtweetid" of the streamed item.
Updated