Soundcloud API - (Sometimes) wrong playcount & ISRC code - api

I'm making a statistics system, and fetch some simple data from Soundcloud. But, when I use the very same link, but with different releases, sometimes it doesn't find anything at all, and sometimes the playcount is wrong. Further more, it always returns "null" for the ISRC code, even with tracks where I know it has indeed been submitted.
I use the following endpoint:
https://api.soundcloud.com/resolve.json?url=$url&client_id=$client_id
Now, with the versy same endpoint, I get different results for:
https://soundcloud.com/krisoneil/kris-oneil-fisher-pouring-down-black-hole-out-feb-2nd <- works, and shows the correct playcount
soundcloud[dotcom]/krisoneil/heroic-pleasure <- works, but shows a wrong playcount
soundcloud[dot com]/blackholerecordings/luke-chable-kinetic <- doesn't work
Further more, the two that works both shows "null" for the ISRC code, even though I know they are entered.
I don't get how the same script sometimes work, sometimes kinda work, and sometimes doesn't work at all.
Any help on this would be appreciated!
All thebest wishes,
Kris

I've noticed this too. You could try using the v2 endpoint which is unofficial and undocumented, but it does show the correct stats for me
For favorites -
https://api-v2.soundcloud.com/users/{USER_ID}/track_likes?&limit=200&client_id={CLIENT_ID}
For tracks - https://api-v2.soundcloud.com/users/{USER_ID}/tracks?&limit=200&client_id={CLIENT_ID}
etc...

Related

getAllPrebidWinningBids() returns something but getAllWinningBids() is empty

I've been struggling with pbjs and DFP for several days now and my current problem is the one described in the title: when I type pbjs.getAllPrebidWinningBids() in the console, something is returned but nothing is displayed on my test page, and when I type pbjs.getAllWinningBids(), an empty array is returned and I don't get why.
A few more info :
This is a test page on our server with no other competition;
We use custom price buckets;
In DFP, I have 5 line items from 0.00€ to 2.00€ (so a 0.50€ increment) that matches the custom price buckets in the code;
The bids are "redirected" in the correct price buckets;
The code works and an ad is displayed when I set up a self-promotion
campaign in DFP with a prebid snippet as a creative, so I suppose
that something is wrong with the price buckets.
Would someone have an idea of what is blocking the selection of the bid and the rendering?
Thanks!
EDIT : I've come to realize that it was actually a normal behaviour since pbjs.getAllPrebidWinningBids() returns the bids that won the auction but haven't rendered on the page yet, while pbjs.getAllWinningBids() returns those that won but have also rendered.
So my question now is why the hell is no ad rendered at all?!
Here's my code (with a few dummy values), in case someone understand what's wrong: https://jsfiddle.net/8ewz9rgb/2/
Not answering the original thread question, instead your new issue why no ads are rendering. This is because you are calling GPT's googletag.disableInitialLoad. This will not render ads until googletag.refresh is called, which doesn't happen because it's in a 'pbjs' queue and you are not loading Prebid here, it is 404ing.

Is there way to select only id from parentReference

Request
GET /drive/root/children?select=name,size,parentReference
returns, for parentReference, for example,
"parentReference:{
"driveId":"3e2dd398785a81d",
"id":"3E2DD398785A81D!103",
"path":"/drive/root:"
}
Is there way that parentReference in reponse contains only id:
"parentReference:{
"id":"3E2DD398785A81D!103",
}
Ideally you should be able to ?select=name,size,parentReference/id but that currently doesn't work (it'll behave like ?select=name,size,parentReference). We aim to fix that at some point though, and so you're more than welcome to use the former syntax and it should start working when we fix it. Until then you'll just get back some extra things you don't actually care about.

Custom Grid Query in Rally with Multiple OR Clauses

I'm trying to write a query in Rally that will show me all the defects for several projects, but every time I save the query I get the message "Could not parse: Error parsing expression -- expected ")" but saw "OR" instead."
Here is the actual query:
((((Project.Name = "Project A") OR (Project.Name = "Project B")) OR (Project.Name = "Project C")) OR (Project.Name = "Project D"))
I checked Rally's so-called Help and it seems to me that everything is set up correctly, but maybe I'm missing something?
Your query syntax and parentheses groupings look fine. I tested your exact string above in a Custom Grid and it parses fine - no "Could not parse..." error. Maybe compare the exact query you are using against your sample above? Complex AND's and OR's can definitely be frustrating. If you miss a parenthesis or spaces around operators, the query engine will complain.
fyi, I just found that doing a page reload in the browser forces the changed query expression to be evaluated, whereas simply saving the modified query does not reliably re-evaluate the changed query.
The symptom I observed was that query results continued to complain about the previous query string, even though I had replaced parts of the query with different named fields, etc. This made me suspect browser caching, and when flushing cache did not help, then I did browser page reload, which worked perfectly.
So if your browser page was reloaded between when you were having the problem and later when it started working, then this might explain why.
From About link: Rally Build: master-9274 , Browser Type: firefox/19.0, rv:19.0

How to get content from the Wikipedia API for a movie?

I tried to get the description of the movie "Your Highness" from the Wikipedia API but it gives me nothing.
http://en.wikipedia.org/w/api.php?format=xml&action=query&titles=your%20highness&prop=revisions&rvprop=content
When I google "Your Highness" wikipedia shows up as the third result, that's the page that I want the API to give me.
Also I just want the text of the description of the movie, no wiki-syntax mixed in or anything.
I was wrong before about the problem being a space - it looks like it was just capitalization. If we just change your URL to use Your%20Highness instead of your%20highness it works:
http://en.wikipedia.org/w/api.php?format=xml&action=query&titles=Your%20Highness&prop=revisions&rvprop=content
EDIT: While not all titles are title-cased (such as "The Name of the Rose") if you use the &redirects query parameter, it sometimes helps - it certainly helps in "the name of the rose" but not for "your highness" for some reason. Wouldn't like to say why, but it's probably worth more investigation...

Google Custom Search API, Howto return country specific results only

I am making some PHP code which takes a given search phrase and url and searches through the google search results until it finds the url (only first 100 results). My problem is, this is only working for the US. I have tried adding the "&cr=" option, but it still on returns US results.
The full URL I am using for the request is:
https://www.googleapis.com/customsearch/v1?key=API_KEY&cx=CX_VALUE&q=KEYWORD&cr=COUNTRY&alt=JSON
Does anyone have any experience with this? I want to be able to see UK results. Tried inserting &cr=countryUK , but still only does US results.
Thanks :)
Regards,
Stian
Use the gl=<country code> param to limit it to your country of choice (so gl=gb for the uk).
More info here:
http://googleajaxsearchapi.blogspot.com/2009/10/web-search-in-your-country.html