Deezer API - get large cover - deezer

I'm trying to get a larger version of cover from Deezer's API. From what I read, adding size/big shoul suffice, but it doesn't - I get error in return. What can I do?
My current URL is https://api.deezer.com/album/302127/image/size/big

Here's the correct format for the url : https://api.deezer.com/album/302127/image?size=big

Related

How to get live video id from YouTube channel

YouTube API eventType=live not working, does anyone have an idea why?
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCmyKnNRH0wH-r8I-ceP-dsg&eventType=live&type=video&key=
Without eventType was working fine (but not now):
https://www.youtube.com/embed/live_stream?channel=UCmyKnNRH0wH-r8I-ceP-dsg&autoplay=1
Looks like YouTube changed something in API, search.list really not returning live broadcast since end of last week.
If you have user's access token you can use https://www.googleapis.com/youtube/v3/liveBroadcasts?part=snippet&broadcastStatus=active&broadcastType=all
endpoint to retrieve if any broadcast is live.
If you do not have user's access token, you can try this answer
but i didn't check it if it is working
Anyway this question looks like to be a duplicate of this question
Right now the YouTube API is not working, specifically for retrieving live streams of a specific channelId. In other words if you are setting channelId in the API call, you will get 0 results.
If you're using an API key rather than OAuth (not sure if OAuth works) the only work around at the moment is to use the API to search for a specific title. Here is my query URL below.
https://www.googleapis.com/youtube/v3/search?part=id%2Csnippet&type=video&maxResults=20&order=date&q=My+Uniquely+Titled+Livestream&key=[apiKey]
The results returned by the API will be from all of YouTube. (Note: the rest is done serverside) Put the results into an array and discard any that don't match your channelId. Then check the titles in an array and only get the video ID of the one that matches your desired title. That is the basic logic and it is sort of a rigid work around that won't work for most. But at least it will get you what you need until Google fixes the API.

Using Google Places Web API to search for business and using results to make a phone call

I'm working on a project, and I'm completely stuck.
I get the user's location using CLLocation and am able to get the place name using CLGeocoder, and using this I've constructed a URL to search the Google Places Web API.
My question is, how can I actually complete the search and return the top place result's phone number? Any help would be much appreciated!
let url: URL = URL(fileURLWithPath: "https://maps.googleapis.com/maps/api/place/textsearch/json?query=taxi+" + placeMark.locality!+"&key=" + self.GAPIKEY)
This is the URL I've come up in case that helps
The first thing you need to do is an HTTP GET on the URL to get the API results. Consult the following SO question for various ways to do that:
How to make an HTTP request in Swift?
The data returned will be a JSON document in the format described in the Google Places API Docs. Look for the formatted_phone_number and/or international_phone_number fields. See Working with JSON in Swift for how to parse the JSON string.

How to get big picture from feed (now)? Api has been changed

I just noticed that Facebook has been changed on retrieving the picture url from feed. Usually I replace _s with _n and I get the "normal" image.
Now I get somthings like this:
https://scontent-b.xx.fbcdn.net/hphotos-xfp1/v/t1.0-9/p130x130/10527490_10152146397901714_1807442783989783336_n.jpg?oh=a4035ad97f2fa1f9a5cf1612e2195662&oe=542053AD
which is only "small". How can I get the bigger one?
You should ideally be using graph api to get pictures.
If however, you need to get bigger image from these type of url links.
First retreive their final url after 302 redirect :
h ttps://scontent-b.xx.fbcdn.net/hphotos-xfp1/v/t1.0-9/p130x130/10527490_10152146397901714_1807442783989783336_n.jpg?oh=a4035ad97f2fa1f9a5cf1612e2195662&oe=542053AD
Remove the bold part, and you will get the original image:
https://scontent-b.xx.fbcdn.net/hphotos-xfp1/10527490_10152146397901714_1807442783989783336_n.jpg?oh=a4035ad97f2fa1f9a5cf1612e2195662&oe=542053AD
EDIT : This method does not work anymore,graph api is the best way to go.

POST request from iPhone to Django

I'm trying to send a POST request from iPhone to Django, but for some reason I can't. The request is sent, but the server doesn't receive it properly.
What is the regular expression that accepts POST? In my case, I use this one: /messages/a/s=person1&r=person2&c=hello/.
How do I retrieve the POST arguments in the Django view? request.POST['s'] should work?
Thanks.
POST parameters are not part of the URL, so your regex should simply detail the main part of the url you want to receive it on. To take your example, change it to /messages/a/. Then, in your "messages" app, have a view/function called a: that one will be reached on receiving any POST (or GET, which you're currently (almost) depicting in your url) to that location.
The arguments can then indeed be retrieved using request.POST['keyname']. To make things more convenient, supply a default value when getting the data so you need less error checking: request.POST.get('keyname', None). This will get the value of keyname when available, or None otherwise.
The posting itself... depends on more code then you're currently showing. Can't say anything about that with your current question.
That URL you've pasted in will pass the data through the request.GET dictionary. If you want to change your iPhone app to POST data, you'll have to share your code.

Facebook graph api search results depends on location?

I've tried to fetch results using Graph search API and I've notice that the results when executed in my computer (Argentina) are different from the results when I run it in a server (France).
Is this like this? How can I force a location for a search?
Thanks #Sascha Galley. I also find another easy way.
Just add &locale=en_US in Facebook Graph search API query URL.
This is languages and locales list refrence
I don't know exactly which results are different and which skd version you are using, but one possible approach is to send the accept-language header with the cURL request. In the facebook api php file add the following line in the function makeRequest() below $opts = self::$CURL_OPTS;
$opts[CURLOPT_HTTPHEADER] = array('Accept-Language: en-us,en;');
This post is almost two years old: Get Facebook Graph API results in English
Actually, this issue should have already been solved: Return values from the graph-api depend on geographic server location