How can I get the media inside a post?


I’m new to WordPress, so please forgive me if my question is not clear or vague. I did a lot of research, but I didn’t figure out how to do the trick. I’m developing a Xamarin application for Android devices. This application retrieves posts from a WordPress site and replicates the news it finds inside of itself. I learned about the REST API Handbook
to get the news. The problem is that the WordPress site maintainer uses different media inside of the news: audios, videos, galleries, and so on. The pages are explicitly in video, audio, and gallery format. Using the above-mentioned API, I get the news with the text inside them, but I don’t get the URLs’ resources relative to the media. An example, one of the news has the format equal to video:

enter image description here

The API doesn’t return anything that let me retrieve the URL of the video to replicate it inside the UI of my application. The same happens with the audio and gallery formats. How can I retrieve the media URLs that are inside the news?

Pine Code 2 months 0 Answers 13 views 0

Leave an answer