Retrieve media info for a post
I’m trying to use this api in an iOS app to retrieve a list of post/categories and images for the posts. When I retrieve posts their is no info as to whether there’s any image associated with this post. I can grab a list of media and those associated with a post will list the post content in the parent element.
This seems very inefficient to me as it requires two separate calls to get media for a post, would it be possible to list the media entry if there is one in the posts meta data? Mobile apps need to minimise the network traffic as much as possible.
I’ve also spotted what appears to be a bug, if I grab a list of media items and extract the posts from that the meta link to get replies (comments) will be something like xxx/wp-json.php/media/4481/comments this fails – replacing media with posts enables them to be retrieved ok.
- The topic ‘Retrieve media info for a post’ is closed to new replies.