magti 0.1.0.beta6 → 0.1.0

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.
Files changed (3) hide show
  1. data/README.md +33 -3
  2. data/lib/magti/version.rb +1 -1
  3. metadata +4 -4
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Magti is a gem for sending SMS messages through [Magticom](http://www.magticom.ge/) gateway.
4
4
 
5
- You need access to Magticom's gateway server, also they provide you with user/password parameters.
5
+ You need access to Magticom's server, also they provide you with user/password parameters.
6
6
 
7
7
  ## Installation
8
8
 
@@ -20,8 +20,38 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- TODO: Comming soon
23
+ Start with configuring the gem:
24
+
25
+ ```ruby
26
+ Magti.config({:username => 'testuser', :password => 'secret', :service => 1, :client => 1})
27
+ ```
28
+
29
+ `username`, `password`, `service` and `client` parameters are provided by Magticom itself.
30
+ No additional configuration is required.
31
+
32
+ Now you can send SMS message by calling `send_sms` method:
33
+
34
+ ```ruby
35
+ resp = Magti.send_sms '599XXXXXX', 'test message'
36
+ ```
37
+
38
+ `send_sms` returns response object, which contains operation code (`0000` for successfull transactions)
39
+ and message identification code, which can be used for further tracking of the message:
40
+
41
+
42
+ ```ruby
43
+ puts resp.code # => 0000 for normal processing
44
+ puts resp.id # => nil unless resp.code = '0000'
45
+ ```
46
+
47
+ After message is sent, then you can track it's progress by calling:
48
+
49
+ ```ruby
50
+ status = Magti.track_sms(resp.id)
51
+ ```
52
+
53
+ Status value `1` indicates, that the message was delivered to the mobile phone.
24
54
 
25
55
  ## Additional resources
26
56
 
27
- Protocol description which is used by this gem, can be found in `refs` subdirectory.
57
+ Protocol description which is used by this gem, can be found in `refs` subdirectory.
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Magti
3
- VERSION = "0.1.0.beta6"
3
+ VERSION = "0.1.0"
4
4
  end
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magti
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.beta6
5
- prerelease: 6
4
+ version: 0.1.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Dimitri Kurashvili
@@ -97,9 +97,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
97
  required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  none: false
99
99
  requirements:
100
- - - ! '>'
100
+ - - ! '>='
101
101
  - !ruby/object:Gem::Version
102
- version: 1.3.1
102
+ version: '0'
103
103
  requirements: []
104
104
  rubyforge_project:
105
105
  rubygems_version: 1.8.22