inbox 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -1
- data/lib/inbox.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1accdd1e51e6151899d73c573098902b1ee46356
|
4
|
+
data.tar.gz: ec98af89dabbfec85638a91a9fc436d97398db8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 736d52441c42352ff436525f3d3321baf5a29070f0c0571586b9359a98518da58afcf8aa07b8b7502484da5e57afe0749bf41d5f786c993a6e59572cc741e2a4
|
7
|
+
data.tar.gz: 78dd66327d6fff5514fadc9258a0e7cc4ffdef0cc182744eeff77d2a684e75ce84022c838701a734b640590a793fe9f3b68382aabae6736084ca366444ca8eec
|
data/README.md
CHANGED
@@ -75,7 +75,16 @@ end
|
|
75
75
|
|
76
76
|
### Managing Billing
|
77
77
|
|
78
|
-
If you're using the open-source version of the Inbox API or have fewer than 100 accounts associated with your developer app, you don't need to worry about billing. However, if you've requested production access to the Inbox API, you are billed monthly based on the number of email accounts you've connected to Inbox.
|
78
|
+
If you're using the open-source version of the Inbox API or have fewer than 100 accounts associated with your developer app, you don't need to worry about billing. However, if you've requested production access to the Inbox API, you are billed monthly based on the number of email accounts you've connected to Inbox. You can choose to start accounts in "trial" state and sync slowly at a rate of one message per minute so users can try out your app. If you use trial mode, you need to upgrade accounts (and start paying for them) within 30 days or they will automatically expire. You may wish to upgrade accounts earlier to dramatically speed up the mail sync progress depending on your app's needs.
|
79
|
+
|
80
|
+
**Starting an Account in Trial Mode**
|
81
|
+
|
82
|
+
When you're redirecting the user to Inbox to authenticate with their email provider,
|
83
|
+
pass the additional `trial: true` option to start their account in trial mode.
|
84
|
+
|
85
|
+
```ruby
|
86
|
+
redirect_to inbox.url_for_authentication(callback_url, user_email, {trial: true})
|
87
|
+
```
|
79
88
|
|
80
89
|
**Upgrading an Account**
|
81
90
|
|
data/lib/inbox.rb
CHANGED
@@ -62,8 +62,12 @@ module Inbox
|
|
62
62
|
"#{protocol}//#{@access_token}:@#{domain}#{path}"
|
63
63
|
end
|
64
64
|
|
65
|
-
def url_for_authentication(redirect_uri, login_hint = '')
|
66
|
-
|
65
|
+
def url_for_authentication(redirect_uri, login_hint = '', options = {})
|
66
|
+
trialString = 'false'
|
67
|
+
if options[:trial] == true
|
68
|
+
trialString = 'true'
|
69
|
+
end
|
70
|
+
"https://www.inboxapp.com/oauth/authorize?client_id=#{@app_id}&trial=#{trialString}&response_type=code&scope=email&login_hint=#{login_hint}&redirect_uri=#{redirect_uri}"
|
67
71
|
end
|
68
72
|
|
69
73
|
def set_access_token(token)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Gotow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|