How to query the iTunes API for movies in a specific genre - swift

I am trying to query the iTunes API for movies in a specific genre. I have been searching for hours now but can't seem to figure it out.
Example: https://itunes.apple.com/search?term=james+cameron&limit=25&entity=movie
This will give me a list of movies made by James Cameron, but I wan't to search for all the movies that match a specific genre, ex: "Romance".
When I look at the documentation here: https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/
It states that I can search for attribute=genreIndex, but I can't find anywhere this 'genreIndex' is specified. So I have no idea what to put in here? - I found several other questions relating to the same, and they all link to this: https://affiliate.itunes.apple.com/resources/documentation/genre-mapping.html
Which no longer exists?
Is there something I don't understand, or how am I supposed to do this?
Thanks! :)

This solutions is not in the iTunes documentation, I found it by trying around. (I think that 'genreIndex' might be deprecated, and is now 'genreTerm' (Maybe Apple forgot to update it on the documentation). However, this works perfectly:
https://itunes.apple.com/search?term=romance&entity=movie&attribute=genreTerm

Related

How to get posts orderby comment_count ascending and where to place the code? (Wordpress REST API)

I am a complete beginner when it comes to extending Wordpress REST API. I need to extend the API so that a request to /wp-json/wp/v2/posts?orderby=comment_count&order=asc would yield a response with posts that are ordered by comment count in ascending order ie. posts with the least amount of comments appear first.
I skimmed through the REST API Handbook and watched a couple of YouTube videos, but found no answer to my problem. I found this answer and it looks promising, however I'm not entirely sure if the code provided there fits my needs. From what I could gather WP_Query class is what I'm looking for, but I don't know how to make use of it. My second problem is that I don't know where exactly to place any code I may have stumbled upon ie. which file is supposed to play host to the code eventually?
I would greatly appreciate detailed answers and possibly sources for more information regarding this topic.
According to WordPress documentation orderby only accept following parameters:
author, date, id, include, modified, parent, relevance, slug, include_slugs, title
But you can add custom parameters to orderby if you have access to Wordpress website code. Please follow the below URL:
https://www.timrosswebdevelopment.com/wordpress-rest-api-post-order/
Let me know if you need more help.

Does VK API support a search by file type?

Say I browse to a vk community and would like to be able to retrieve all of the gifs uploaded to that community, How would I go about this?
You can use method docs.get
Access it by link
https://api.vk.com/method/docs.get.xml?owner_id=-GROUP_ID&access_token=YOUR_ACCESS_TOKEN
Read this my answer to know a bit more if you do not have an acess_token
In result you will see a document with xml-format. (if you want to use json-response-format just remove ".xml" from link you're accessing)
Document will contatin all doc-count and information about each of them like document_id, its title and size, extension and url.
Note that if you accessnig documents from community (not from user) your owner_id in the link must be negative, it must contain - before community_id
To know community id you can read another my post
Feel free to ask any questions if you didn't understand anything :)

adding Contact/Number into Textview/textfield like default MessageComposer did

As like my other questions I tried to search for this. But I didn't get anything.
Maybe my path is wrong. Please direct me.
Here is my Question : I have a UITextView. In that I am going to add Numbers, Names and contacts.
I want to show each number separately as MessageComPoser did.
Does anybody know how to make this?
If my question is not worthy, give me the correct answer then downvote.
(For my questions somebody downvoted without even giving any answer!!)
There is no way to do this using apple's native framework, they didn't provided any controls for doing the same.
You can use the TTMssageRecipientField provided by Three20 framework.
I found the Answer. I don't want to use Three20 library since it is Very difficult to use in my project.
So i Found Awesome Link. That gives me the answer.
I used this Code It May HelpFull To many users, specially for those who Upvoted This question.
Exellent Code

How to use google place api in iphone to query supermarkets around my place

I am new in Google places API and don't know how to use in our application...Can any one explain me how to get the list of Supermarkets around my places..
Currently I am using this link but not able to get that things which I want.
Please help me to solve the problem...
The URL should be:
https://maps.googleapis.com/maps/api/place/search/json?location=lat,long&radius=500&types=grocery_or_supermarket&sensor=false&key=yourkey

How to link to iBook?

I am making an app for an author (Patrick Rothfuss) and I would like to be able to link to his book in the iTunes store by clicking a UI button. While I think I can set up the button and everything myself, I can't seem to find out what the link is.
Anyone have any idea how to do this?
Thanks
For a more official approach from Apple, see iTunes Link Maker to generate links for iBooks as well as apps and everything else.
It seems that it is still limited to making country-specific links. But you can delete the country part and it would still work.
As example:
https://itunes.apple.com/us/book/moby-dick/id498469635?mt=11&uo=4
Can be also written as (and work on every country):
https://itunes.apple.com/book/id498469635?mt=11&uo=4
We have deleted book name "moby-dick" (recommended because it's subject to change sometimes) and also the country data "us".
I think currently its undocumented by Apple, but might be they provide the custom url of iBook in near future.