megam_api 0.44 → 0.45

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: 9878e6043a2b15cad23ce5f5910b02dd2d0f153d
4
- data.tar.gz: f1ac9270a97ac5043d8b0ea4e869742eac68d914
3
+ metadata.gz: 12ba31c76501eabd0b6d458cbce0c454551d468b
4
+ data.tar.gz: 291d5783e2fea6f8f946be490cfc4d42deb768c2
5
5
  SHA512:
6
- metadata.gz: 7e335d1d1a744da8114f5d4e395ab1f3c2bedf75b281a035373d202ffef01141b0cfdb760e1e7db2d3abfcfa3d9c13cc4f1d98e30914675421ac5d047c48f444
7
- data.tar.gz: 9e48acecc7a03c5566df08aba20773574ac8d3848093ea4b420c30ab57af16f548518c5c05e9792d2a0588ef42b51b84ac7ef888cf49bc221ed7c7110e576329
6
+ metadata.gz: c0271f01f4f3e7d5b5adae2bc53060b157c257ecd95a937b618fa2395bc368f10de18d37002927eda726b626e773a0a293a4227208a502a64bdcaeb6f3de4d78
7
+ data.tar.gz: a10eaf2b174107e8df8b558df473a7118b2637ab9b7499eaace5db2d301da39b28ceb2745cf6f5dbd12cbc13916d50ad82d8be26393f9689e580a6f8afbcb48b
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "0.44"
3
+ VERSION = "0.45"
4
4
  end
5
5
  end
@@ -119,13 +119,11 @@ module Megam
119
119
  index_hash["json_claz"] = self.class.name
120
120
  index_hash["id"] = id
121
121
  index_hash["name"] = name
122
- index_hash["appdetails"] = appdetails
123
- index_hash["features"] = features
122
+ index_hash["catalog"] = catalog
124
123
  index_hash["plans"] = plans
125
- index_hash["applinks"] = applinks
126
- index_hash["attach"] = attach
127
- index_hash["predefnode"] = predefnode
128
- index_hash["approved"] = approved
124
+ index_hash["cattype"] = cattype
125
+ index_hash["predef"] = predef
126
+ index_hash["status"] = status
129
127
  index_hash["some_msg"] = some_msg
130
128
  index_hash["created_at"] = created_at
131
129
  index_hash
@@ -141,13 +139,11 @@ module Megam
141
139
  result = {
142
140
  "id" => id,
143
141
  "name" => name,
144
- "appdetails" => appdetails,
145
- "features" => features,
142
+ "catalog" => catalog,
146
143
  "plans" => plans,
147
- "applinks" => applinks,
148
- "attach" => attach,
149
- "predefnode" => predefnode,
150
- "approved" => approved,
144
+ "cattype" => cattype,
145
+ "predef" => predef,
146
+ "status" => status,
151
147
  "created_at" => created_at
152
148
  }
153
149
  result
@@ -157,39 +153,18 @@ module Megam
157
153
  app = new
158
154
  app.id(o["id"]) if o.has_key?("id")
159
155
  app.name(o["name"]) if o.has_key?("name")
160
- app.logo(o["logo"]) if o.has_key?("logo")
161
- app.catagory(o["catagory"]) if o.has_key?("catagory")
162
- app.attach(o["attach"]) if o.has_key?("attach")
163
- app.predefnode(o["predefnode"]) if o.has_key?("predefnode")
164
- app.approved(o["approved"]) if o.has_key?("approved")
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
+
162
+ app.plans(o["plans"]) if o.has_key?("plans")
163
+ app.cattype(o["cattype"]) if o.has_key?("cattype")
164
+ app.predef(o["predef"]) if o.has_key?("predef")
165
+ app.status(o["status"]) if o.has_key?("status")
165
166
  app.created_at(o["created_at"]) if o.has_key?("created_at")
166
- app.plans(o["plans"]) if o.has_key?("plans")
167
- #requests
168
- oq = o["features"]
169
- app.features[:feature1] = oq["feature1"] if oq && oq.has_key?("feature1")
170
- app.features[:feature2] = oq["feature2"] if oq && oq.has_key?("feature2")
171
- app.features[:feature3] = oq["feature3"] if oq && oq.has_key?("feature3")
172
- app.features[:feature4] = oq["feature4"] if oq && oq.has_key?("feature4")
173
-
174
- oa = o["appdetails"]
175
- app.appdetails[:logo] = oa["logo"] if oa && oa.has_key?("logo")
176
- app.appdetails[:category] = oa["category"] if oa && oa.has_key?("category")
177
- app.appdetails[:description] = oa["description"] if oa && oa.has_key?("description")
178
-
179
- #op = o["plan"]
180
- #app.plan[:price] = op["price"] if op && op.has_key?("price")
181
- #app.plan[:description] = op["description"] if op && op.has_key?("description")
182
- #app.plan[:plantype]= op["plantype"] if op && op.has_key?("plantype")
183
-
184
- ol = o["applinks"]
185
- app.applinks[:free_support] = ol["free_support"] if ol && ol.has_key?("free_support")
186
- app.applinks[:paid_support] = ol["paid_support"] if ol && ol.has_key?("paid_support")
187
- app.applinks[:home_link] = ol["home_link"] if ol && ol.has_key?("home_link")
188
- app.applinks[:info_link] = ol["info_link"] if ol && ol.has_key?("info_link")
189
- app.applinks[:content_link] = ol["content_link"] if ol && ol.has_key?("content_link")
190
- app.applinks[:wiki_link] = ol["wiki_link"] if ol && ol.has_key?("wiki_link")
191
- app.applinks[:source_link] = ol["source_link"] if ol && ol.has_key?("source_link")
192
-
167
+
193
168
  #success or error
194
169
  app.some_msg[:code] = o["code"] if o.has_key?("code")
195
170
  app.some_msg[:msg_type] = o["msg_type"] if o.has_key?("msg_type")
@@ -206,16 +181,14 @@ module Megam
206
181
  end
207
182
 
208
183
  def from_hash(o)
209
- @name = o["name"] if o.has_key?("name")
210
- @id = o["id"] if o.has_key?("id")
211
- @appdetails = o["appdetails"] if o.has_key?("appdetails")
212
- @features = o["features"] if o.has_key?("features")
213
- @plans = o["plans"] if o.has_key?("plans")
214
- @applinks = o["applinks"] if o.has_key?("applinks")
215
- @attach = o["attach"] if o.has_key?("attach")
216
- @predefnode = o["predefnode"] if o.has_key?("predefnode")
217
- @approved = o["approved"] if o.has_key?("approved")
218
- @created_at = o["created_at"] if o.has_key?("created_at")
184
+ @name = o["name"] if o.has_key?("name")
185
+ @id = o["id"] if o.has_key?("id")
186
+ @catalog = o["catalog"] if o.has_key?("catalog")
187
+ @plans = o["plans"] if o.has_key?("plans")
188
+ @cattype = o["cattype"] if o.has_key?("cattype")
189
+ @predef = o["predef"] if o.has_key?("predef")
190
+ @status = o["status"] if o.has_key?("status")
191
+ @created_at = o["created_at"] if o.has_key?("created_at")
219
192
  self
220
193
  end
221
194
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: megam_api
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.44'
4
+ version: '0.45'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajthilak, Kishorekumar Neelamegam, Thomas Alrin, Yeshwanth Kumar, Subash Sethurajan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-03 00:00:00.000000000 Z
11
+ date: 2015-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon