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?

Answers


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.

http://derekg.org/api/read?type=audio,photo

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?


Need Your Help

What does !FILTERs mean?

java object web-crawler crawler4j

I have recently implemented Crawler4j and I am trying to teach myself the code by breaking it down line by line. I am having trouble understanding what the !FILTERS object on the line of code below

How to calculate with text boxes and skip empty text boxes?

c# textbox int32

I have to count with money and I have created some textboxes where the user can input how many 1 euro coins he has. (and so for 2 euro, 5 euro, etc)

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.