contextio-lite 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/contextio.rb +1 -1
- data/lib/contextio/api/abstract_api.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65fc161dabf7f846be51203770e71a4bfb30f561
|
4
|
+
data.tar.gz: bdc30bdd8aec378161d33ade96f96fabe2c1d163
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a6f5554a8d8531919538d574030507b555a3933559a793d8febbec4fadf2df9b0b9c904054aceaf3d0874ea8cd402a5091fe6ce3c705ca1bd6b862392239ff5
|
7
|
+
data.tar.gz: 27bca14f539fddc329a2de3e45868f3d6161fe0a17ed0d3f0b20a5a0ab2b9a4d00c67b1b70f6da24402f14aad2768c64a0e66e3fdb6e11987754e39592b3f4c7
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ It works in the same way as the official, calling first a user object and then w
|
|
8
8
|
Add this line to your application's Gemfile:
|
9
9
|
|
10
10
|
```ruby
|
11
|
-
gem 'contextio-lite'
|
11
|
+
gem 'contextio-lite', :require => 'contextio'
|
12
12
|
```
|
13
13
|
|
14
14
|
And then execute:
|
@@ -26,7 +26,7 @@ Or install it yourself as:
|
|
26
26
|
```ruby
|
27
27
|
require 'contextio'
|
28
28
|
|
29
|
-
client = ContextIO
|
29
|
+
client = ContextIO.lite(API_KEY, API_SECRET)
|
30
30
|
```
|
31
31
|
|
32
32
|
### Dealing with users
|
@@ -40,7 +40,7 @@ p client.users.map(&:id)
|
|
40
40
|
CRUD
|
41
41
|
|
42
42
|
```ruby
|
43
|
-
user = client.users.create email: 'bob@gmail.com', first_name: 'Bob', server: 'imap.gmail.com' username: 'bob',
|
43
|
+
user = client.users.create email: 'bob@gmail.com', first_name: 'Bob', server: 'imap.gmail.com' username: 'bob', use_sll:true, port: 993, type: 'IMAP'
|
44
44
|
|
45
45
|
user_id = user.id
|
46
46
|
|
data/lib/contextio.rb
CHANGED
@@ -102,6 +102,7 @@ module ContextIO
|
|
102
102
|
# @return [Faraday::Response] The response object from the request.
|
103
103
|
def oauth_request(method, resource_path, params, headers=nil)
|
104
104
|
normalized_params = params.inject({}) do |normalized_params, (key, value)|
|
105
|
+
value = (value ? 1 : 0) if value == !!value
|
105
106
|
normalized_params[key.to_sym] = value
|
106
107
|
normalized_params
|
107
108
|
end
|