Getting the official release id in MusicBrainz - musicbrainz

I am doing the ISRC lookup for eg.
https://musicbrainz.org/ws/2/isrc/SEUM71401533?inc=releases
In the response I get list of releases. Now how do I filter the one official release. There are many official releases. I just want to get the cover art but many times its difficult to get the correct release id out of the many releases.
If I take this request for example :
https://musicbrainz.org/ws/2/isrc/SEUM71401533?inc=releases
In the response the release with the id "1c70f755-8622-41f5-8f69-9c0e8cc082ce" gives the correct album art(which is the fourth release in the response) from the covert art api doing the following request :
https://coverartarchive.org/release/1c70f755-8622-41f5-8f69-9c0e8cc082ce
So can I figure out which release id to choose programmatically so that I get the correct cover art

We can assume that the first release to be the official one so we can just get the first release in the response and then use its id to get the cover art.
If there are multiple recordings we will have to get the first release across all the recordings. I am using kotlin so "min" function for arrays comes handy.
Doing this gives me correct cover art most of the times.

Related

Playlist video API missed certain posts when ran on particular day

I use Youtube APIs to keep track of the brand assets of a certain channel.
Playlist API: https://www.googleapis.com/youtube/v3/playlistItems
There is a weekly refresh on the platform. In one of the refresh, playlist API missed a certain post in the corresponding week. Post published date was well within the range.
Any justifiable reason for this issue? Just want to get the root cause and probability for this issue to occur, so that I can build some safeguard on my platforms if required.
To my knowledge the result set obtained from PlaylistItems endpoint should be exact -- no fuzziness implied like in the case of Search endpoint. Therefore I am inclined to believe -- you did not provided actual data along with your question -- that there is something else that caused your issue.
Often users of the API overlook the fact that any video could first be uploaded as private and only later made public.
publishedAt (datetime)
The date and time that the video was published. Note that this time might be different than the time that the video was uploaded. For example, if a video is uploaded as a private video and then made public at a later time, this property will specify the time that the video was made public.

Query the Facebook Graph API for objects containing a given string

I'm looking to get back photos from a specific album on Facebook that contain a given string in their title. Can this be done? The only alternative I know of would be to download ALL photos from the album (at the moment there's about 500 and this number will grow over time), parse them all and then eventually filter. That could become (and already kind of is) an extremely costly operation I'm looking to avoid.
I have looked all over and have yet to find anything somewhat related, so if there's an answer to this question already please link me to it, thanks!
You do have to go through the album, there is no Search API for that.
/album-id/photos
check for the string in the title
use paging to get the next batch of photos
repeat from number 2 until there is no next batch
You can also cache the ids/titles for later, so you don´t have to hit the API for a all the photos in a new search, but that´s completely up to you. There is no other way.

About YouTube search list API V3

In my application, I have used youtube.search.list API v3 for searching whole videos included in specific channel.
Example:
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=[CHANNEL_ID]&q=[KEYWORD]
'q' is parameter for search keyword.
In my case, I used only 'q=' without keyword because I'd like to search whole videos.
It's working well at least until yesterday(27.Aug). but now, the server response is always 'totalResults: 0'
Could you tell me whether it's temporary wrong operation or the policy about this API is changed?
You can test above problem in the below url :
http://developers.google.com/apis-explorer/#p/youtube/v3/youtube.search.list?part=snippet
The issue has been reported to the gdata issues list five times in the last 24 hours or so. Regardless of whether it's deliberate or not, there's a lot of people concerned.
The first instance report:
https://code.google.com/p/gdata-issues/issues/detail?id=6598

What is the easiest way to get the latest comment on any of my videos, using v2 of the YouTube API?

As pointed out in the question How do I fetch comments in version 3 of the YouTube API?, there is currently no way of fetching video comments using version 3 of the YouTube API. Now I'm trying to figure it out using version 2 instead.
What I want is the latest comment on any of my uploaded videos, in other words the latest comment in the "aggregated" comment feed of all my videos.
It seems like the only way to do this is too fetch all videos, and then make a call for each of them to get the comments. With a few hundred uploaded videos, this becomes very expensive in terms of number of API calls and total time for completion.
Is there a simpler and/or better way?
There's no way to be "notified" via the API when a video gets a new comment, so you're going to have to do some polling. The comments feed for a given video id, e.g. https://gdata.youtube.com/feeds/api/videos/fhWaJi1Hsfo/comments?v=2 for video id fhWaJi1Hsfo, is sorted in reverse-chronological order by default, so the last comment added should always be first in the list of entries.
Making a request for the comments feed of several hundred videos, even if you do that a couple of times a day, doesn't sound like an unreasonable amount of traffic. You should follow the best practices outlined in this blog post if you do run into any quota issues, though.

Is it possible to get the YouTube author name for a video using the v3 api?

So I'm working on switching to using the v3 version of the YouTube api (which is so much better it's like a completely different product), but I'm either missing something or it is ...
Being able to fetch an arbitrary list of videos, and their details, in one call is going to make life significantly better, but in the videos list method, the the video details "snippet" contains the "channelId", not the "author".
I've spent quite a bit of time looking through the documentation, but can't find any way of getting from a channelId to the human readable author name.
How am I expected to map a video to an author?
It's not possible to get back a display name (either legacy YouTube name or Google+ name) for a channel as part of the video.snippet response. You need to take the channelId and perform a channels.list(id=channelId1,channelId2,...,part=snippet) operation to get that information. The good part is that you can pass in up to 50 channel ids in a single call.
This sort of separation of information into different resources with ids effectively serving as keys linking the resources was a deliberate decision. The engineering team is aware that it will require developers to make an additional API call, but they're in favor of that design.
At the same time, the API is still in an experimental release, and if you have any feedback about using the API while doing real-world development, feel free to open a feature request in the issue tracker. If enough people give feedback about a certain aspect of the API, that could factor in to the final revision's design.
The accepted answer may have been correct at the time of writing, but as of 2/2018 the snippet part now includes a channelTitle property.

Resources