Searching spotify user's music library for particular genre - iphone

I am developing third party app on spotify platform. In that, user have to select spotify user's music library playlist (top 100 songs by Spotify user). So, I am trying to search spotify library for particular genre.
I am using SPSearch with Query genre:pop. But for some generics like "rock" it return nil.
I am using latest build of cocoalibspotify. Please can somebody tell how to get Spotify user track list or playlist for particular genre?

The full advanced search documentation can be found here.
Note that this will search the entire Spotify catalog, not just the user's own library. There's currently no built-in way to only search the user's library at this time.

Related

Is it possible to use Apple Music's MusicKit SDK to play user's own station?

I'm trying to allow user's to play user's own station in my app. But after some research, I couldn't figure out whether it's achievable.
As shown below, I want this particular station which Apple Music generated for the user. Does anyone know if Apple make this API public?
You can use the recommendation API, which provides the user's personal station.
https://api.music.apple.com/v1/me/recommendations
More about it here - https://developer.apple.com/documentation/applemusicapi/get_default_recommendations

Can Google Assistant access audio on a web post

I want to allow my friend using Google Home to access audio posts on a WordPress blog. Can I make it treat my blog as a podcast without registering it with, say, iTunes?
I don't have a Google Home unit, and have not found detailed documentation on Google Assistant, except for writing actions. Is there a simpler way to do what I want without writing an action? Can I get my audio file and then access the existing code that handles operations within a file such as seeking, play, pause, etc. from my action?
You can take a look at content actions to generate a unique feed for your audio posts. In this way, you would be able to effectively create a podcast which can be surfaced by users on Google Homes as well in the Google Podcasts app. This would be a shallow integration.
If you want something more advanced and customized, you can create an Action and make use of the Media Response in Actions on Google.
Even if you don't have a Google Home, you are able to access your Action from other surfaces like a smartphone. You can also make use of the simulator in the Actions on Google console for development.

Accessing User 'Most Listened To' using Spotify / Echo Nest / Facebook API

I want to know if I can access a user's play history (more specifically what songs they listen to the most) for an app. The app I am building can perform the same goal with iTunes using their built-in play counter. I know Spotify uses a similar counter, but I assume for privacy concerns they don't want to deal with privacy concerns from concerned users. However, I saw a few instances where it was suggested that this task could be accomplished using Facebook's API, or Echo Nest's API. Please let me know if anyone has some constructive suggestions toward finding a way to legally obtain a particular users 'most listened to songs', or something to that effect.
SB
There's some documentation about Open Graph Music on the Facebook Developer homepage:
https://developers.facebook.com/docs/opengraph/music/
Baseline is that you only can request a User's play history if he gave you app the explicit right to read his data.
The relevant permissions would be
user_actions.music https://developers.facebook.com/docs/facebook-login/permissions/v2.1#reference-user_actions_music
user_actions:{app_namespace} https://developers.facebook.com/docs/facebook-login/permissions/v2.1#reference-user_actions__app_namespace_
Then, you should be able to request
GET /me/music.listens
according to https://developers.facebook.com/docs/reference/opengraph/action-type/music.listens/ You'll need to perform the aggregation of the most played songs/artists yourself, because there's no endpoint for that.

How to get only playable songs in US?

I'm working on a spotify app with facebook api.
I have the following query.
me/music.listens?limit=5&util=1 week ago
or
[friend id]/music.listens?limit=5&util=1 week ago
when i get tracks from the above api, I get songs that're not playable in US. Is there a parameter or a way to get songs that are playable in US only?
No, you can retrieve a list of what the user listened to in any of the music apps, but unless you have some other agreement with the providers of the music (e.g. spotify, rdio) there's no way to know if some other user can listen to the same songs.
edit: based on iKenndac's answer, it seems there's a Spotify API to determine playability by region, but you can't get the info from Facebook's API
You can use the Spotify Web APIs to look up territory availability.

Semantic-based recommender Facebook application

As a project of this semester my friend and I are thinking to make a semantic-based recommender Facebook application. For example, if I wanted to go "a trip to Europe", this application is intended to do the following: go search in my friends list and gives me back all photos albums having the name "Italy Travel" or even only containing a comment about "Eiffel Tower", my friends statuses related to anything in Europe, notes of my friends, links they have liked in other websites and other activities that show up in their news feed. And same goes if I want to watch a movie, read a book or study a subject...etc.
And my question is:
Is such thing possible to be
achieved within 3 months? knowing
that we have only the very basis
about Facebook API and semantic
related subjects.
If it is, what Ontology can we rely
on? And what other concepts should
we have as a starting block?
In 3 Months Most probably yes (depends upon how much you already know about Facebook API).
Things you should know before embarking on journey to develop this (Some i think are significant enough..)
Either you can go about developing whole Interaction Code between your server and Graph API yourself.
Or use some SDK that are already out there.(Some are mentioned in Facebook docs) Like Facebook C# SDK for C#.
Understanding of FQL and Graph API (Make some small project first to try and test things like getting user friend list).
Basic understanding of HTTP GET and POST requests and how to construct them in language of your choice.
Parsing JSON in your language.
Get a print out of documentation of selected topics for offline reference (I did that...)