blastengine 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ba1cbb4d5e111cb6b99560d4dfeb7b306a454781c5b0371693054e5840d47f3
4
- data.tar.gz: 97eb8e49ae1f518f4c6524567e46e24ec29dec6f691c2879a4d21888845f73a9
3
+ metadata.gz: 3fc0c6d0e0ae11a8ec331c4893a7dc01e1e864cd9e5a9170429e3a9157071e55
4
+ data.tar.gz: 3209cf3a38d25d8973500ed30b2e61dcdfa21e0f2fea28e092704f600352589c
5
5
  SHA512:
6
- metadata.gz: 0ac46c3d7d838628150e818cf674768d5a04a7f29b59b21c7a419549d1c3ce0316b59cb69e50089121328d44df93e60bcfa570b16af833311e59f855c23839b0
7
- data.tar.gz: 025c7107e6d154debe100b3010f6593fd2585e41ad83021cacfe4d6ca83fbe70ddc3c6126760d18a87ca8a8382d6e05b1195bfd582704f5f79a79abe58ccc2c2
6
+ metadata.gz: e187cc819ef4a049ae1e3fa38903293502db78f5b81ca2ee27acb172f5a3d92429e445d076c92227476bafb5260b3667539f40b1794eef5a4a8dead7d8c41d59
7
+ data.tar.gz: 72cf1b0088c672d99363c26395aef7d681aa36fdd16b468694709f08d1c16d4dff5efbb96cf267d4c67e8aa894816a2b1ae5cfb21eb97157990120603d6f6fa2
@@ -108,5 +108,19 @@ module Blastengine
108
108
  res = Mail.client.get url
109
109
  return res['data'].map {|params| Mail.from_hash params }
110
110
  end
111
+
112
+ def self.all(params = {})
113
+ Hash[ params.map{|k,v| [k.to_sym, v] } ]
114
+ if params[:delivery_start] != nil
115
+ params[:delivery_start] = params[:delivery_start].iso8601
116
+ end
117
+ if params[:delivery_end] != nil
118
+ params[:delivery_end] = params[:delivery_end].iso8601
119
+ end
120
+ query_string = URI.encode_www_form(params)
121
+ url = "/deliveries/all?#{query_string}";
122
+ res = Mail.client.get url
123
+ return res['data'].map {|params| Mail.from_hash params }
124
+ end
111
125
  end
112
126
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Blastengine
4
- VERSION = "0.6.0"
4
+ VERSION = "0.6.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blastengine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Atsushi Nakatsugawa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-05 00:00:00.000000000 Z
11
+ date: 2024-02-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is a SDK for sending email by blastengine.
14
14
  email:
@@ -25,7 +25,6 @@ files:
25
25
  - LICENSE
26
26
  - README.md
27
27
  - Rakefile
28
- - blastengine.gemspec
29
28
  - lib/blastengine.rb
30
29
  - lib/blastengine/base.rb
31
30
  - lib/blastengine/bulk.rb
data/blastengine.gemspec DELETED
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/blastengine/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "blastengine"
7
- spec.version = Blastengine::VERSION
8
- spec.authors = ["Atsushi Nakatsugawa"]
9
- spec.email = ["atsushi@moongift.jp"]
10
-
11
- spec.summary = "SDK for sending email by blastengine"
12
- spec.description = "This is a SDK for sending email by blastengine."
13
- spec.homepage = "https://blastengine.jp/"
14
- spec.license = "MIT"
15
- spec.required_ruby_version = ">= 2.6.0"
16
-
17
- # spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
18
-
19
- spec.metadata["homepage_uri"] = spec.homepage
20
- spec.metadata["source_code_uri"] = "https://github.com/blastengineMania/blastengine-ruby"
21
- spec.metadata["changelog_uri"] = "https://github.com/blastengineMania/blastengine-ruby/CHANGELOG.md"
22
-
23
- # Specify which files should be added to the gem when it is released.
24
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
- `git ls-files -z`.split("\x0").reject do |f|
27
- (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
28
- end
29
- end
30
- spec.bindir = "exe"
31
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
- spec.require_paths = ["lib"]
33
-
34
- # Uncomment to register a new dependency of your gem
35
- # spec.add_dependency "example-gem", "~> 1.0"
36
-
37
- # For more information and examples about making a new gem, check out our
38
- # guide at: https://bundler.io/guides/creating_gem.html
39
- end