hayesdavis / grackle

Lightweight Ruby library for the Twitter API that goes with the flow.
228 stars 36 forks source link

Grackle::Client.new :uri_extension parameter #16

Closed jcsalterego closed 12 years ago

jcsalterego commented 13 years ago

This commit adds an optional Grackle::Client.new(:uri_extension=>false) which allows for accessing endpoints without extensions (useful for non-Twitter).

For example, getting to fictional JSON endpoint http://example.org/jsonblah?foo=bar

Grackle::Client::TWITTER_API_HOSTS[:example] = "example.org"
client = Grackle::Client.new(:api=>:example, :uri_extension=>false)
results = client.jsonblah? :foo=>:bar