megam_api 0.68 → 0.69
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/version.rb +1 -1
- data/lib/megam/core/marketplace.rb +37 -53
- 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: e15d29936192b95962d7f3b42696e9565f263da2
|
4
|
+
data.tar.gz: afa01f4b4c89107eee768d1712030c1e74cba2ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67eebae80976dfb24ec61aeda4d5dfa737e5c88f68fe719b0c28db004cbd4b68aa9110e8e94abcd1bf504daf59a2ae1e5a4d25598e792f834ff968f5a06a3d50
|
7
|
+
data.tar.gz: d29fd9e6c401f98397687b772d492b809c95f0623db3e884e4dbf2f7feaee83a093b80e7108b6615967203ed493d4513ba938c9539464e1272debcbcbe15f2e3
|
data/lib/megam/api/version.rb
CHANGED
@@ -20,12 +20,11 @@ module Megam
|
|
20
20
|
def initialize(email=nil, api_key=nil, host=nil)
|
21
21
|
@id = nil
|
22
22
|
@name = nil
|
23
|
-
@
|
24
|
-
@
|
25
|
-
@
|
26
|
-
@
|
27
|
-
@
|
28
|
-
@status = nil
|
23
|
+
@cattype = nil
|
24
|
+
@order = nil
|
25
|
+
@image = nil
|
26
|
+
@url = nil
|
27
|
+
@plans= nil
|
29
28
|
@created_at = nil
|
30
29
|
super(email, api_key, host)
|
31
30
|
end
|
@@ -43,14 +42,6 @@ module Megam
|
|
43
42
|
end
|
44
43
|
end
|
45
44
|
|
46
|
-
def catalog(arg=nil)
|
47
|
-
if arg != nil
|
48
|
-
@catalog = arg
|
49
|
-
else
|
50
|
-
@catalog
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
45
|
def id(arg=nil)
|
55
46
|
if arg != nil
|
56
47
|
@id = arg
|
@@ -59,7 +50,6 @@ module Megam
|
|
59
50
|
end
|
60
51
|
end
|
61
52
|
|
62
|
-
|
63
53
|
def plans(arg=nil)
|
64
54
|
if arg != nil
|
65
55
|
@plans = arg
|
@@ -68,28 +58,35 @@ module Megam
|
|
68
58
|
end
|
69
59
|
end
|
70
60
|
|
61
|
+
def cattype(arg=nil)
|
62
|
+
if arg != nil
|
63
|
+
@cattype = arg
|
64
|
+
else
|
65
|
+
@cattype
|
66
|
+
end
|
67
|
+
end
|
71
68
|
|
72
|
-
def
|
69
|
+
def order(arg=nil)
|
73
70
|
if arg != nil
|
74
|
-
@
|
71
|
+
@order = arg
|
75
72
|
else
|
76
|
-
@
|
73
|
+
@order
|
77
74
|
end
|
78
75
|
end
|
79
76
|
|
80
|
-
def
|
77
|
+
def image(arg=nil)
|
81
78
|
if arg != nil
|
82
|
-
@
|
79
|
+
@image = arg
|
83
80
|
else
|
84
|
-
@
|
81
|
+
@image
|
85
82
|
end
|
86
83
|
end
|
87
84
|
|
88
|
-
def
|
85
|
+
def url(arg=nil)
|
89
86
|
if arg != nil
|
90
|
-
@
|
87
|
+
@url = arg
|
91
88
|
else
|
92
|
-
@
|
89
|
+
@url
|
93
90
|
end
|
94
91
|
end
|
95
92
|
|
@@ -119,12 +116,11 @@ module Megam
|
|
119
116
|
index_hash["json_claz"] = self.class.name
|
120
117
|
index_hash["id"] = id
|
121
118
|
index_hash["name"] = name
|
122
|
-
index_hash["catalog"] = catalog
|
123
|
-
index_hash["plans"] = plans
|
124
119
|
index_hash["cattype"] = cattype
|
125
|
-
index_hash["
|
126
|
-
index_hash["
|
127
|
-
index_hash["
|
120
|
+
index_hash["order"] = order
|
121
|
+
index_hash["image"] = image
|
122
|
+
index_hash["url"] = url
|
123
|
+
index_hash["plans"] = plans
|
128
124
|
index_hash["created_at"] = created_at
|
129
125
|
index_hash
|
130
126
|
end
|
@@ -139,11 +135,11 @@ module Megam
|
|
139
135
|
result = {
|
140
136
|
"id" => id,
|
141
137
|
"name" => name,
|
142
|
-
"catalog" => catalog,
|
143
|
-
"plans" => plans,
|
144
138
|
"cattype" => cattype,
|
145
|
-
"
|
146
|
-
"
|
139
|
+
"order" => order,
|
140
|
+
"image" => image,
|
141
|
+
"url" => url,
|
142
|
+
"plans" => plans,
|
147
143
|
"created_at" => created_at
|
148
144
|
}
|
149
145
|
result
|
@@ -153,25 +149,13 @@ module Megam
|
|
153
149
|
app = new
|
154
150
|
app.id(o["id"]) if o.has_key?("id")
|
155
151
|
app.name(o["name"]) if o.has_key?("name")
|
156
|
-
|
157
|
-
ct = o["catalog"]
|
158
|
-
app.catalog[:logo] = ct["logo"] if ct && ct.has_key?("logo")
|
159
|
-
app.catalog[:category] = ct["category"] if ct && ct.has_key?("category")
|
160
|
-
app.catalog[:description] = ct["description"] if ct && ct.has_key?("description")
|
161
|
-
app.catalog[:port] = ct["port"] if ct && ct.has_key?("port")
|
162
|
-
|
163
|
-
app.plans(o["plans"]) if o.has_key?("plans")
|
164
152
|
app.cattype(o["cattype"]) if o.has_key?("cattype")
|
165
|
-
app.
|
166
|
-
app.
|
153
|
+
app.order(o["order"]) if o.has_key?("order")
|
154
|
+
app.image(o["image"]) if o.has_key?("image")
|
155
|
+
app.url(o["url"]) if o.has_key?("url")
|
156
|
+
app.plans(o["plans"]) if o.has_key?("plans")
|
167
157
|
app.created_at(o["created_at"]) if o.has_key?("created_at")
|
168
158
|
|
169
|
-
#success or error
|
170
|
-
app.some_msg[:code] = o["code"] if o.has_key?("code")
|
171
|
-
app.some_msg[:msg_type] = o["msg_type"] if o.has_key?("msg_type")
|
172
|
-
app.some_msg[:msg]= o["msg"] if o.has_key?("msg")
|
173
|
-
app.some_msg[:links] = o["links"] if o.has_key?("links")
|
174
|
-
|
175
159
|
app
|
176
160
|
end
|
177
161
|
|
@@ -184,11 +168,11 @@ module Megam
|
|
184
168
|
def from_hash(o)
|
185
169
|
@name = o["name"] if o.has_key?("name")
|
186
170
|
@id = o["id"] if o.has_key?("id")
|
187
|
-
@catalog = o["catalog"] if o.has_key?("catalog")
|
188
|
-
@plans = o["plans"] if o.has_key?("plans")
|
189
171
|
@cattype = o["cattype"] if o.has_key?("cattype")
|
190
|
-
@
|
191
|
-
@
|
172
|
+
@order = o["order"] if o.has_key?("order")
|
173
|
+
@image = o["image"] if o.has_key?("image")
|
174
|
+
@url = o["url"] if o.has_key?("url")
|
175
|
+
@plans = o["plans"] if o.has_key?("plans")
|
192
176
|
@created_at = o["created_at"] if o.has_key?("created_at")
|
193
177
|
self
|
194
178
|
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: '0.
|
4
|
+
version: '0.69'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajthilak, Kishorekumar Neelamegam, Thomas Alrin, Yeshwanth Kumar, Subash Sethurajan,
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-09-
|
12
|
+
date: 2015-09-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: excon
|