Fandom

Resighting Wiki

CreateSighting Method

71pages on
this wiki
Add New Page
Comments0 Share

Create a new Sighting.

Url: https://resighting-api.appspot.com/api/1/sightings

HTTP Method: POST

ParametersEdit

Name Type Mandatory Description
access_token String(32) Yes A valid access token.
accuracy Float No The accuracy in metres of the latitude and longitude reading. Should be omitted if not known.
altitude Float No The altitude in metres. Should be omitted if not known.
altitude_accuracy Float No The accuracy in metres of the altitude reading. Should be omitted if not known
blobtracker_id String(200) No The blobtracker_id of the evidence image to use for this Sighting as returned by the Upload method.
description String(200) Yes The description of the Sighting.
heading Float No The heading of the user when the Sighting was made. Should be omitted if not known.
hold Boolean No Whether the Sighting should be placed on-hold.
latitude Float Yes The latitude of the Sighting.
locator_id Long[] No Zero or more Ids of Locators to which this Sighting should be submitted.
longitude Float Yes The longitude of the Sighting.
publish_to_facebook Boolean No Whether the Sighting should be published to the user’s Facebook feed. If the user hasn’t linked their Resighting account to Facebook then this flag has no effect.
sandbox Boolean No Whether the method should run in sandbox mode - no writes will be made to the datastore.
speed Float No The speed the user was traveling when the Sighting was made, if known.
tweet_sighting Boolean No Whether the Sighting should be tweeted. If the user hasn’t linked their Resighting account to Twitter then this flag has no effect.
tz_offset Integer Yes

The number of minutes that the user’s timezone is offset from UTC. This allows us to adjust the Sighting date/time correctly.

Valid values are from -720 (UTC-12:00) to 840 (UTC+14:00).

ReturnsEdit

Returns a Sighting object and HTTP status 200, or an Error object and HTTP status 4xx or 5xx. If the sandbox parameter was set then the returned object will contain dummy data and a boolean attribute named sandbox, which will have the value True. See the section on sandboxing for more details.

Example UsageEdit

curl https://resighting-api.appspot.com/api/1/sightings --data access_token=ACCESS_TOKEN --data description="A test" --data latitude=48.8396 --data longitude=2.3014 --data tz_offset=120

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.