How to get specific episode from iTunes API? - web-services

How do I get a link to a specific episode of a TV show in the iTunes store? I have the name of the show*, the season, and episode number. From the documentation, I've found that I can get a list of episodes, and then parse the JSON to find the episode and its iTunes links.
However, the documentation also says that one should avoid making too many or too big requests (e.g. by using the limit parameter), so I'm wondering if there is a better way to directly get the desired episode link, without fetching and parsing a potentially huge list of episodes.
*) In case the season name is ambiguous, I have the TVDB data, and can also specify a 'canonical' name if neccessary.

The Search API has a few parameters that will help qualify the content you want returned.
It sounds like you should be using the Show title as the "term".
https://itunes.apple.com/search?term=Jersey+Shore&attribute=tvSeasonTerm&entity=tvEpisode
Adding "attribute=tvSeason" will ensure the term is matched only to TV Show titles and not any other meta data in the iTunes store (including music, movies, apps etc.).
Also, appending "entity=tvEpisode" will indicate to the API that you want only Episodes returned and not just the Season info (by default).

Related

Getting list of fields detected from Invoice Parser google Document AI Processor

Invoice Parser documentation lists the fields that this processor attempts to find in a document.
https://cloud.google.com/document-ai/docs/processors-list?hl=en_US#processor_invoice-processor
I am only interested in some of the fields in the Invoice processor, is there a way to get the list of fields and request the processor to find the data points for a selected set of fields?
E.g. I am only interested in invoice_date and invoice_id. So, the processor only finds these two fields for me and does not waste its time finding others.
I found an endpoint that retrieves the processor's details but it does not get the field list.
https://cloud.google.com/document-ai/docs/reference/rest/v1beta3/projects.locations.processors/get
This process endpoint does not have anything to specify the fields that I am interested in.
https://cloud.google.com/document-ai/docs/reference/rest/v1beta3/projects.locations.processors/process
My research indicates that this feature does not exist, hoping someone tells me that I am wrong.
Currently, it's not possible to limit the specific entities that are extracted by a specialized processor. The processor will always processes the entire document and extract everything it can find.
However, a new parameter has recently been added to the process method in the REST API that lets you provide a fieldMask to limit the fields that will be returned in the Document object. This has also been added to the How-to Guide for making a processing request. Currently, this only works for the REST API (not client libraries) and online processing.
This isn't exactly what you're looking for, but it can significantly limit the size of the Document response if you don't need fields like content

extracting data from facebook using graph api

how can i extract name list && phone numbers of the users liking certain page ?
I have tried using software called facepager but i couldn't extract names .
note:I'm not the owner of the page
You'd most likely have to write code yourself to do something like this. However,
Almost no-one publicly shares their phone number.
Facebook try to prevent this kind of data collection.
Even when facebook list's "likers" of a page, it'll wait till you scroll down to load more. You'd have to play with your browsers debug tools and look into where it get's that data from
https://www.facebook.com/search/<group id here>/likers
In the end you'll probably not get much better than just searching for the page and clicking each person's profile because the site is designed to not let what you're trying to do happen...

Countries: A list of their state/province and cities list

I want to get all the countries, their states/province and cities in the world.
Where can I find this information?
Somebody please help me. I have searched many times, but I couldn't find it anywhere.
Check out django-cities which provides a list of countries and cities of the world. You will need to use http://www.geonames.org/ to import their database. Alternatively, you can directly download their database (in text format) and extract the values you need.
You can try using Yahoo's GeoPlanet API.
http://developer.yahoo.com/geo/geoplanet/guide/api-reference.html#api-countries
The more specifically relevant portions are on
/countries/
/counties/{state}
There are even examples on how to retrieve entire list of countries on the page. Based on the state, you can also retrieve counties.
Additional:
If you are more specifically looking to do geocoding, you can try Google Maps Geocoding API located below:
https://developers.google.com/maps/documentation/geocoding/?hl=fr
This will allow you to get region specific information on your location of interest.

Is it Possible to Filter Graph Feed using Location?

We have a worldwide brand page that posts brand messages and filtered by country, for example: "This is visible in the US" (visible to United States), and "This is visible to Russia" (only visible to Russia).
Main Question: Is it possible to retrieve posts on the page wall filtered by country or other location parameters? For example: https://graph.facebook.com/[userID]/feed?access_token=[accessToken]&locale=en_US
Side Question: Currently when using the URL above (without &locale...) returns only the posts available worldwide, and all targeted posts are not returned. This could potentially be due to the access token being used as I am able to return info for page feeds (that I own) for all locales using a different access token. Is there a correlation between application tokens and locales that are returned?
Forget about it - it's impossible. They never thought about providing us any interface to this.
What you must do is:
Download the entire graph object (awesome especially on mobile),
Remember to download all pages (since facebook is paging long responses),
Merge and filter them on your side (or in client's browser|phone),
VoilĂ  you're good to go ;) .
PS. I know you asked this looong time ago, but it's still one of the first Google results for related queries, so I'm writing here so others can quickly find out. Cheers!

Graph user notifications. Get Post ID

I'm starting to use the Graph API to get my notifications, and in the REST interface, they had the object_id field. I used this to get the notification objects' id to then query the Graph for more information.
The Graph API object does not include this information.
Example of what I want to do:
Get user's notifications JSON object.
Grab single item
Identify if this item supports commenting/liking
Display comments and number of likes for that item
if user can comment or like item, display buttons for this
my process:
call me/notifications/?include_read=1
is pretty easy to do.
I can identify if the object refers to a group, event, random application, post, or photo using the URL. I know that posts, likes, photos and others support commenting/likes so I have a way of doing this, though it involves parsing the link attribute of the item
this is what I need help with. I can get the id of the object by parsing the link, but I don't get the full object some times using this. For example, to post on a comment, you need to have USERID_COMMENTID and the link only has the COMMENTID in this form http://www.facebook.com/USERNICKNAME/posts/COMMENTID
I also need help with this. I guess some fb objects can't been liked via the graph?
any help would be great!
The notification FQL table, which also replaced the REST notifications.get API, still has an object_id column. That's the closest thing that exists to what you're asking for. It doesn't look like the Graph API call is documented to have the object_id field unfortunately.