Using Spotify API to get search result in the player - spotify

I know I can use the API command https://api.spotify.com/v1/search to get a search result in an JSON string.
But can I use a Spotify API command to send a search query to the player and get the result in the player itself?

Seems like spotify:search:<search_term> works.
Try something like spotify:search:the%20rolling%20stones in a browser. It should link you to the app, in the search section. (Tested on macOS and iOS and it works)

Related

Getting dailymotion videos exact same order with Dailymotion itself using API

I'm trying to make an aplication using Dailymotion API. I use video search and want to get them ordered like when you search on dailymotion itself but I think I couldn't find proper parameters.
I tried these get requests:
https://api.dailymotion.com/videos?search=Masterchef+(UK)+S15E11
https://api.dailymotion.com/videos?search=Masterchef+(UK)+S15E11&sort=recent
https://api.dailymotion.com/videos?search=Masterchef+(UK)+S15E11&sort=relevance
When I try to search in dailymotion.com, result:
Search Masterchef (UK) S15E11
Unfortunately it's not possible today to get the same search result with our public API.
The website uses our new API engine which is not available publicly yet but we are working on it.

How can I get individual image_urls from an Instagram album using oembed api call?

I have been using the Instagram API to get images and videos, which works just fine. I then noticed the oembed API call, which does not require an access_token, and I decided to give that a try, which also worked just great as the thumbnail_url size is adequate for most uses.
However, I noticed that the images retrieved from an album, all have a thumbnail_url that returns a 5xx Error from Instagram.
My thinking is that:
a) This is exactly how it is supposed to work and if I want images from a gallery/album, I need to use the media API call and access_token like most normal people
b) There is a way to access all images from a gallery/album and I just don't know yet. What if I want to embed the album? If this is the case, how can I check if it is an album or single image before making an API call?
Here is what I have so far:
Instagram permalink for album/gallery: https://www.instagram.com/p/BTHpAmzDHKR/
OEMBED API call: https://api.instagram.com/oembed/?url=https%3A%2F%2Fwww.instagram.com%2Fp%2FBTHpAmzDHKR%2F
thumbnail_url returned: https://scontent-dft4-2.cdninstagram.com/t51.2885-15/s612x612/e35/18012162_1608580785827161_2716056344971968512_n.jpg
media API working url for same image:
https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/18012162_1608580785827161_2716056344971968512_n.jpg
This opens up to a 5xx Server Error
Is it possible or not using oembed call?
NOTE: I am trying this just out of curiosity and not for any real app.
Closing this out as my research has shown that oembed is for single media type only, not for carousel/albums. Instagram API call which uses tokens is required.

Using Chromecast Android API to push a URL to the "ChromeCast" App

So far I've been able to write a webpage that pushes a url to the (what I'm calling) native app in the chromecast device. Through this API I can open a "video_playback" app that sends the URL and some other info, just like in this webpage http://googlecast.github.io/cast-chrome/ to my device and my video plays just fine...
Now I want to do that with the Android API, but it treats that receiver "app" as if it doesn't exist. With some more poking around I found that the actual name of the app is ChromeCast, but all I've been able to do is get a blank screen or a 404 to show up. Is this not supported on the Android app? (ie I'm forced to write my own receiver) or am I doing something wrong?
I perfectly able to open a YouTube app through the Android API and load a video, so most of my code is fine. It seems I just need to figure out what application name and arguments to use in the ApplicationSession.startSession() function.
Any help would be appreciated.-
How are you starting your session (which version of startSession() are you using?)
It sounds like you are starting your session ok but then you need to send the url of the video via the MediaProtocolMessageStream.loadMedia().
https://developers.google.com/cast/reference/android/javadoc/reference/com/google/cast/MediaProtocolMessageStream#loadMedia(java.lang.String, com.google.cast.ContentMetadata, boolean)

POSTing Data From Windows Phone app to Web Page

I have a Windows Phone 8 app. My app needs to POST some data to a web page that I have on my server. Please note, I am trying to POST to a web page, not a web service. The reason that I need to POST to a web page is because 1) I'm trying to render some contents in a web page that is currently launched via a WebBrowserTask 2) I am passing a large amount of data to the web page.
From what I can tell, the WebBrowserTask only allows "GET". Now, I'm totally lost in regards to what to do. Is there a was to POST data via a WebBrowserTask? If not, is there a way to serialize my data as JSON and cram it into the query string? I know that's ugly. At the same time, I'm not sure what else to do.
Thank you
Try adding a WebBrowser control then make your request through either WebClient or HttpWebRequest. Once you get the html response use the NavigateToString(string) method to display the result.
But you can simply use the Navigate(uri) method if you only need to specify some query string params.

Creating Spotify playlist with standalone web app

I just want to be able to create a playlist by sending / receiving http requests ( a standalone web app, not with Spotify Apps and the desktop client). I've dug around the docs and can't find a clear solution. Can someone point me in the right direction? Thanks in advance.
You can pass a list of songs—not a playlist—to the desktop player by adding the track ids to a link as below
Play
UPDATE
As of today there is an api for creating playlists: https://developer.spotify.com/web-api/create-playlist/
I just want to be able to create a playlist by sending / receiving
http requests
This isn't possible at the moment — Spotify doesn't have a web API for manipulating playlists. You may be able to hack a solution together using libSpotify, although using libSpotify in a server service this way is against the ToS.
You might want to look at https://github.com/liesen/spotify-api-server
It is limited to just one spotify account (the one you configure it with) but does allow playlist creation/manipulation via RESTish calls.

Resources