megam_api 0.53 → 0.54

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: 8ca9e626deed7bb1c3e51603cdf3ba8e942b1fff
4
- data.tar.gz: 23da3d313850bdc4d822a9d372127af1b5d78b50
3
+ metadata.gz: 7435f480f5d49dde14ded28222afe0f7f9984751
4
+ data.tar.gz: d1df8ac5372aa37af59abe346dbbb54aced78364
5
5
  SHA512:
6
- metadata.gz: dd7d9ecb822284bdeb76f9a888eca90968cdb6c97e3b2d2269c9250346a69b516c66a6ff34553f118f1711d6adf688da704d94b6ae2f68708ba3a5272148de25
7
- data.tar.gz: 0009747a1d0b5abef1febe1687d7c7b8dc0f7216c41eb6fffaae0ce9c871b913e7e5778976398cf96cdfa44c5b594cb96631bdd909e76af4c915e9cc6d55b368
6
+ metadata.gz: 9249e35e3bea0541d685fe094f5acdd7aed97204e55855dffc9dad6dd58f7b7692464f9d7e107e5a857f370a91a7eb357f46da20cefd96a52cfbe4fbcffef523
7
+ data.tar.gz: da0b9a8828730fc6cc6190c0c0496870582ec007014f12a2e7deccc10c5e899fbf873f03240e4930c07639e4d0a26e9c37e45a9bf521be578ce73a27219fc158
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "0.53"
3
+ VERSION = "0.54"
4
4
  end
5
5
  end
@@ -29,7 +29,7 @@ module Megam
29
29
  self
30
30
  end
31
31
 
32
-
32
+
33
33
  def id(arg=nil)
34
34
  if arg != nil
35
35
  @id = arg
@@ -45,7 +45,7 @@ module Megam
45
45
  @app_id
46
46
  end
47
47
  end
48
-
48
+
49
49
  def app_name(arg=nil)
50
50
  if arg != nil
51
51
  @app_name = arg
@@ -61,8 +61,8 @@ module Megam
61
61
  @action
62
62
  end
63
63
  end
64
-
65
-
64
+
65
+
66
66
  def created_at(arg=nil)
67
67
  if arg != nil
68
68
  @created_at = arg
@@ -90,7 +90,7 @@ module Megam
90
90
  index_hash["id"] = id
91
91
  index_hash["app_id"] = app_id
92
92
  index_hash["app_name"] = app_name
93
- index_hash["action"] = action
93
+ index_hash["action"] = action
94
94
  index_hash["created_at"] = created_at
95
95
  index_hash
96
96
  end
@@ -106,7 +106,7 @@ module Megam
106
106
  "id" => id,
107
107
  "app_id" => app_id,
108
108
  "app_name" => app_name,
109
- "action" => action,
109
+ "action" => action,
110
110
  "created_at" => created_at
111
111
  }
112
112
  result
@@ -118,7 +118,7 @@ module Megam
118
118
  node.id(o["id"]) if o.has_key?("id")
119
119
  node.app_id(o["app_id"]) if o.has_key?("app_id")
120
120
  node.app_name(o["app_name"]) if o.has_key?("app_name")
121
- node.action(o["action"]) if o.has_key?("action")
121
+ node.action(o["action"]) if o.has_key?("action")
122
122
  node.created_at(o["created_at"]) if o.has_key?("created_at")
123
123
  #success or error
124
124
  node.some_msg[:code] = o["code"] if o.has_key?("code")
@@ -134,30 +134,29 @@ module Megam
134
134
  node
135
135
  end
136
136
 
137
- def from_hash(o)
137
+ def from_hash(o)
138
138
  @id = o[:id] if o.has_key?(:id)
139
139
  @app_id = o[:app_id] if o.has_key?(:app_id)
140
140
  @app_name = o[:app_name] if o.has_key?(:app_name)
141
- @action = o[:action] if o.has_key?(:action)
142
- @created_at = o[:created_at] if o.has_key?(:created_at)
141
+ @action = o[:action] if o.has_key?(:action)
142
+ @created_at = o[:created_at] if o.has_key?(:created_at)
143
143
  self
144
144
  end
145
145
 
146
146
 
147
- def self.create(o,tmp_email=nil, tmp_api_key=nil)
148
- acct = from_hash(o,tmp_email, tmp_api_key)
147
+ def self.create(o)
148
+ acct = from_hash(o, o["email"], o["api_key"])
149
149
  acct.create
150
150
  end
151
151
 
152
152
  # Create the node via the REST API
153
153
  def create
154
154
  megam_rest.post_catrequest(to_hash)
155
- end
155
+ end
156
156
 
157
157
 
158
158
  def to_s
159
159
  Megam::Stuff.styled_hash(to_hash)
160
- #"---> Megam::Account:[error=#{error?}]\n"+
161
160
  end
162
161
 
163
162
  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.53'
4
+ version: '0.54'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajthilak, Kishorekumar Neelamegam, Thomas Alrin, Yeshwanth Kumar, Subash Sethurajan