megam_api 0.65 → 0.66

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: 396ae54e417f9d73a4acc609ea187aa1d409bec8
4
- data.tar.gz: 4d4d75ef881b83312490e25a3a88cc0d90a9878f
3
+ metadata.gz: e5b945f249259961bea808c3a02e6de6ea9ec9e8
4
+ data.tar.gz: b64b704bb8ad8840111bad0360d215a6dc0294e3
5
5
  SHA512:
6
- metadata.gz: 6b1f5241bf38114873a406284dc149c2d919af4db95374fc32954021ae7d4adac36e6a0bd5aacc4746c174aec696c07b29e1e5aeb0f8941215e33c7af59f5715
7
- data.tar.gz: 6d05626aa9e462f5c0e6ecc2807ebbd5316d8e4f39c0cbe334a1fe103566ff791cf977262cec5cf3b838ca437ea799eec551018482dd9706ac164daabd62b02a
6
+ metadata.gz: 0c61ab1d6fbeed1840991d11465a87af95ca4c3cf4819320d2668e6c633a4a57b1dac909c33c3cb2d6a916fca4823e823f97257d048a9dba73f8d1f754f68304
7
+ data.tar.gz: 42a1759ed0a1f4d6829ce445123df551f6dc733cdd35612c229fd13d827b7f03dc1fb2987dbef6e16dab3d72df17de8613310674326f8f586ef05f3c5cd19e0b
@@ -4,7 +4,7 @@ module Megam
4
4
  def post_catrequest(new_req)
5
5
  @options = {:path => '/catrequests/content',
6
6
  :body => Megam::JSONCompat.to_json(new_req)}.merge(@options)
7
-
7
+
8
8
  request(
9
9
  :expects => 201,
10
10
  :method => :post,
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "0.65"
3
+ VERSION = "0.66"
4
4
  end
5
5
  end
@@ -22,6 +22,7 @@ module Megam
22
22
  @cattype = nil
23
23
  @name = nil
24
24
  @action = nil
25
+ @category = nil
25
26
  @some_msg = {}
26
27
  @created_at = nil
27
28
  super(email, api_key, host)
@@ -74,6 +75,15 @@ module Megam
74
75
  end
75
76
  end
76
77
 
78
+ def category(arg=nil)
79
+ if arg != nil
80
+ @category = arg
81
+ else
82
+ @category
83
+ end
84
+ end
85
+
86
+
77
87
 
78
88
  def created_at(arg=nil)
79
89
  if arg != nil
@@ -104,6 +114,7 @@ module Megam
104
114
  index_hash["cattype"] = cattype
105
115
  index_hash["name"] = name
106
116
  index_hash["action"] = action
117
+ index_hash["category"] = category
107
118
  index_hash["created_at"] = created_at
108
119
  index_hash
109
120
  end
@@ -121,6 +132,7 @@ module Megam
121
132
  "cattype" => cattype,
122
133
  "name" => name,
123
134
  "action" => action,
135
+ "category" => category,
124
136
  "created_at" => created_at
125
137
  }
126
138
  result
@@ -134,6 +146,7 @@ module Megam
134
146
  node.cattype(o["cattype"]) if o.has_key?("cattype")
135
147
  node.name(o["name"]) if o.has_key?("name")
136
148
  node.action(o["action"]) if o.has_key?("action")
149
+ node.action(o["category"]) if o.has_key?("category")
137
150
  node.created_at(o["created_at"]) if o.has_key?("created_at")
138
151
  #success or error
139
152
  node.some_msg[:code] = o["code"] if o.has_key?("code")
@@ -155,7 +168,8 @@ module Megam
155
168
  @cattype = o[:cattype] if o.has_key?(:cattype)
156
169
  @name = o[:name] if o.has_key?(:name)
157
170
  @action = o[:action] if o.has_key?(:action)
158
- @created_at = o[:created_at] if o.has_key?(:created_at)
171
+ @category = o[:category] if o.has_key?(:category)
172
+ @created_at = o[:created_at] if o.has_key?(:created_at)
159
173
  self
160
174
  end
161
175
 
@@ -1,16 +1,18 @@
1
1
  require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
2
2
 
3
3
  class TestApps < MiniTest::Unit::TestCase
4
-
4
+
5
5
  @@tmp_hash = {
6
6
  "cat_id" => "ASM1136003656177549312",
7
- "name" => "HermanWard.megam.co", #APP or Bolt
8
- "action" => "start"
7
+ "name" => "careworn", #APP or Bolt
8
+ "cattype" => "app",
9
+ "action" => "start",
10
+ "category" => "control"
9
11
  }
10
12
 
11
-
12
- def test_request_app_start
13
- response = megams.post_request(@@tmp_hash)
13
+
14
+ def test_request_app_start
15
+ response = megams.post_catrequest(@@tmp_hash)
14
16
  assert_equal(201, response.status)
15
17
  end
16
18
  #=end
data/test/test_helper.rb CHANGED
@@ -69,9 +69,9 @@ def sandbox_name
69
69
  end
70
70
 
71
71
  def sandbox_apikey
72
- "DgBRJLv1v5QCfqqneNCh1w=="
72
+ "AOMtgPx0unVpnbWwwiHAkw=="
73
73
  end
74
74
 
75
75
  def sandbox_email
76
- "morpheyesh@gmail.com"
76
+ "ffr@qwet.com"
77
77
  end
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.65'
4
+ version: '0.66'
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-09-01 00:00:00.000000000 Z
11
+ date: 2015-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon