lib/tumblr_wrapper.rb in tumblr_wrapper-0.0.3 vs lib/tumblr_wrapper.rb in tumblr_wrapper-0.1.0
- old
+ new
@@ -1,17 +1,23 @@
+require 'json'
require 'oauth'
-require 'rest-client'
+require 'faraday'
+require 'faraday_middleware'
+
require "tumblr_wrapper/version"
+require "tumblr_wrapper/validators"
+require "tumblr_wrapper/http"
require "tumblr_wrapper/client"
require "tumblr_wrapper/resource"
require "tumblr_wrapper/blog_resource"
require "tumblr_wrapper/blog"
require "tumblr_wrapper/post"
module TumblrWrapper
- ENDPOINT = 'http://api.tumblr.com/v2'
+ ENDPOINT = 'http://api.tumblr.com'
OAUTH_ENPOINT = 'http://www.tumblr.com'
+ VERSION = 'v2'
def self.consumer_key=(key)
@@consumer_key = key
end
@@ -31,9 +37,13 @@
OAUTH_ENDPOINT
end
def self.endpoint
ENDPOINT
+ end
+
+ def self.version
+ VERSION
end
class NoAccessToken < StandardError
def initialize(message = "Oauth request. Set access_token")
super(message)