podio 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/podio.rb CHANGED
@@ -78,6 +78,7 @@ module Podio
78
78
  autoload :Connection, 'podio/areas/connection'
79
79
  autoload :Contact, 'podio/areas/contact'
80
80
  autoload :Conversation, 'podio/areas/conversation'
81
+ autoload :Email, 'podio/areas/email'
81
82
  autoload :File, 'podio/areas/file'
82
83
  autoload :Form, 'podio/areas/form'
83
84
  autoload :Hook, 'podio/areas/hook'
@@ -0,0 +1,10 @@
1
+ module Podio
2
+ module Email
3
+ include Podio::ResponseWrapper
4
+ extend self
5
+
6
+ def unsubscribe(mailbox)
7
+ Podio.connection.post("/email/unsubscribe/#{mailbox}").status
8
+ end
9
+ end
10
+ end
@@ -28,7 +28,7 @@ module Podio
28
28
  end
29
29
 
30
30
  def copy(id)
31
- Podio.connection.post("/file/#{id}/copy").body['id']
31
+ Podio.connection.post("/file/#{id}/copy").body['file_id']
32
32
  end
33
33
 
34
34
  def delete(id)
data/lib/podio/client.rb CHANGED
@@ -57,7 +57,7 @@ module Podio
57
57
  req.url '/oauth/token', :grant_type => 'refresh_token', :refresh_token => oauth_token.refresh_token, :client_id => api_key, :client_secret => api_secret
58
58
  end
59
59
 
60
- @oauth_token.access_token = response.body['access_token']
60
+ @oauth_token = OAuthToken.new(response.body)
61
61
  @oauth_token.refreshed = true
62
62
  configure_oauth
63
63
  end
data/lib/podio/error.rb CHANGED
@@ -1,12 +1,14 @@
1
1
  module Podio
2
2
  module Error
3
- class TokenExpired < StandardError; end
4
- class AuthorizationError < StandardError; end
5
- class BadRequestError < StandardError; end
6
- class ServerError < StandardError; end
7
- class NotFoundError < StandardError; end
8
- class ConflictError < StandardError; end
9
- class GoneError < StandardError; end
10
- class Unavailable < StandardError; end
3
+ class PodioError < StandardError; end
4
+
5
+ class TokenExpired < PodioError; end
6
+ class AuthorizationError < PodioError; end
7
+ class BadRequestError < PodioError; end
8
+ class ServerError < PodioError; end
9
+ class NotFoundError < PodioError; end
10
+ class ConflictError < PodioError; end
11
+ class GoneError < PodioError; end
12
+ class Unavailable < PodioError; end
11
13
  end
12
14
  end
data/lib/podio/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Podio
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.4'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: podio
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.2
5
+ version: 0.3.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Florian Munz
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-04 00:00:00 +02:00
13
+ date: 2011-05-09 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -81,6 +81,7 @@ files:
81
81
  - lib/podio/areas/connection.rb
82
82
  - lib/podio/areas/contact.rb
83
83
  - lib/podio/areas/conversation.rb
84
+ - lib/podio/areas/email.rb
84
85
  - lib/podio/areas/file.rb
85
86
  - lib/podio/areas/form.rb
86
87
  - lib/podio/areas/hook.rb