pjit-sms_api 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/README.md +1 -12
- data/lib/sms_api.rb +17 -16
- data/lib/sms_api/version.rb +1 -1
- metadata +1 -2
- data/CODE_OF_CONDUCT.md +0 -74
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 417b6d995e583960e8381f9ee96aab603a324873
|
4
|
+
data.tar.gz: b840d77cfd3873875310e15aa4ffe798df50747a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41cfc72e886185d4426707e85974a15abae9e89ec71e8767cf42baaae3fbc42331529c5129b5d5b5b259643f66d774d149d857baf2ddd4e7c8edefff5fe72848
|
7
|
+
data.tar.gz: 0b1623b4d9b53be09b5b175519eb5ce60409e95dbc64cc4d4bf543ec4626b890e9691dd831a8e6fce9772cf957481fd7ee5b475d5e609cf957f8318a8c9781d6
|
data/README.md
CHANGED
@@ -1,9 +1,5 @@
|
|
1
1
|
# SmsApi
|
2
2
|
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/sms_api`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
|
-
|
7
3
|
## Installation
|
8
4
|
|
9
5
|
Add this line to your application's Gemfile:
|
@@ -37,16 +33,9 @@ In case you need specified value you can use as follows:
|
|
37
33
|
* SmsApi.status['ecoCount'] - for default messages count
|
38
34
|
* SmsApi.status['mmsCount'] - for MMS count
|
39
35
|
|
40
|
-
## Development
|
41
|
-
|
42
|
-
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
43
|
-
|
44
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
45
|
-
|
46
36
|
## Contributing
|
47
37
|
|
48
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
49
|
-
|
38
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/JaroszPiotr/sms_api.
|
50
39
|
|
51
40
|
## License
|
52
41
|
|
data/lib/sms_api.rb
CHANGED
@@ -8,28 +8,29 @@ module SmsApi
|
|
8
8
|
format: 'json'#, test: test
|
9
9
|
format :json
|
10
10
|
|
11
|
+
##
|
12
|
+
# Method to send ECO messages
|
13
|
+
# usage: SmsApi.send('MSISDN','message')
|
14
|
+
# Some details about response
|
15
|
+
# In response you will recive ['count'] of sended messages,
|
16
|
+
# ['list'] of messages, on list you have some extra data:
|
17
|
+
# "id" - message id, You can use it to grab message status,
|
18
|
+
# "points" - cost of operation, "error" - error code if will ocure
|
19
|
+
|
11
20
|
def self.send to, text
|
12
|
-
##
|
13
|
-
# Method to send ECO messages
|
14
|
-
# usage: SmsApi.send('MSISDN','message')
|
15
|
-
# Some details about response
|
16
|
-
# In response you will recive ['count'] of sended messages,
|
17
|
-
# ['list'] of messages, on list you have some extra data:
|
18
|
-
# "id" - message id, You can use it to grab message status,
|
19
|
-
# "points" - cost of operation, "error" - error code if will ocure
|
20
21
|
test = ENV['SMSAPI_TEST'] || 0
|
21
22
|
get('/sms.do', query: { to: to, test: test, message: text})
|
22
23
|
end
|
23
24
|
|
25
|
+
##
|
26
|
+
# Method will give count avaliable count/messages on account
|
27
|
+
# In case you need specified value you can use as follows:
|
28
|
+
# SmsApi.status['points'] - for points count
|
29
|
+
# SmsApi.status['proCount'] - for pro messages count
|
30
|
+
# SmsApi.status['ecoCount'] - for default messages count
|
31
|
+
# SmsApi.status['mmsCount'] - for MMS count
|
32
|
+
|
24
33
|
def self.status
|
25
|
-
##
|
26
|
-
# Method will give count avaliable count/messages on account
|
27
|
-
# In case you need specified value you can use as follows:
|
28
|
-
# SmsApi.status['points'] - for points count
|
29
|
-
# SmsApi.status['proCount'] - for pro messages count
|
30
|
-
# SmsApi.status['ecoCount'] - for default messages count
|
31
|
-
# SmsApi.status['mmsCount'] - for MMS count
|
32
|
-
|
33
34
|
get('/user.do', query: { credits: 1, details: 1})
|
34
35
|
end
|
35
36
|
|
data/lib/sms_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pjit-sms_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Jarosz
|
@@ -60,7 +60,6 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
|
-
- CODE_OF_CONDUCT.md
|
64
63
|
- Gemfile
|
65
64
|
- LICENSE.txt
|
66
65
|
- README.md
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at piotr[at]jarosz.it. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|