omniauth-mailchimp 1.2.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +2 -2
- data.tar.gz.sig +2 -2
- data/README.md +47 -1
- data/lib/omniauth/mailchimp/version.rb +1 -1
- data/lib/omniauth/strategies/mailchimp.rb +5 -8
- metadata +3 -3
- metadata.gz.sig +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ae96341b1512d445405d72b9f387269447f7fed5dc9ce978ad4c736df0752bd3
|
4
|
+
data.tar.gz: 9d8a581f83b05e5741acc3a692b941e0983a85e2521d158d889ceaf59d6854d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de93ccb4315d6c9ffce8cd26ec162d7191317c2b5f06269b6acce223b607068772107f40c6c540ae34a16c21710a78af4e3dbda4046e56df4b89c18a961ba72b
|
7
|
+
data.tar.gz: 9020f7c9e82255e4c36a5fbe7c6a598f21b186733c2cd5c4084f5eb4224dac07433690ba337b4404bc77d579f1ffed8804003a2c0e476c60ec90cca56ca54e35
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
��i�:Sl]�2?�ñl �3��E�Gg`��I�^vH�IJR��j�.�����8r�W�g��
|
2
|
+
��9l��D����E~7q\�߾���Ty�����E�HB� ���m]�%ݚ�^��-�h4��H)�e#"��9r������PYsM������k�t))�%������el
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
l�[�jȚ*�Og���KF�^46I�Vܧ�o��YS(����8�
|
2
|
+
%T�o�C4MZ��M2;�����j�IX�]�Z��e���(^�0�����p[�Yd�}�b^bH��P� ��� �6�^s��oWk���������>hn��p?�`+��@��:X^{�r7���k:�hII&ËK�u��Sh�ԗ�=�:����~K�q1t-�9�5G������l��k����3TgH����3��1X��0b7�|�
|
data/README.md
CHANGED
@@ -1,6 +1,52 @@
|
|
1
1
|
# Mailchimp Strategy
|
2
2
|
|
3
|
-
MailChimp OAuth2 strategy for OmniAuth 1.0
|
3
|
+
MailChimp OAuth2 strategy for OmniAuth 1.0 using the v2 Mailchimp API.
|
4
|
+
|
5
|
+
# Mailchimp OAuth documentation
|
6
|
+
|
7
|
+
http://developer.mailchimp.com/documentation/mailchimp/guides/how-to-use-oauth2/
|
8
|
+
|
9
|
+
# Auth Hash
|
10
|
+
|
11
|
+
JSON as per https://us9.api.mailchimp.com/schema/3.0/Root.json
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
|
15
|
+
{"account_id"=>String,
|
16
|
+
"login_id"=>String,
|
17
|
+
"account_name"=>String,
|
18
|
+
"email"=>String,
|
19
|
+
"first_name"=>String,
|
20
|
+
"last_name"=>String,
|
21
|
+
"username"=>String,
|
22
|
+
"avatar_url"=>String,
|
23
|
+
"role"=>String,
|
24
|
+
"member_since"=>String,
|
25
|
+
"pricing_plan_type"=>String,
|
26
|
+
"first_payment"=>String,
|
27
|
+
"account_timezone"=>String,
|
28
|
+
"account_industry"=>String,
|
29
|
+
"contact"=>
|
30
|
+
{"company"=>String,
|
31
|
+
"addr1"=>String,
|
32
|
+
"addr2"=>String,
|
33
|
+
"city"=>String,
|
34
|
+
"state"=>String,
|
35
|
+
"zip"=>String,
|
36
|
+
"country"=>String},
|
37
|
+
"pro_enabled"=>FalseClass,
|
38
|
+
"last_login"=>String,
|
39
|
+
"total_subscribers"=>Integer,
|
40
|
+
"industry_stats"=>
|
41
|
+
{"open_rate"=>Float, "bounce_rate"=>Float, "click_rate"=>Float},
|
42
|
+
"_links"=>
|
43
|
+
[{"rel"=>String, "href"=>String, "method"=>String, "targetSchema"=>String},
|
44
|
+
{"rel"=>String,
|
45
|
+
"href"=>String,
|
46
|
+
"method"=>String,
|
47
|
+
"targetSchema"=>String,
|
48
|
+
"schema"=>String}]}
|
49
|
+
```
|
4
50
|
|
5
51
|
# License
|
6
52
|
|
@@ -20,16 +20,14 @@ module OmniAuth
|
|
20
20
|
end
|
21
21
|
|
22
22
|
uid {
|
23
|
-
raw_info["
|
23
|
+
raw_info["account_id"]
|
24
24
|
}
|
25
25
|
|
26
26
|
info do
|
27
|
-
contact = raw_info["contact"] || {}
|
28
|
-
|
29
27
|
{
|
30
|
-
:first_name =>
|
31
|
-
:last_name =>
|
32
|
-
:email =>
|
28
|
+
:first_name => raw_info["first_name"],
|
29
|
+
:last_name => raw_info["last_name"],
|
30
|
+
:email => raw_info["email"],
|
33
31
|
}
|
34
32
|
end
|
35
33
|
|
@@ -45,8 +43,7 @@ module OmniAuth
|
|
45
43
|
@raw_info ||= begin
|
46
44
|
data = user_data
|
47
45
|
endpoint = data["api_endpoint"]
|
48
|
-
|
49
|
-
response = @access_token.get("#{endpoint}/2.0/helper/account-details?apikey=#{apikey}").parsed
|
46
|
+
response = @access_token.get("#{endpoint}/3.0/").parsed
|
50
47
|
if response["error"]
|
51
48
|
case response["code"]
|
52
49
|
when 109
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-mailchimp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Karas
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
r8TqG91/X7jeMHROZDeQrcMHOaiCTdEfQkJG408v2715v8spl4AxywNMBltrK4ju
|
32
32
|
M6Qptda9mbBOF3gdr/aui0aKIpXp/b+samKv4LbOhEX8af5C
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2018-02-09 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: omniauth
|
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
132
|
version: '0'
|
133
133
|
requirements: []
|
134
134
|
rubyforge_project:
|
135
|
-
rubygems_version: 2.
|
135
|
+
rubygems_version: 2.7.4
|
136
136
|
signing_key:
|
137
137
|
specification_version: 4
|
138
138
|
summary: MailChimp OAuth2 strategy for OmniAuth 1.0.
|
metadata.gz.sig
CHANGED
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
.�w4{��0�+&9�+*���-��;�����:�%�7O���q���6^8y�|��4#�}"ɹ3��o��ˍ+��U9!P��o��.�a~wS�'u$:hK9/��)C��of���
|
1
|
+
�߃�mư$�UQ��u]�l�/�n��cY��(Z�M ��NVg'b��9�t��{G��F'A�A��
|
2
|
+
�O�� �9��!�`��]�]��QEU�V���o��o�햆.����r[E3z�U�#�gT8���z$�{�
|