MailchimpTransactional 1.0.11 → 1.0.16

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
2
  SHA256:
3
- metadata.gz: 7e0deee5f4eca0de6a434d89ef0aa167a6214307f8b5693b38ce642e12f269bc
4
- data.tar.gz: b9762ab4e022c695800bbe1058b8d3030ac423e0e6b8389d2b60653107039696
3
+ metadata.gz: fe8052d85b2cc2abcffe1e6cc7eed1ea0483e6db282e1e42c905ae4b9b3fbc80
4
+ data.tar.gz: c59caea12c1eb240b4c6b9aab84c2e00a1da25890c537b0ee5a979eba91ab3dd
5
5
  SHA512:
6
- metadata.gz: 3d433bb7804e58e9395de382c71cf6241fa8af156e1ea4cc7a6d9524d003f83e3433ab52033639dd16ec4b9997d826ce6d3c04c1c5b9e82b27dca5df643248f3
7
- data.tar.gz: 6c238330d628a6c80ea498b39ab65224cf245ac674befb1009d53d9a8fff82f981990dde93e2fef0fd4b3596a51e3b35cca392ca387d5b13477989dd7efb2d88
6
+ metadata.gz: 875cd7b7ee205462d178c153fa6d983eac0204ebdc76bda141760737a65d862cc31f70ff9332a71dcd76afd7c0226a70266dd521c4bf6f0a2064313b85f1144b
7
+ data.tar.gz: 947b085cea39205e290c0b6e875358e61a83782b1ce7b521623af91dee9a824afa8a2ad1cb6fc500e0ef6be91d4192c3fea6c8b06db1474212899c52659f1824
@@ -5,8 +5,8 @@
5
5
 
6
6
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
7
7
 
8
- OpenAPI spec version: 1.0.11
9
- Contact: apihelp@mandrill.com
8
+ OpenAPI spec version: 1.0.16
9
+ Contact: apihelp@mailchimp.com
10
10
  Generated by: https://github.com/swagger-api/swagger-codegen.git
11
11
  Swagger Codegen version: 2.4.12
12
12
 
@@ -20,10 +20,10 @@ Gem::Specification.new do |s|
20
20
  s.version = MailchimpTransactional::VERSION
21
21
  s.platform = Gem::Platform::RUBY
22
22
  s.authors = ["Swagger-Codegen"]
23
- s.email = ["apihelp@mandrill.com"]
23
+ s.email = ["apihelp@mailchimp.com"]
24
24
  s.homepage = "https://github.com/swagger-api/swagger-codegen"
25
25
  s.summary = "Mailchimp Transactional API Ruby Gem"
26
- s.description = "Mailchimp Transactional Ruby SDK"
26
+ s.description = "The official Ruby client library for the Mailchimp Trainsactional API"
27
27
  s.license = 'Apache-2.0'
28
28
  s.required_ruby_version = ">= 1.9"
29
29
 
data/README.md CHANGED
@@ -15,15 +15,15 @@ gem build MailchimpTransactional.gemspec
15
15
  Then either install the gem locally:
16
16
 
17
17
  ```shell
18
- gem install ./MailchimpTransactional-1.0.11.gem
18
+ gem install ./MailchimpTransactional-1.0.16.gem
19
19
  ```
20
- (for development, run `gem install --dev ./MailchimpTransactional-1.0.11.gem` to install the development dependencies)
20
+ (for development, run `gem install --dev ./MailchimpTransactional-1.0.16.gem` to install the development dependencies)
21
21
 
22
22
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
23
23
 
24
24
  Finally add this to the Gemfile:
25
25
 
26
- gem 'MailchimpTransactional', '~> 1.0.11'
26
+ gem 'MailchimpTransactional', '~> 1.0.16'
27
27
 
28
28
  ### Install from Git
29
29
 
@@ -45,9 +45,9 @@ ruby -Ilib script.rb
45
45
  require 'MailchimpTransactional'
46
46
 
47
47
  begin
