klaviyo 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/klaviyo.gemspec +2 -2
- data/lib/klaviyo/client.rb +5 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4761ff7c9edac6dd8dec7efd826f0b9a903022ced70b8938d9db3adfdc9f16ac
|
4
|
+
data.tar.gz: f9bca9ccb221bf7a30387a60e4fde3f6adba9e814702266fc0b869c5c470046b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0da39baf09b301c7df78833d2a9d62bc8f72b2512c06b4c67ca247a863f72d4563512915037ad80aff05168cb41d3830dbec56b3e2bda3605d7a8f1b7826baf4
|
7
|
+
data.tar.gz: d555098395599b4e1b9c725f815229949e0c208c00d0b387fcc00ac3071763d5aef830e3cf5316f71e7f84900e950bad27757370ab5a0b810f07a05e519541e0
|
data/klaviyo.gemspec
CHANGED
@@ -2,8 +2,8 @@ files = ['klaviyo.gemspec', '{lib}/**/*'].map {|f| Dir[f]}.flatten
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'klaviyo'
|
5
|
-
s.version = '1.
|
6
|
-
s.date = '
|
5
|
+
s.version = '1.2.0'
|
6
|
+
s.date = '2020-09-28'
|
7
7
|
s.summary = 'You heard us, a Ruby wrapper for the Klaviyo API'
|
8
8
|
s.description = 'Ruby wrapper for the Klaviyo API'
|
9
9
|
s.authors = ['Klaviyo Team']
|
data/lib/klaviyo/client.rb
CHANGED
@@ -6,7 +6,10 @@ module Klaviyo
|
|
6
6
|
class KlaviyoError < StandardError; end
|
7
7
|
|
8
8
|
class Client
|
9
|
-
|
9
|
+
VERSION = '1.2.0'
|
10
|
+
KL_USER_AGENT = "Ruby_Klaviyo/#{VERSION}"
|
11
|
+
|
12
|
+
def initialize(api_key, url = 'https://a.klaviyo.com/')
|
10
13
|
@api_key = api_key
|
11
14
|
@url = url
|
12
15
|
end
|
@@ -68,7 +71,7 @@ module Klaviyo
|
|
68
71
|
|
69
72
|
def request(path, params)
|
70
73
|
url = "#{@url}#{path}?#{params}"
|
71
|
-
open(url).read == '1'
|
74
|
+
open(url, 'User-Agent' => KL_USER_AGENT).read == '1'
|
72
75
|
end
|
73
76
|
end
|
74
77
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: klaviyo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Klaviyo Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|