totalvoice-ruby 1.1.0 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb430a4c23faa3ce992247cd2e96407ed7ce7394
4
- data.tar.gz: a385d816de586f9e95e1e5b3c3ff8bb2425b8360
3
+ metadata.gz: 49533352685d1797a97334c03349cea3923c087f
4
+ data.tar.gz: 4a616f1a9b76ab92e20b28ee9c627235edf86814
5
5
  SHA512:
6
- metadata.gz: f793f80f4ed82df6f250b707df641a64cd3031e9c9cb249bbb2ff559a91bcbc896cbafe80f189f40cf3240393602882c79c1e991cfd42856c10b5a0da2414f9f
7
- data.tar.gz: ce116078ee3753db33ce47ca2af62d603ab0a4ad5780077f0cdc3f4715f04d8bf1b6888e3ac88cdb29688dd6f6cecd1d67def23e4d72626d417f96ba2a1e682e
6
+ metadata.gz: 2f40c1753bf5a2b076e695d147c806373c7329fb67f40f5e7f0d4922744522a25cd434ca2869a7e40c26afcd241477c4a0435e425660dba54830d263762d1db7
7
+ data.tar.gz: 84c9806a6d04c466ad06f0b3efd592c2c8f71f0de4600fa7a3333decc68e91806e0f90b9d0fc30f9e76e85fcf332534b09c53fddc6dec56aef3ef9d059a61dd0
data/.gitignore ADDED
@@ -0,0 +1,53 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ .idea/
14
+
15
+ # Used by dotenv library to load environment variables.
16
+ # .env
17
+
18
+ ## Specific to RubyMotion:
19
+ .dat*
20
+ .repl_history
21
+ build/
22
+ *.bridgesupport
23
+ build-iPhoneOS/
24
+ build-iPhoneSimulator/
25
+
26
+ ## Specific to RubyMotion (use of CocoaPods):
27
+ #
28
+ # We recommend against adding the Pods directory to your .gitignore. However
29
+ # you should judge for yourself, the pros and cons are mentioned at:
30
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
31
+ #
32
+ # vendor/Pods/
33
+
34
+ ## Documentation cache and generated files:
35
+ /.yardoc/
36
+ /_yardoc/
37
+ /doc/
38
+ /rdoc/
39
+
40
+ ## Environment normalization:
41
+ /.bundle/
42
+ /vendor/bundle
43
+ /lib/bundler/man/
44
+
45
+ # for a library or gem, you might want to ignore these files since the code is
46
+ # intended to run in multiple environments; otherwise, check them in:
47
+ Gemfile.lock
48
+ # .ruby-version
49
+ # .ruby-gemset
50
+
51
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
52
+ .rvmrc
53
+ index.rb
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'httparty'
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 TotalVoice
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,166 @@
1
+ # totalvoice-ruby
2
+ Client em Ruby para a API da TotalVoice
3
+
4
+ > ### Funcionalidades
5
+
6
+ - [X] Gerenciamento das chamadas
7
+ - [X] Consulta e envio de SMS
8
+ - [X] Consulta e envio de TTS
9
+ - [X] Consulta e envio de Audio
10
+ - [X] Gerenciamento da Conta
11
+ - [X] Gerenciamento de Ramais
12
+ - [X] URL do Webphone
13
+ - [X] Gerenciamento de DID
14
+
15
+ > ### Requisitos
16
+
17
+ - Ruby: 2.4.3
18
+ - Gem: 2.6.14
19
+
20
+ > ### Instalação
21
+
22
+ ```bash
23
+ gem 'totalvoice-ruby'
24
+ ```
25
+
26
+ ```bash
27
+ gem install totalvoice-ruby
28
+ ```
29
+
30
+ > ### Utilização
31
+
32
+ Para utilizar esta biblioteca, primeiramente você deverá realizar um cadastro no site da [Total Voice](http://www.totalvoice.com.br). Após a criação do cadastro será disponibilizado um AccessToken para acesso a API.
33
+
34
+ Com o AccessToken em mãos será possível realizar as consultas/cadastros conforme documentação da [API](https://api.totalvoice.com.br/doc/#/)
35
+
36
+ A seguir exemplos de como utilizar esta biblioteca.
37
+
38
+ > ##### Realiza uma chamada telefônica entre dois números: A e B
39
+
40
+ ```ruby
41
+ require 'totalvoice-ruby'
42
+ include TotalVoice
43
+
44
+ @client = TotalVoice::API.new("{{access-token}}")
45
+ puts @client.chamada.ligar("NUMERO-A", "NUMERO-B")
46
+ ```
47
+
48
+ > ##### Consulta os dados da chamada pelo ID
49
+
50
+ ```ruby
51
+ require 'totalvoice-ruby'
52
+ include TotalVoice
53
+
54
+ @client = TotalVoice::API.new("{{access-token}}")
55
+ puts @client.chamada.buscar(123456)
56
+ ```
57
+
58
+ > ##### Encerra uma chamada ativa
59
+
60
+ ```ruby
61
+ require 'totalvoice-ruby'
62
+ include TotalVoice
63
+
64
+ @client = TotalVoice::API.new("{{access-token}}")
65
+ puts @client.chamada.encerrar(123456)
66
+ ```
67
+
68
+ > ##### Envio de SMS
69
+
70
+ ```ruby
71
+ require 'totalvoice-ruby'
72
+ include TotalVoice
73
+
74
+ @client = TotalVoice::API.new("{{access-token}}")
75
+ puts @client.sms.enviar("NUMERO-DESTINO", "MENSAGEM")
76
+ ```
77
+
78
+ > ##### Envio de TTS
79
+
80
+ ```ruby
81
+ require 'totalvoice-ruby'
82
+ include TotalVoice
83
+
84
+ @client = TotalVoice::API.new("{{access-token}}")
85
+ puts @client.tts.enviar("NUMERO-DESTINO", "MENSAGEM")
86
+ ```
87
+
88
+ > ##### Envio de Audio
89
+
90
+ ```ruby
91
+ require 'totalvoice-ruby'
92
+ include TotalVoice
93
+
94
+ @client = TotalVoice::API.new("{{access-token}}")
95
+ puts @client.audio.enviar("NUMERO-DESTINO", "URL-AUDIO")
96
+ ```
97
+
98
+ > ##### Configurações de central telefonica - consultando ramal
99
+
100
+ ```ruby
101
+ require 'totalvoice-ruby'
102
+ include TotalVoice
103
+
104
+ @client = TotalVoice::API.new("{{access-token}}")
105
+ puts @client.ramal.buscar(123)
106
+ ```
107
+
108
+ > ##### Buscar os dados da Conta
109
+
110
+ ```ruby
111
+ require 'totalvoice-ruby'
112
+ include TotalVoice
113
+
114
+ @client = TotalVoice::API.new("{{access-token}}")
115
+ puts @client.conta.buscar(123)
116
+ ```
117
+
118
+ > ##### Consulta saldo da Minha Conta
119
+
120
+ ```ruby
121
+ require 'totalvoice-ruby'
122
+ include TotalVoice
123
+
124
+ @client = TotalVoice::API.new("{{access-token}}")
125
+ puts @client.perfil.consulta_saldo()
126
+ ```
127
+
128
+ > ##### Caso você necessite utilizar seu próprio endereço configurado na Total Voice
129
+
130
+ ```ruby
131
+ require 'totalvoice-ruby'
132
+ include TotalVoice
133
+
134
+ @client = TotalVoice::API.new("{{access-token}}", "https://meuhost.com.br")
135
+ puts @client.perfil.consulta_saldo()
136
+ ```
137
+
138
+ > ##### Adquirindo um did
139
+
140
+ ```ruby
141
+ require 'totalvoice-ruby'
142
+ include TotalVoice
143
+
144
+ @client = TotalVoice::API.new("{{access-token}}")
145
+ puts @client.did.adquirir()
146
+ ```
147
+
148
+ > ##### Listando seus DIDs
149
+
150
+ ```ruby
151
+ require 'totalvoice-ruby'
152
+ include TotalVoice
153
+
154
+ @client = TotalVoice::API.new("{{access-token}}")
155
+ puts @client.did.listar()
156
+ ```
157
+
158
+ > ### To-Do
159
+
160
+ - Tests
161
+
162
+ Mais informações sobre os métodos disponíveis podem ser encontrados na documentação da [API](https://api.totalvoice.com.br/doc/#/)
163
+
164
+ > ### Licença
165
+
166
+ Esta biblioteca segue os termos de uso da [MIT](https://github.com/totalvoice/totalvoice-ruby/blob/master/LICENSE)
@@ -1,3 +1,3 @@
1
1
  module TotalVoice
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
@@ -0,0 +1 @@
1
+ require_relative 'client'
@@ -0,0 +1,21 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'totalvoice/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'totalvoice-ruby'
8
+ spec.version = TotalVoice::VERSION
9
+ spec.authors = ['DiloWagner']
10
+ spec.email = 'diego@totalvoice.com.br'
11
+ spec.summary = 'Official TotalVoice Gem'
12
+ spec.description = 'Client Official API TotalVoice'
13
+ spec.homepage = 'http://github.com/totalvoice/totalvoice-ruby'
14
+
15
+ spec.required_ruby_version = '>= 2.4'
16
+
17
+ spec.license = 'MIT'
18
+ spec.files = `git ls-files -z`.split("\x0")
19
+ spec.require_paths = ['lib']
20
+ spec.add_dependency 'httparty', '0.16.2'
21
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: totalvoice-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - DiloWagner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-28 00:00:00.000000000 Z
11
+ date: 2018-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -25,11 +25,15 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.16.2
27
27
  description: Client Official API TotalVoice
28
- email: dx@sendgrid.com
28
+ email: diego@totalvoice.com.br
29
29
  executables: []
30
30
  extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
+ - ".gitignore"
34
+ - Gemfile
35
+ - LICENSE
36
+ - README.md
33
37
  - lib/api/audio.rb
34
38
  - lib/api/chamada.rb
35
39
  - lib/api/composto.rb
@@ -45,7 +49,9 @@ files:
45
49
  - lib/client.rb
46
50
  - lib/query.rb
47
51
  - lib/route.rb
48
- - lib/totalvoice.rb
52
+ - lib/totalvoice-ruby.rb
53
+ - lib/totalvoice/version.rb
54
+ - totalvoice-ruby.gemspec
49
55
  homepage: http://github.com/totalvoice/totalvoice-ruby
50
56
  licenses:
51
57
  - MIT