Deezer API - Get user's currently playing track - api

Is there any way to know the state of a track using the deezer api.
"playing" or "not playing" ?
I can't find anything in the docs... I'd like to know the currently playing track for each user of my app... Or at least the last played track.
I assume there might be some privacy issues... any thought?

We don't have a 'now playing' status but you can use the User/History fields:
GET https://api.deezer.com/user/1494543/history
That will give you the full paginated listening history of a given user, updated almost realtime (allow 1 or 2 minutes sometimes). The first result is the last song listened.
Regarding privacy, you'll need to ask the 'listening_history' permission at login.

Related

Soundcloud API: Find track like date via API

I've tried searching through Stack overflow as well as the soundcloud API reference but couldn't find any answer. I'm trying to retrieve the date a user liked a song on Soundcloud. I tried two parts of the API:
- /users/{id}/favorites: This will return all tracks liked by the user, but no date when it was liked.
- /me/activities: This returns track reposts, comments and seemingly tracks that show up on the stream. Sadly there doesn't seem to be a type track-like, but maybe I'm doing something wrong here or need to pass additional parameters.
I'm having the user log into Soundcloud before utilizing the API.
Any chance someone knows if retrieving the track like date via the API is possible?
Thanks!
With the public API available right now, this is not possible.
You have to build it on your own and track the changes in a different, your own database.
Example call from the website when you lookup your likes, i dont know what you will see with a pro account:
https://api-v2.soundcloud.com/users/soundcloud:users:1672444/stats/timeseries/likes?from=1442016000000&to=1442534400000&resolution=day&tracks=soundcloud%3Atracks%3A30984358&client_id=02gUJC0hH2ct1EGOcYXQIzRFU91c72Ea&app_version=39e9f65
Response:
[{"user_urn":"soundcloud:users:1672444","timeseries":[{"time":1442016000000,"count":1},{"time":1442534400000,"count":1}]},{"user_urn":"soundcloud:users:1672444","track_urn":"soundcloud:tracks:30984358","timeseries":[{"time":1442016000000,"count":1},{"time":1442534400000,"count":1}]}]
Here is and older, related answer about playback stats:
How to fetch playback statistics

instagram api search hashtags isn't reliable - so can I do this?

I'm looking to somehow tell users to upload a picture and do something, either tag or # our company so we are notified in real time, i just need to fetch the url of the photo that was uploaded and tagged or # or ANYTHING.
the hashtag search doesn't seem to work correctly, i've tried multiple hashtags and they wont retrieve them in any type of real time or at all.
the real-time subscription only notifies me that there is a new photo tagged that i subscribed to, so i have api search for a list of new media with that tag, which goes back to point 1, its not accurate or reliable.
so do i have any options at all on instagram?
If not do I have any options on facebook? any real time keyword search to grab the url of the photo they uploaded with a unique tag.
Check out https://github.com/chapmanu/hummingbird, it might be what you're looking for.
My experience with the Instagram Real-Time API is, that it is rather reliable.
When you get a real-time ping and then call the endpoint for your hashtag, the results are ordered newest first.
You can then paginate until you hit the last known result.
Maybe this tutorial helps: http://www.mtrinitaria.com/mykhel/tutorial-instagram-real-time-photo-update-api-with-php/

SoundCloud API getting tracks favorites

Is it possible to know, who and when likes your track through SoundCloud API?
I can see this list on http://soundcloud.com/%usernick%/%track-name%/stats/who/favorites?from_date=2012-01-01&to_date=2012-06-09
Days statistics of favorites i can see it http://soundcloud.com/%usernick%/%track-name%/stats/counts/favorites?from_date=2012-01-01&to_date=2012-06-09
But how i can get it through API?
I except this info on GET /tracks/%track_id%/favorites.json or GET /users/user_id/favorites/%track_id%.json, but it isn't working.
Note: This is feature only for paid user.
PS: Sorry for my bad english.
I found only one way -- through /my/activity/, but in this case i must to get all my activity of all tracks, comments and favorites.

Accessing "What are you up to"-comments on foursquare

I am working on a foursquare application where I am depending on user-generated data.
Say for instance that I want to categorize places with rare tap beers on the menu, then I would like users to write in their "What are you up to"-comment something like #RareBeer Pabst Blue Ribbon, and be able to catch that comment.
I understand that my OAuthed user has to befriend users to be able to see this, but how do I proceed from there?
The best way for you to go about this would be to use the Real-Time APIs we detail here: https://developer.foursquare.com/overview/realtime.
Once you set up a Push API consumer, you will be able to get checkins from your OAuthed users sent directly to your server as they occur. Each push will include the shout, if there was one, allowing you to parse the comments your users are leaving as they come in. This is the method that apps like Hashtag Mom ( http://hashtagmom.com/ ) use to be able to gather and act upon user shouts ASAP.

Yelp, Google's API for restaurants help

Ok I have looked into this, and I'm not sure if anyone else has experience with it. I'm having termendous difficulties with Yelp and Google's API.
To help explain what I am trying to do here is the concept of the website. We would have to pull restaurants based on user distance, and then randomize them based on quality of restaurant based on feedback from review websites (Yelp, Google, urbanspoon, zagat, opentable, kudzu, yahoo - doesn't have to be from all), and feedback from our users (on results page for the random restaurant users can select good recommendation/bad recommendation). There’s a lot we could calculate for our formula. Things that will dictate your results will be based on if you’re at home or work. If you’re at home you will have more time to drive out to the city to grab some dinner or lunch. If you’re at work we would have to recommend restaurants nearby as lunch is typically 30 minutes to a hour. A 30 minute lunch would require take out most likely or quick service. A hour lunch break you could dine in at a local fine dining restaurant. So in a nutshell, user comes to website. Select if they're at home or work, click submit and we will have a random restaurant selected for them to go. If they don't like it they can click retry and a new restaurant can show.
The issue I am having is using the API to gather all the restaurants in the US. I know it can be done because there are similiar websites/apps that pull restaurants that are closest to you such as Ness, Alfred, and I believe there's two more but I can't remember the names.
Anyone know if this can be accomplish? As I desperately need some help. Thanks in advance!
Yelp is the API that can provide you list of restaurant as per your search, your search can be area specific, lattitude/longitude specific etc. there are number of API through which you can see the reviews of different restaurant and put some logic based on that.
I think the logic of home/work order is something that you have to integrate in your application, yelp API can provide you with the results as per your search.
Go through their documentation for further information.
http://www.yelp.com/developers/documentation/v2/search_api