Fandom

Resighting Wiki

ListSightings Method

71pages on
this wiki
Add New Page
Comments0 Share

Get a list of Sightings for all users. This method can return either latest Sightings or nearest Sightings depending upon the list_type parameter. Multiple pages of results can be requested for latest Sightings but nearest Sightings are restricted to one page only.

The list of latest Sightings is ordered in descending order of Sighting publish date/time (i.e. most recent first) and the list of nearest Sightings is ordered in ascending order of distance from the specified latitude and longitude.

This method never returns held Sightings, even those made by the user who the access token is for. To get held Sightings for the access token user, use the ListUserSightings method.

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

HTTP Method: GET

ParametersEdit

Name Type Mandatory Description
access_token String(32) Yes A valid access token.
cursor String(500) No

A cursor returned by a previous call to the method marking the point where listing should continue from.

Ignored for nearest list type.

end_date DateTime No

The date/time to finish listing at.

Ignored for nearest list type.

fetch_size Integer No The number of results to retrieve. Defaults to 20 if not specified and 20 is the maximum.
latitude Float Yes for nearest list type

The latitude that the list of nearest Sightings should be close to.

Ignored for latest list type.

list_type String(7) Yes

Specifies whether a list of latest Sightings or a list of nearest Sightings is required.

Accepts one of two values: latest or nearest.

longitude Float Yes for nearest list type

The longitude that the list of nearest Sightings should be close to.

Ignored for latest list type.

start_date DateTime No

The date/time to begin listing from.

Ignored for nearest list type.

ReturnsEdit

Returns a List object of Sighting objects and HTTP status 200, or an Error object and HTTP status 4xx or 5xx. Note the restriction that if a Sighting is a resighting, details of the original Sighting are never included in the Sighting objects in lists.

Example UsageEdit

curl https://resighting-api.appspot.com/api/1/sightings?access_token=ACCESS_TOKEN\&list_type=latest

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.