Get multiple values in URL encoding
I'm not sure how to go about searching this but I'm trying to read the tumblr API and get all posts of type=audio OR type=photo, so I only want to see audio and photo posts.
This doesn't work: http://derekg.org/api/read?&type=audio&type=photo
it only retrieves type=photo posts. What is the syntax for type=photo OR audio?
Based on the documentation here: http://www.tumblr.com/docs/en/api/v1#api_read
type - The type of posts to return. If unspecified or empty, all types of posts are returned. Must be one of text, quote, photo, link, chat, video, or audio.
I would assume the way to get multiple categories is using a comma.
The difference is in the total post count. With no type it is 1344, but with audio,photo it is 276.
Your current url (http://derekg.org/api/read?&type=audio&type=photo) is just overriding the audio parameter.
Otherwise, you are going to have to do two calls; one photo and one audio. Then merge and sort them however you choose. This answer may also help: How to query multiple tags in Tumblr's read api?