megam_api 0.56 → 0.57

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9818fe4610d915f4fef1e1eee4b70f76bc1b85a8
4
- data.tar.gz: 0ecdd3cd204d83031c52135fad8f8d505d2501ba
3
+ metadata.gz: b3fd7d366846da786b663c9d5b0c86a49525a7d5
4
+ data.tar.gz: 1f3965af56356353f385c309315dfd519386cc44
5
5
  SHA512:
6
- metadata.gz: 129876ce490a1527e75b132c010196b537c4f8c6b95dbd13fdd23305cc90ebe2e0bff64f200a3fd0bd6ee5cbe1431f2c128cfa0a5f66724db2a752acdefaba20
7
- data.tar.gz: 4a90716b93c566e299f406964fdc02ab2882a205496d3ba36b6f149e0ed98b7455012cce3de6f583b731eccb71660c9ccf3b5f476ef6c2a4154a5d0e7d015931
6
+ metadata.gz: 2ee993cbea92129c1d301732036358d277dadd667c76c6c5b41ae69c3cd8443b190399cd33cfc85f5ddaa7a6e5ca7b94ee77e835916564b8484a19d31909bc6c
7
+ data.tar.gz: 063a75a31be379b57a25c901054e70d56411d7b6c2843e7603f9664c52e4dca28f1e8d7106dbb3ee257cd5e05e3b3c98562aba3f76364c0a0643cb76e51aff9b
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "0.56"
3
+ VERSION = "0.57"
4
4
  end
5
5
  end
@@ -17,9 +17,9 @@ module Megam
17
17
  class Request < Megam::ServerAPI
18
18
  def initialize(email=nil, api_key=nil)
19
19
  @id = nil
20
- @node_id = nil
21
- @node_name = nil
22
- @req_type = nil
20
+ @cat_id = nil
21
+ @name = nil
22
+ @cattype = nil
23
23
  @command =nil
24
24
  @some_msg = {}
25
25
  @created_at = nil
@@ -39,26 +39,26 @@ module Megam
39
39
  end
40
40
  end
41
41
 
42
- def node_id(arg=nil)
42
+ def cat_id(arg=nil)
43
43
  if arg != nil
44
- @node_id = arg
44
+ @cat_id = arg
45
45
  else
46
- @node_id
46
+ @cat_id
47
47
  end
48
48
  end
49
49
 
50
- def node_name(arg=nil)
50
+ def name(arg=nil)
51
51
  if arg != nil
52
- @node_name = arg
52
+ @name = arg
53
53
  else
54
- @node_name
54
+ @name
55
55
  end
56
56
  end
57
- def req_type(arg=nil)
57
+ def cattype(arg=nil)
58
58
  if arg != nil
59
- @req_type = arg
59
+ @cattype = arg
60
60
  else
61
- @req_type
61
+ @cattype
62
62
  end
63
63
  end
64
64
  def created_at(arg=nil)
@@ -94,9 +94,9 @@ module Megam
94
94
  index_hash = Hash.new
95
95
  index_hash["json_claz"] = self.class.name
96
96
  index_hash["id"] = id
97
- index_hash["node_id"] = node_id
98
- index_hash["node_name"] = node_name
99
- index_hash["req_type"] = req_type
97
+ index_hash["cat_id"] = cat_id
98
+ index_hash["name"] = name
99
+ index_hash["cattype"] = cattype
100
100
  index_hash["command"] = command
101
101
  index_hash["created_at"] = created_at
102
102
  index_hash
@@ -111,9 +111,9 @@ module Megam
111
111
  def for_json
112
112
  result = {
113
113
  "id" => id,
114
- "node_id" => node_id,
115
- "node_name" => node_name,
116
- "req_type" => req_type,
114
+ "cat_id" => cat_id,
115
+ "name" => name,
116
+ "cattype" => cattype,
117
117
  "command" => command,
118
118
  "created_at" => created_at
119
119
  }
@@ -124,9 +124,9 @@ module Megam
124
124
  def self.json_create(o)
125
125
  node = new
126
126
  node.id(o["id"]) if o.has_key?("id")
127
- node.node_id(o["node_id"]) if o.has_key?("node_id")
128
- node.node_name(o["node_name"]) if o.has_key?("node_name")
129
- node.req_type(o["req_type"]) if o.has_key?("req_type")
127
+ node.cat_id(o["cat_id"]) if o.has_key?("cat_id")
128
+ node.name(o["name"]) if o.has_key?("name")
129
+ node.cattype(o["cattype"]) if o.has_key?("cattype")
130
130
  node.command(o["command"]) if o.has_key?("command")
131
131
  node.created_at(o["created_at"]) if o.has_key?("created_at")
132
132
  #success or error
@@ -145,18 +145,18 @@ module Megam
145
145
 
146
146
  def from_hash(o)
147
147
  @id = o[:id] if o.has_key?(:id)
148
- @node_id = o[:node_id] if o.has_key?(:node_id)
149
- @node_name = o[:node_name] if o.has_key?(:node_name)
150
- @req_type = o[:req_type] if o.has_key?(:req_type)
148
+ @cat_id = o[:cat_id] if o.has_key?(:cat_id)
149
+ @name = o[:name] if o.has_key?(:name)
150
+ @cattype = o[:cattype] if o.has_key?(:cattype)
151
151
  @command = o[:command] if o.has_key?(:command)
152
152
  @created_at = o[:created_at] if o.has_key?(:created_at)
153
153
  self
154
154
  end
155
155
 
156
156
 
157
- def self.create(o,tmp_email=nil, tmp_api_key=nil)
157
+ def self.create(params)
158
158
  puts "Entering megam_api-->"
159
- acct = from_hash(o,tmp_email, tmp_api_key)
159
+ acct = from_hash(params, params["email"] || params[:email], params["api_key"] || params[:api_key])
160
160
  acct.create
161
161
  end
162
162
 
@@ -167,8 +167,8 @@ module Megam
167
167
  end
168
168
 
169
169
 
170
- def self.show(tmp_email=nil, tmp_api_key=nil)
171
- prede = self.new(tmp_email, tmp_api_key)
170
+ def self.show(params)
171
+ prede = self.new(params["email"] || params[:email], params["api_key"] || params[:api_key])
172
172
  prede.megam_rest.get_requests
173
173
  end
174
174
 
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.56'
4
+ version: '0.57'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajthilak, Kishorekumar Neelamegam, Thomas Alrin, Yeshwanth Kumar, Subash Sethurajan