Contents:
This API call enables a user to 'Like' a Photomap location.
The call requires that the client generates a token which that application creates as unique to the user, e.g. a session token.
Likes do not require a user account. Accordingly, the value for a location should be treated as indicative.
If the client's user has already set a Like for the location, the Like will be removed; i.e. the API call acts as a toggle.
Example which sets (or unsets) a Like for a location.
POST https://api.cyclestreets.net/v2/photomap.like ( [id] => 80 [token] => 5ea10c55a203a436436eaf940b0c5716 [fingerprint] => b32aa6d841b705cec282458c6a5976ba4e1c6e0454fc5abe6bf1e17c7e525dac )
Result:
{ "id": 80, "likes": 8, "liked": true, }
A repeat request would then remove the Like, resulting in the following response:
{ "id": 80, "likes": 7, "liked": false, }
None.
JSON object as above, showing the number of likes so far, now including the one being submitted.
No cookie/session is created or issued.
JSON object containing an error key and a text string.
Example error (text string will vary):
{
"error": "An error occurred while adding the Like."
}