Get mayor and last comment from foursquare page - foursquare

How can I get the last comment and who the mayor is from foursquare page ?
Let's say this is the url:
https://foursquare.com/v/anatomska-centrala/4dab1ba55da3ba8a479999b2.
And I need to fetch somehow this data:
For last comment:
Damir P. August 23, 2011
najjači fitness centar u gradu
For mayor:
Mayor: Mrgud N.
17 check-ins in last 60 days
I tried using foursquare's Venue Detail and combining it with the url's value (4dab1ba55da3ba8a479999b2) but unsuccessful.
I have non experience working with foursquare API so any help would be appreciate.
Thank you

You can indeed retrieve the mayor and all tips ("comments") from the venue detail endpoint. Try this: https://developer.foursquare.com/docs/explore#req=venues/4dab1ba55da3ba8a479999b2
In the response, look for response.venue.mayor and response.venue.tips.

Related

Supplying tour dates for artists

I get questions about the tour dates an artist can activate in their verified profile. Is it possible to supply these via an API on Spotify?
Thanks!
Regards,
Marlon
No, it's not possible. You might want to check out Songkick's API with over 3 million concerts though.

Instagram api: how to get photos containing like?

in my application, i enter a user name and get his photo.
(To get photos, i use: https://api.instagram.com/v1/users/3/media/recent/?access_token = ...)
Request returns only 20 pictures, how to get all photos user?
I want to get photos of this user which contain his likes.
How can this be done?
I have an idea to get all the pictures that have user and check each pictures does it have his like ?!
But I get only the data for the four member who delivered Like, although photo has 50 likes. (See the screenshot below). Why so ? How to fix it ?
Thanks for the help.
It's a two step process:
1) Perform a GET request to /users/user-id/media/recent inorder to get the most recent media published by a user.
2) Then perform a second GET request to /media/media-id/likes in order to get a list of users who have liked this media.
At this point you can record all the media-id's which contain likes by the specific person you want.
Here is the API for instagram users:
http://instagram.com/developer/endpoints/users/
Here is the API for instagram likes:
http://instagram.com/developer/endpoints/likes/
As for getting the entire history, I apologize but I'm unclear as to how to go about doing more than what they provide.
Please let me know if you have any questions!

how to add new category to foursquare

I see that there is no very useful category in the foursquare category list provided by API.
This category is "Car services".
And what's more important for me in RU locale is that it should be "Автосервис" or "Станция технического обслуживания авто".
Now many venues are marked with the wrong category because of the absence of these categories.
For example, car service venues are marked as "Automotive Shops" or in Russian "Магазин автотоваров". This is completely the wrong meaning.
So the question is how can I request for the addition of a new category?
Unfortunately there's no way to add venue categories via the Foursquare API, but please feel free to reach out to Foursquare support directly with your feedback: http://support.foursquare.com/requests/new

Foursquare API: Venues visited by a user sort

For the Foursquare api
Venues visited by a user
https://api.foursquare.com/v2/users/USER_ID/venuehistory
I was wondering if we can change the sort of the venues coming back? It appears to be sorted by alpha. It would be helpful to sort by most recent checkin. Or in addition to the beenHere field add a last_checkin_id: or just date would be fine.
Is there a sort query string parameter that i am missing?
The venuehistory endpoint simply returns all the venues that a user has been to. If you're looking to sort venues by most recent check-in, consider using the user/checkins endpoint instead.

Find if Foursquare venue mayor is currently at the venue

I am looking for a way to know whether the Foursquare venue mayor is currently checked in. Several 4sq apps show whether the mayor is at the venue when you check i but I am not able to find how to do this using the 4sq API. Any help would be appreciated.
The venue aspect returns a hereNow block which lists all people who have publicly shared their location.
It also returns a mayor block, listing the ID of the current mayor.
This means that you can simply iterate through the hearNow list and see if the mayor shows up. Easy!

Resources