lifecell_api 0.4.0 → 0.5.0
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 +4 -4
- data/.ruby-version +1 -1
- data/README.md +2 -0
- data/lib/lifecell_api.rb +6 -0
- data/lib/lifecell_api/methods.rb +3 -3
- data/lib/lifecell_api/version.rb +1 -1
- data/lifecell_api.gemspec +2 -2
- metadata +4 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 65a60e7b377fefdac70e87d6508e4582e19fc0d825748d1b66c7951fc5ff68e3
|
|
4
|
+
data.tar.gz: b395d2d4ca9d5cc23586d413b2ddb0b826ac8253c901605fd16772ed7195b10d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ea55e6dec4eef392d741895938ab44c5cd97339a9bf82756640c6d0cb4235fd6e6327e5009af6795c037e8c4826b99aa823450142d0a1e3763287bee662f6f4f
|
|
7
|
+
data.tar.gz: 37a157b15355cb5432a0ac59ee9c066746e1841e38e2d257f0d639558d25fecd19dfe3e183a6bedee0ed51cd4afab4769dde7b4f1f801df09b3fba208a0360d5
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
2.6.0
|
data/README.md
CHANGED
data/lib/lifecell_api.rb
CHANGED
|
@@ -27,6 +27,7 @@ require 'lifecell_api/version'
|
|
|
27
27
|
#
|
|
28
28
|
module Lifecell
|
|
29
29
|
class MethodError < ArgumentError; end
|
|
30
|
+
class StatusError < ArgumentError; end
|
|
30
31
|
|
|
31
32
|
RESPONSE_CODES = {
|
|
32
33
|
'0' => 'SUCCESSFULY_PERFORMED',
|
|
@@ -106,10 +107,15 @@ module Lifecell
|
|
|
106
107
|
|
|
107
108
|
response = response(url)
|
|
108
109
|
|
|
110
|
+
unless response.code == '200'
|
|
111
|
+
raise StatusError, "Received status code #{response.code} from server"
|
|
112
|
+
end
|
|
113
|
+
|
|
109
114
|
log&.debug("[#{method}] response: #{response.body}")
|
|
110
115
|
|
|
111
116
|
xml = parse_xml(response.body)
|
|
112
117
|
return xml if xml['responseCode'] == '0'
|
|
118
|
+
|
|
113
119
|
raise_error!(xml)
|
|
114
120
|
end
|
|
115
121
|
|
data/lib/lifecell_api/methods.rb
CHANGED
|
@@ -67,9 +67,9 @@ module Lifecell
|
|
|
67
67
|
def ui_properties(language_id, last_date_update)
|
|
68
68
|
request(
|
|
69
69
|
'getUIProperties',
|
|
70
|
-
accessKeyCode:
|
|
71
|
-
languageId:
|
|
72
|
-
osType:
|
|
70
|
+
accessKeyCode: @access_key_code,
|
|
71
|
+
languageId: language_id,
|
|
72
|
+
osType: @os_type,
|
|
73
73
|
lastDateUpdate: last_date_update
|
|
74
74
|
)
|
|
75
75
|
end
|
data/lib/lifecell_api/version.rb
CHANGED
data/lifecell_api.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
lib = File.expand_path('
|
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
require 'lifecell_api/version'
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
|
|
|
11
11
|
gem.email = ['anton.maminov@gmail.com']
|
|
12
12
|
gem.description = 'A Ruby interface to the lifecell API'
|
|
13
13
|
gem.summary = <<-SUMMARY
|
|
14
|
-
The
|
|
14
|
+
The Lifecell::API library is used for interactions
|
|
15
15
|
with api.life.com.ua
|
|
16
16
|
SUMMARY
|
|
17
17
|
gem.homepage = 'https://github.com/mamantoha/lifecell_api'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lifecell_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Anton Maminov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-12-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: xml-simple
|
|
@@ -89,9 +89,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
89
89
|
- !ruby/object:Gem::Version
|
|
90
90
|
version: '0'
|
|
91
91
|
requirements: []
|
|
92
|
-
|
|
93
|
-
rubygems_version: 2.7.3
|
|
92
|
+
rubygems_version: 3.0.1
|
|
94
93
|
signing_key:
|
|
95
94
|
specification_version: 4
|
|
96
|
-
summary: The
|
|
95
|
+
summary: The Lifecell::API library is used for interactions with api.life.com.ua
|
|
97
96
|
test_files: []
|