hilink 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hilink.rb +1 -69
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e82d555b6a19e5f6a9f6a4f3d42d5f7ea56052a
4
- data.tar.gz: c8239dd6a032d27bffed109b348814b2a280e64f
3
+ metadata.gz: 4cba55d74717973ed7b5afc525491281eaf43a5a
4
+ data.tar.gz: 1238b03a6e15a8efde8c5971c2f7ce503feed1bd
5
5
  SHA512:
6
- metadata.gz: 47693d4046b27b7a63f599064e8448bf147c567fdadde0b1c84186bc43550b132fd7f374579c1e56de9410a87f03adef4d1ff175da05c43d5460c2a4b3d46435
7
- data.tar.gz: 448d31cb825fb406adc91b0c1c37543de8527d1e1ba5ba4559f8e9ed5f9427a7c5b379773472664ff7cfc69d1f87578a2a7a4dac85e89f35c2b2c0e5f354665d
6
+ metadata.gz: efae533d427e1d05c37a76aa19cfa37039a449bd9cd502fa65592c16b678308e8162c1e70302f4422d35bfca2ae217c5c5c11b4dbac78f81c8d3d2989c6781cd
7
+ data.tar.gz: 61d0a903e2397a8dce0e117c017dfca38b5bc134e5bd6de2e4cc73687f4b6655a8a37d564615b65cbe9a261d4133dd1fa22fbb889cbba33286b50e782d1939aa
data/lib/hilink.rb CHANGED
@@ -151,78 +151,10 @@ module Hilink
151
151
  end
152
152
 
153
153
  def send( str )
154
+ return :error => "Sorry, doesn't work!"
154
155
  send_request( "send", :content => str, :codeType => "CodeType" )
155
156
  end
156
157
  end
157
158
  end
158
159
  end
159
160
 
160
- #puts Hilink::USSD::send( "*100#" )
161
- #exit
162
-
163
- #puts Hilink::switch_to_debug
164
- #exit
165
-
166
- puts Hilink::Modem::switch_to_hilink
167
- exit
168
-
169
- puts Hilink::switch_to_modem
170
- exit
171
-
172
- puts Hilink::Dialup::connect
173
- puts Hilink::Dialup::disconnect
174
- exit
175
-
176
-
177
- #puts Hilink::SMS::send( "93999699", "hello there" )
178
- puts Hilink::SMS::list.inspect
179
- Hilink::SMS::list['Messages']['Message'].each{|m|
180
- puts m.inspect
181
- Hilink::SMS::delete( m['Index'] )
182
- }
183
- exit
184
-
185
- #puts Hilink::send_request( "device/information" )
186
- message = "Hello from Smileplug"
187
- =begin
188
- puts Hilink::send_request( "sms/send-sms",
189
- { :Index => -1,
190
- :Phones => ["93999699"],
191
- :Sca => '',
192
- :Content => message,
193
- :Length => message.length,
194
- :Reserved => 1,
195
- :Date => Time.now.strftime('%Y-%m-%d %H:%M:%S') } )
196
- =end
197
- #puts Hilink::send_request( "monitoring/check-notifications" )
198
- #puts Hilink::send_request( "monitoring/status" )
199
- puts Hilink::send_request( "sms/sms-list",
200
- { :PageIndex => 1,
201
- :ReadCount => 20,
202
- :BoxType => 1,
203
- :SortType => 0,
204
- :Ascending => 0,
205
- :UnreadPreferred => 0 } )
206
- puts Hilink::send_request( "sms/delete-sms", { :Index => 20067 } )
207
-
208
- exit
209
-
210
- a = Document.new
211
- ( a.add_element "Index" ).text = -1
212
- a.write $stdout
213
-
214
- exit
215
-
216
- url = 'http://192.168.1.1/api/monitoring/status'
217
- url = 'http://192.168.1.1/api/device/information'
218
-
219
- # get the XML data as a string
220
- xml_data = Net::HTTP.get_response(URI.parse(url)).body
221
-
222
- puts xml_data.inspect
223
- # extract event information
224
- doc = REXML::Document.new(xml_data)
225
-
226
- XPath.each( doc, "//response/*" ){|a|
227
- puts a.inspect, a.text
228
- }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hilink
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Linus Gasser