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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 303f2bd67e7d7dd1e7739c71f9ddbf284e1a6ac3
4
- data.tar.gz: 1f22d804c9b64b73534a938657e3dfd04e53b802
2
+ SHA256:
3
+ metadata.gz: ae96341b1512d445405d72b9f387269447f7fed5dc9ce978ad4c736df0752bd3
4
+ data.tar.gz: 9d8a581f83b05e5741acc3a692b941e0983a85e2521d158d889ceaf59d6854d0
5
5
  SHA512:
6
- metadata.gz: 491518089dca7ff6ba33bc2e5859f996b402bde052b23862ba4f918ca3d64b6f94f5b7cc85953b05a60fca972b9e651ae440df9a39ed6df6ccd352fbc4940b57
7
- data.tar.gz: e981b9b25ce55b3b2fb60e79b1ec744205cb342c8ed0a20ca59105991b1703ecd3780e2fbe4b35e85ca1353c0627daea1ac20642aeee5d2abcabfccd5165a00e
6
+ metadata.gz: de93ccb4315d6c9ffce8cd26ec162d7191317c2b5f06269b6acce223b607068772107f40c6c540ae34a16c21710a78af4e3dbda4046e56df4b89c18a961ba72b
7
+ data.tar.gz: 9020f7c9e82255e4c36a5fbe7c6a598f21b186733c2cd5c4084f5eb4224dac07433690ba337b4404bc77d579f1ffed8804003a2c0e476c60ec90cca56ca54e35
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- uG��GV��%�jAM��w����|��[���2~������K��(E.���`PK��%������������ފ/�]
2
- e^نS����ɶ�:U���FW�]4;"R|�?��J1#����v�\>��U�CL��':?�;קy :^�傕7iO
1
+ ��i�:Sl]�2?�ñl3��E�Gg`��I�^vH�IJR��j�.���� 8r�W�g��
2
+ ��9l��D����E~7q\�߾���Ty�����EHB� ���m]�%ݚ�^��-�h4��H)�e#"��9r������PYsM��� ���kt))�%������el
data.tar.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- .��$�L��B?���]hF=��� �`֨�r?�B������׀8%2�,_J'=� F7����7
2
- l��익3����W^�l����]�s$H���I��0oǟm(w����i��_��.N������)��������x���"�+��>v[@:� ��BdJM'V:.j������ʙ�gd0� �>k �#��%X�!�xe<h�ۊ�5���m��jg+���/t(T����2 (':� 29�5
1
+ l�[�jȚ*�Og���KF�^46I�Vܧ�o��YS(����8�
2
+ %T�o�C4MZ��M2;�޲����jIX]�Z��e���(^�0�����p[Yd �}�b^bH��P� ��� �6�^s��oWk����� ����>hn��p?�`+��@��:X^{�r7���k:�hII&ËKu��Sh�ԗ�=�:����~Kq1t-�95G������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
 
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Mailchimp
3
- VERSION = "1.2.0"
3
+ VERSION = "2.0.0"
4
4
  end
5
5
  end
@@ -20,16 +20,14 @@ module OmniAuth
20
20
  end
21
21
 
22
22
  uid {
23
- raw_info["user_id"]
23
+ raw_info["account_id"]
24
24
  }
25
25
 
26
26
  info do
27
- contact = raw_info["contact"] || {}
28
-
29
27
  {
30
- :first_name => contact["fname"],
31
- :last_name => contact["lname"],
32
- :email => contact["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
- apikey = "#{@access_token.token}-#{data['dc']}"
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: 1.2.0
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: 2017-03-24 00:00:00.000000000 Z
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.5.1
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
- ��V���P"k/W��. _4����y��\�ڭ���ب�
2
- ���=iS�Ϩ�sHMسa�*.��%Ej3Z
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��!�`��]]��QEUV���o��o�햆.���� r[E3z�U�#�gT8���z$�{