Module: Telein
- Extended by:
- Telein
- Included in:
- Telein
- Defined in:
- lib/telein.rb,
lib/telein/client.rb,
lib/telein/server.rb,
lib/telein/version.rb,
lib/telein/util/phone.rb,
lib/telein/carrier_codes.rb
Overview
Namespace for classes and modules that handle the Telein API
Defined Under Namespace
Modules: Util Classes: Client, Server
Constant Summary collapse
- VERSION =
Telein version
"0.2.1"
- CARRIER_CODES =
TODO:
Maybe provide in en-US format
The mapping of carrier codes and meanings , in pt-BR
{ 12 => 'CTBC', 14 => 'Brasil Telecom', 20 => 'Vivo', 21 => 'Claro', 23 => 'Telemig', 24 => 'Amazonia', 31 => 'Oi', 37 => 'Unicel', 41 => 'TIM', 43 => 'Sercomercio', 77 => 'Nextel Rádio', 78 => 'Nextel', 81 => 'Datora', 82 => 'Porto', 98 => 'Fixo', 99 => 'Número não encontrado', 100 => 'Número inválido', 101 => 'Erro no servidor', 990 => 'IP blacklisted', 991 => 'Limite excedido', 992 => 'IP sem acesso', 994 => 'Chave bloqueada', 995 => 'IP excedeu 6 consultas/hora nas últimas 24 horas', 999 => 'Chave inválida' }
Instance Attribute Summary collapse
-
#api_key ⇒ String
Gets/sets api key to access Telein API.
Instance Method Summary collapse
-
#register_server(server) ⇒ Array<Telein::Server>
Syntax sugar for the Array#<< method.
-
#servers ⇒ Array<Telein::Server>
An array of servers available to be requested by the client.
Instance Attribute Details
#api_key ⇒ String
Gets/sets api key to access Telein API
7 8 9 |
# File 'lib/telein.rb', line 7 def api_key @api_key end |
Instance Method Details
#register_server(server) ⇒ Array<Telein::Server>
Syntax sugar for the Array#<< method.
22 23 24 |
# File 'lib/telein.rb', line 22 def register_server(server) self.servers << server end |
#servers ⇒ Array<Telein::Server>
An array of servers available to be requested by the client. The client will use the response of the first one that responds the request.
15 16 17 |
# File 'lib/telein.rb', line 15 def servers @servers ||= [] end |