talon_one 0.0.7 → 0.0.8

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
  SHA1:
3
- metadata.gz: ac7cd2f5968fe78f30a0edc443d3d39265c668f7
4
- data.tar.gz: acb3da19459917cad6094d7678c1d3f4798cf5c3
3
+ metadata.gz: 95e903cd6d515eaf7af79694d78f3175ed2c2ccc
4
+ data.tar.gz: af3ac0c034057857644dc3b581bceee4891dbd6f
5
5
  SHA512:
6
- metadata.gz: 0b3bc12ad1ebb44d2be95f4b9dfcdf5c217fa9ee01e894c96ce65e8ca052a1746c28d7913bb7794f1f7ad87a5c443340d448fcbba1c89a61b987729ae3cf61b6
7
- data.tar.gz: 90dd6bbcb5561afd2476f77aed4db4ac8350a32c41f220d5f194fc6a9a4427ed88151ef390af80d33cfcc5382c85e91da90a3485f6a46f027ac3d60be29d8a84
6
+ metadata.gz: 62788bee7b389d6206ba3905cd0d8312501491636a51e9cff202191331deb1b0b03f651b3e57897317a374fd6a144d47a7fcc1b671390d6553917ebf7a51272b
7
+ data.tar.gz: e48c7190c6949840970c9c2164ed9d5cc93476941acc2c55b4e7a5b68266b25d3e79f126010b04c0496abd0ebc9bcd854da5cabcbdaa8c835c1ca819090f0737
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.0.8 / 2017-06-06
2
+
3
+ * [FEATURE] Expose login API call
4
+
1
5
  # 0.0.7 / 2017-05-24
2
6
 
3
7
  * [FEATURE] Add support for creating and retrieving campaigns using the Management API
@@ -14,16 +14,12 @@ module TalonOne
14
14
  email = config[:email] || ENV["TALONONE_EMAIL"]
15
15
  password = config[:password] || ENV["TALONONE_PASSWORD"]
16
16
  if email && password
17
- login(email, password)
17
+ res = login(email, password)
18
+ @token = res["token"]
18
19
  end
19
20
  end
20
21
  end
21
22
 
22
- def login(email, password)
23
- res = request "Post", "/v1/sessions", {"email" => email, "password" => password}
24
- @token = res["token"]
25
- end
26
-
27
23
  def request(method, path, payload = nil)
28
24
  req = Net::HTTP.const_get(method).new(@endpoint.path + path)
29
25
  if @token
@@ -57,6 +53,10 @@ module TalonOne
57
53
  request "Delete", path
58
54
  end
59
55
 
56
+ def login(email, password)
57
+ post "/v1/sessions", {"email" => email, "password" => password}
58
+ end
59
+
60
60
  def create_application(params)
61
61
  post "/v1/applications", params
62
62
  end
data/talon_one.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'talon_one'
3
- s.version = '0.0.7'
4
- s.date = '2017-05-19'
3
+ s.version = '0.0.8'
4
+ s.date = '2017-06-06'
5
5
  s.summary = 'Client for the Talon.One API'
6
6
  s.description = 'A simple client for using the Talon.One API'
7
7
  s.authors = ['Talon.One GmbH']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: talon_one
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Talon.One GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-19 00:00:00.000000000 Z
11
+ date: 2017-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj