Permalink
Browse files

Make Twitter request format configurable

  • Loading branch information...
sferik committed Oct 8, 2010
1 parent e664502 commit d35d6447b25fa84447ae97558958431fa9f6aa29
View
@@ -4,7 +4,7 @@ PATH
twitter (0.10.0)
addressable (~> 2.2.1)
faraday (~> 0.4.6)
- faraday_middleware (~> 0.1.0)
+ faraday_middleware (~> 0.1.1)
hashie (~> 0.4.0)
roauth (~> 0.0.3)
@@ -17,16 +17,19 @@ GEM
faraday (0.4.6)
addressable (>= 2.1.1)
rack (>= 1.0.1)
- faraday_middleware (0.1.0)
+ faraday_middleware (0.1.1)
faraday (~> 0.4.5)
hashie (~> 0.4.0)
multi_json (~> 0.0.4)
+ multi_xml (~> 0.0.1)
oauth2 (~> 0.0.13)
+ roauth (~> 0.0.3)
hashie (0.4.0)
json_pure (1.4.6)
mocha (0.9.8)
rake
multi_json (0.0.4)
+ multi_xml (0.0.1)
oauth2 (0.0.13)
faraday (~> 0.4.1)
multi_json (>= 0.0.4)
@@ -43,7 +46,7 @@ DEPENDENCIES
addressable (~> 2.2.1)
fakeweb (~> 1.3.0)
faraday (~> 0.4.6)
- faraday_middleware (~> 0.1.0)
+ faraday_middleware (~> 0.1.1)
hashie (~> 0.4.0)
json_pure (~> 1.4.6)
mocha (~> 0.9.8)
View
@@ -28,6 +28,14 @@ def self.user_agent=(value)
@user_agent = value
end
+ def self.format
+ @format ||= 'json'
+ end
+
+ def self.format=(value)
+ @format = value
+ end
+
def self.api_endpoint
api_endpoint = "api.twitter.com/#{Twitter.api_version}"
api_endpoint = Addressable::URI.heuristic_parse(api_endpoint).to_s
@@ -45,7 +53,7 @@ def self.api_version
def self.api_version=(value)
@api_version = value
end
-
+
class << self
attr_accessor :consumer_key
attr_accessor :consumer_secret
Oops, something went wrong.

0 comments on commit d35d644

Please sign in to comment.