wialon 1.1.7 → 1.1.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 +4 -4
- data/lib/wialon.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e198dd1b66692018127f4eebe84b18d941d5d480b93248a7d4e95870d18b8479
|
|
4
|
+
data.tar.gz: 03565f826faf7a8dec6e10206400fe7ef1dcbdf737401cb590f71985b4457a1c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 64bb2540e6266eccadf90e91cf6e4d406287eb0f0ff53821d7ec33a230debd113e5dcfd2cb8944eae5f5f29f052073fe662e77abd8ad7b7d89891e03e94e8a5c
|
|
7
|
+
data.tar.gz: fe963be41c1b4a611f157ccbdcc04f60fe83cf28cbd3690aca3dbcab5140a12be2629d11cc5c5b41b1a7adc6f28711690b548d1bc77637305fc06d1a037aca93
|
data/lib/wialon.rb
CHANGED
|
@@ -131,7 +131,7 @@ class Wialon
|
|
|
131
131
|
if !response[:error].nil?
|
|
132
132
|
return {
|
|
133
133
|
status: 400,
|
|
134
|
-
reason:
|
|
134
|
+
reason: parse_errors(response[:error]),
|
|
135
135
|
result: response
|
|
136
136
|
}
|
|
137
137
|
end
|
|
@@ -145,13 +145,13 @@ class Wialon
|
|
|
145
145
|
|
|
146
146
|
def login(token)
|
|
147
147
|
result = self.token_login({token: token})
|
|
148
|
-
if !result[:eid].nil?
|
|
149
|
-
self.sid = result[:eid]
|
|
148
|
+
if !result[:result][:eid].nil?
|
|
149
|
+
self.sid = result[:result][:eid]
|
|
150
150
|
end
|
|
151
151
|
|
|
152
152
|
begin
|
|
153
|
-
if !result[:user][:id].nil?
|
|
154
|
-
self.uid = result[:user][:id]
|
|
153
|
+
if !result[:result][:user][:id].nil?
|
|
154
|
+
self.uid = result[:result][:user][:id]
|
|
155
155
|
end
|
|
156
156
|
rescue Exception => e
|
|
157
157
|
if self.debug
|
|
@@ -163,7 +163,7 @@ class Wialon
|
|
|
163
163
|
|
|
164
164
|
def logout
|
|
165
165
|
result = self.core_logout()
|
|
166
|
-
if result.empty? && result[:error] == 0
|
|
166
|
+
if result.empty? && result[:result][:error] == 0
|
|
167
167
|
self.sid = ""
|
|
168
168
|
end
|
|
169
169
|
return result
|