48
- client = MailchimpTransactional::Client.new(ENV['MANDRILL_KEY'])
49
- result = client.users.ping() # => 'PONG!'
50
- p result
48
+ client = MailchimpTransactional::Client.new('YOUR_API_KEY')
49
+ resp = client.users.ping
50
+ p resp
51
51
  rescue MailchimpTransactional::ApiError => e
52
52
  puts "Error: #{e}"
53
53
  end
@@ -56,7 +56,7 @@ end
56
56
  ## Sending Requests
57
57
  All requests are sent via POST and accept a single argument as the request body parameter.
58
58
  ```ruby
59
- mailchimp.templates.publish({ :name => 'My Template' });
59
+ client.templates.publish({ name:'My Template' });
60
60
  ```
61
61
 
62
62
  ## Output Formats
@@ -67,12 +67,12 @@ Optionally, you can set the default response format for **all requests** to one
67
67
  - `yaml`
68
68
 
69
69
  ```ruby
70
- mailchimp.set_default_output_format('xml');
70
+ client.set_default_output_format('xml');
71
71
  ```
72
72
 
73
73
  You can also set the response format for a **single request** by passing in a special `outputFormat` param to the request body.
74
74
  ```ruby
75
- mailchimp.senders.list({ :outputFormat => 'php' });
75
+ client.senders.list({ outputFormat: 'php' });
76
76
  ```
77
77
 
78
78
  ## API Endpoints
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -40,7 +40,7 @@ module MailchimpTransactional
40
40
  data
41
41
  end
42
42
 
43
- # List most clicked ur ls
43
+ # List most clicked urls
44
44
  # Get the 100 most clicked URLs.
45
45
  # @param body
46
46
  # @param [Hash] opts the optional parameters
@@ -50,7 +50,7 @@ module MailchimpTransactional
50
50
  data
51
51
  end
52
52
 
53
- # Search most clicked ur ls
53
+ # Search most clicked urls
54
54
  # Return the 100 most clicked URLs that match the search query given.
55
55
  # @param body
56
56
  # @param [Hash] opts the optional parameters
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -63,21 +63,21 @@ module MailchimpTransactional
63
63
  body[:key] = @api_key
64
64
 
65
65
  # send request
66
- conn = Excon.new(url, :headers => {'Content-Type' => 'application/json'})
66
+ conn = Excon.new(url, :headers => {'Content-Type' => 'application/json'}, :read_timeout => 300, :write_timeout => 300)
67
67
  res = conn.post(:body => body.to_json)
68
68
 
69
69
  # handle response
70
70
  data = nil
71
71
 
72
- puts "active format: #{active_output_format}"
73
-
74
72
  if res.status == 200
75
73
  if active_output_format == 'json'
76
- return JSON.parse(res.body)
74
+ data = JSON.parse(res.body)
77
75
  else
78
- return res.body
76
+ data = res.body
79
77
  end
80
- else
78
+ end
79
+
80
+ if (!data)
81
81
  fail ApiError.new(:status => res.status, :response_body => res.body)
82
82
  end
83
83
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
@@ -3,13 +3,13 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 1.0.11
7
- Contact: apihelp@mandrill.com
6
+ OpenAPI spec version: 1.0.16
7
+ Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
10
10
 
11
11
  =end
12
12
 
13
13
  module MailchimpTransactional
14
- VERSION = '1.0.11'
14
+ VERSION = '1.0.16'
15
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: MailchimpTransactional
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 1.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swagger-Codegen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-06 00:00:00.000000000 Z
11
+ date: 2020-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon
@@ -184,9 +184,9 @@ dependencies:
184
184
  - - ">="
185
185
  - !ruby/object:Gem::Version
186
186
  version: 0.2.12
187
- description: Mailchimp Transactional Ruby SDK
187
+ description: The official Ruby client library for the Mailchimp Trainsactional API
188
188
  email:
189
- - apihelp@mandrill.com
189
+ - apihelp@mailchimp.com
190
190
  executables: []
191
191
  extensions: []
192
192
  extra_rdoc_files: []