-
Notifications
You must be signed in to change notification settings - Fork 5
get_stories.json
Timothy Duffy edited this page Apr 5, 2015
·
2 revisions
###get_stories.json###
This end point allows users to get the current stories that your location is showing.
get_stories.json?cuid=<client_id>&lat=<lat>&lng=<lng>&language_code=<language_code>
There are four required fields:
[GET]
client_id:
This is of type text, and is the unique id of the client. This is a uuid that is generated by the
client and is associated with a user within the database. Event if a user is 'validated' their
unique client_id is still used to identify them.
[GET]
language_code:
This is of type text, and holds the two letter language code the post is in. Language codes must
match those codes that exist within the languages table within the database. Valid values currently
are:
en - English
es - Español
Note: If responding to an assignment, the response post should have the same language code as the
question being asked.
[GET]
lat:
This is the latitude of the user. 43.1656 is an example.
[GET]
lng
This is the longitude of the user. -77.6114 is an example.
A valid response looks like this:
{
"total_story_count": 1,
"stories": [
{
"bottom_right_lat": 43,
"top_text": "",
"author_last_name": "SYSTEM USER",
"top_left_lng": -77.9,
"banner_media_file_name": "dea9d50a-d6ec-4f39-9d8e-3a4a5d21e618.jpg",
"author_first_name": "SYSTEM USER",
"title": "My Story!",
"bottom_right_lng": -77.3,
"story_unique_id": "194e2157-dd3c-4cba-bcc6-49a360c8fde0",
"tags": "first, story, fresh",
"author_organization": "Yellr",
"banner_media_id": "25b0910f-480e-4add-bd41-194b502c71a8",
"author_email": "",
"top_left_lat": 43.4,
"edited_datetime": "None",
"publish_datetime": "2014-08-22 16:03:37.450331",
"contents_rendered": "... the <b>story</b>!"
}
],
"success": true
}