megam_api 1.10.3 → 1.10.4
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/megam/api/reports.rb +9 -0
- data/lib/megam/api/snapshots.rb +11 -0
- data/lib/megam/api/version.rb +1 -1
- data/lib/megam/core/reports.rb +14 -5
- data/lib/megam/core/snapshots.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1223c995d5012dfe83805b8b7583f93de7947d78
|
|
4
|
+
data.tar.gz: f7680d52d7afcad51f6928002c939fdc8364b1d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '009a358770e7a7f47b6beb6c6a3c9c3844f94c566ee75716de90c2fbd6c14152797ebe31883723bbf985ae327207d181b298297fcac6b253cf9befbab0e4e14c'
|
|
7
|
+
data.tar.gz: 1b45037ae5e5576a6354218482446995a8e5e9dc9c5cc460ee12d1d80f39f53617d38e888f8a31f29046c7c00401a89325b1401c3bf05a6d38d81d167aae52bc
|
data/lib/megam/api/reports.rb
CHANGED
|
@@ -11,5 +11,14 @@ module Megam
|
|
|
11
11
|
:body => @options[:body]
|
|
12
12
|
)
|
|
13
13
|
end
|
|
14
|
+
|
|
15
|
+
def get_reports(new_sps)
|
|
16
|
+
@options = {:path => '/accounts/reports/content', :body => Megam::JSONCompat.to_json(new_sps)}.merge(@options)
|
|
17
|
+
request(
|
|
18
|
+
:expects => 200,
|
|
19
|
+
:method => :post,
|
|
20
|
+
:body => @options[:body]
|
|
21
|
+
)
|
|
22
|
+
end
|
|
14
23
|
end
|
|
15
24
|
end
|
data/lib/megam/api/snapshots.rb
CHANGED
|
@@ -31,5 +31,16 @@ module Megam
|
|
|
31
31
|
)
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
+
def update_snapshots(update_sps)
|
|
35
|
+
@options = {:path => '/snapshots/update',
|
|
36
|
+
:body => Megam::JSONCompat.to_json(update_sps)}.merge(@options)
|
|
37
|
+
|
|
38
|
+
request(
|
|
39
|
+
:expects => 201,
|
|
40
|
+
:method => :post,
|
|
41
|
+
:body => @options[:body]
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
34
45
|
end
|
|
35
46
|
end
|
data/lib/megam/api/version.rb
CHANGED
data/lib/megam/core/reports.rb
CHANGED
|
@@ -19,11 +19,11 @@ module Megam
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def id(arg=nil)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
if arg != nil
|
|
23
|
+
@id = arg
|
|
24
|
+
else
|
|
25
|
+
@id
|
|
26
|
+
end
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def start_date(arg=nil)
|
|
@@ -155,10 +155,19 @@ module Megam
|
|
|
155
155
|
sps.create
|
|
156
156
|
end
|
|
157
157
|
|
|
158
|
+
def self.show(params)
|
|
159
|
+
sps = from_hash(params)
|
|
160
|
+
sps.show
|
|
161
|
+
end
|
|
162
|
+
|
|
158
163
|
def create
|
|
159
164
|
megam_rest.post_reports(to_hash)
|
|
160
165
|
end
|
|
161
166
|
|
|
167
|
+
def show
|
|
168
|
+
megam_rest.get_reports(to_hash)
|
|
169
|
+
end
|
|
170
|
+
|
|
162
171
|
def to_s
|
|
163
172
|
Megam::Stuff.styled_hash(to_hash)
|
|
164
173
|
end
|
data/lib/megam/core/snapshots.rb
CHANGED
|
@@ -209,6 +209,11 @@ module Megam
|
|
|
209
209
|
sps.create
|
|
210
210
|
end
|
|
211
211
|
|
|
212
|
+
def self.update(params)
|
|
213
|
+
sps = from_hash(params)
|
|
214
|
+
sps.update
|
|
215
|
+
end
|
|
216
|
+
|
|
212
217
|
# Create the node via the REST API
|
|
213
218
|
def create
|
|
214
219
|
megam_rest.post_snapshots(to_hash)
|
|
@@ -225,6 +230,10 @@ module Megam
|
|
|
225
230
|
sps.megam_rest.list_snapshots
|
|
226
231
|
end
|
|
227
232
|
|
|
233
|
+
def update
|
|
234
|
+
megam_rest.update_snapshots(to_hash)
|
|
235
|
+
end
|
|
236
|
+
|
|
228
237
|
def to_s
|
|
229
238
|
Megam::Stuff.styled_hash(to_hash)
|
|
230
239
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: megam_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.10.
|
|
4
|
+
version: 1.10.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rajthilak, Kishorekumar Neelamegam, Ranjitha R, Vinodhini V, Rathish VBR, Rajesh
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2017-01-
|
|
12
|
+
date: 2017-01-11 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: excon
|