tumble 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/lib/tumble/client.rb CHANGED
@@ -21,7 +21,7 @@ module Tumble
21
21
  # @see http://www.tumblr.com/docs/en/api/v2#user-methods
22
22
  # @requires_authentication Yes
23
23
  def user_info
24
- @connection.post('/user/info').body.response.user
24
+ @connection.post('/user/info').response
25
25
  end
26
26
 
27
27
  # Retrieve a User's Dashboard
@@ -37,7 +37,7 @@ module Tumble
37
37
  # @option options [Boolean] :reblog_info Indicates whether to return reblog information (specify true or false). Returns the various reblogged_ fields.
38
38
  # @option options [Boolean] :notes_info Indicates whether to return notes information (specify true or false). Returns note count and note metadata.
39
39
  def dashboard(options={})
40
- @connection.get('/user/dashboard')
40
+ @connection.get('/user/dashboard').response
41
41
  end
42
42
 
43
43
  # Retrieve a User's Likes
@@ -49,7 +49,7 @@ module Tumble
49
49
  # @option options [Integer] :limit The number of results to return: 1–20, inclusive
50
50
  # @option options [Integer] :offset Post number to start at
51
51
  def likes(options={})
52
- @connection.get('/user/likes')
52
+ @connection.get('/user/likes').response
53
53
  end
54
54
 
55
55
  # Retrieve the Blogs a User Is Following
@@ -61,7 +61,7 @@ module Tumble
61
61
  # @option options [Integer] :limit The number of results to return: 1–20, inclusive
62
62
  # @option options [Integer] :offset Post number to start at
63
63
  def following(options={})
64
- @connection.get('/user/following')
64
+ @connection.get('/user/following').response
65
65
  end
66
66
 
67
67
  # Follow a Blog
@@ -71,7 +71,7 @@ module Tumble
71
71
  #
72
72
  # @param url [String] The URL of the blog to follow
73
73
  def follow(url)
74
- @connection.post('/user/follow', :url => url)
74
+ @connection.post('/user/follow', :url => url).response
75
75
  end
76
76
 
77
77
  # Unfollow a Blog
@@ -81,7 +81,7 @@ module Tumble
81
81
  #
82
82
  # @param url [String] The URL of the blog to follow
83
83
  def unfollow(url)
84
- @connection.post('/user/unfollow', :url => url)
84
+ @connection.post('/user/unfollow', :url => url).response
85
85
  end
86
86
 
87
87
  # Like a Post
@@ -92,7 +92,7 @@ module Tumble
92
92
  # @param id [Integer] The ID of the post to like
93
93
  # @param reblog_key [String] The reblog key for the post id
94
94
  def like(id, reblog_key)
95
- @connection.post('/user/like', :id => id, :reblog_key => reblog_key)
95
+ @connection.post('/user/like', :id => id, :reblog_key => reblog_key).response
96
96
  end
97
97
 
98
98
  # Unlike a Post
@@ -103,7 +103,7 @@ module Tumble
103
103
  # @param id [Integer] The ID of the post to unlike
104
104
  # @param reblog_key [String] The reblog key for the post id
105
105
  def unlike(id, reblog_key)
106
- @connection.post('/user/unlike', :id => id, :reblog_key => reblog_key)
106
+ @connection.post('/user/unlike', :id => id, :reblog_key => reblog_key).response
107
107
  end
108
108
  end
109
109
  end
@@ -43,7 +43,6 @@ module Tumble
43
43
  def faraday_connection
44
44
  options = {
45
45
  :url => base_url,
46
- :params => { :oauth_token => @token },
47
46
  :headers => {
48
47
  :accept => 'application/json',
49
48
  :user_agent => 'tumble'
@@ -51,6 +50,7 @@ module Tumble
51
50
  }
52
51
  @faraday_connection ||= Faraday::Connection.new(options) do |builder|
53
52
  builder.use Faraday::Request::UrlEncoded
53
+ builder.use Faraday::Request::Multipart
54
54
  builder.use FaradayMiddleware::Mashify
55
55
  builder.use FaradayMiddleware::ParseJson
56
56
  builder.use Tumble::Request::TumblrOAuth, credentials
data/lib/tumble.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  end
4
4
 
5
5
  module Tumble
6
- VERSION = '0.0.5'
6
+ VERSION = '0.0.6'
7
7
 
8
8
  def self.configure
9
9
  yield Config
data/tumble.gemspec CHANGED
@@ -3,7 +3,7 @@ Gem::Specification.new do |s|
3
3
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5") if s.respond_to? :required_rubygems_version=
4
4
 
5
5
  s.name = 'tumble'
6
- s.version = '0.0.5'
6
+ s.version = '0.0.6'
7
7
 
8
8
  s.summary = 'Library for accessing the Tumblr api v2'
9
9
  # TODO: s.description
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tumble
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday
17
- requirement: &70102148042320 !ruby/object:Gem::Requirement
17
+ requirement: &70169784816660 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70102148042320
25
+ version_requirements: *70169784816660
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rake
28
- requirement: &70102148041860 !ruby/object:Gem::Requirement
28
+ requirement: &70169784816200 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *70102148041860
36
+ version_requirements: *70169784816200
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rspec
39
- requirement: &70102148041440 !ruby/object:Gem::Requirement
39
+ requirement: &70169784815780 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *70102148041440
47
+ version_requirements: *70169784815780
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: webmock
50
- requirement: &70102148041020 !ruby/object:Gem::Requirement
50
+ requirement: &70169784815360 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,7 +55,7 @@ dependencies:
55
55
  version: '0'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *70102148041020
58
+ version_requirements: *70169784815360
59
59
  description:
60
60
  email: aubreyholland@gmail.com
61
61
  executables: []