deno92 0.1.17 → 0.1.18
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/lib/deno92/client.rb +14 -0
- data/lib/deno92/init.rb +2 -69
- data/lib/deno92/mocean.rb +52 -0
- data/lib/deno92/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 195b4ff93de25e8ec5936916203e31c67989358b
|
4
|
+
data.tar.gz: 3ce8388a0df4f885dae83857e3939d02dec2bc45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3000d8a7d8595e2de35ff81a0d2cbf80de25238791aa1b4d462a522d3d9818b5a839fa2df0e33ca612a67acc1fdb0f71b910f387d1433e9db3395c2bdef1ce0
|
7
|
+
data.tar.gz: 34f8f9eb7008568f3f0d8a848cb07348d1f5c937221df6141a8dbf9d74f172f584078c2c143a7634d72c9df361f0d370caa7a8e245bf414acb3f95663774d5d4
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class Client
|
2
|
+
attr_reader :api_key,:api_secret
|
3
|
+
def initialize api_key = '',api_secret = ''
|
4
|
+
@api_key = api_key
|
5
|
+
@api_secret = api_secret
|
6
|
+
end
|
7
|
+
|
8
|
+
def set_api_key(api_key)
|
9
|
+
@api_key = api_key
|
10
|
+
end
|
11
|
+
def set_api_secret(api_secret)
|
12
|
+
@api_secret = api_secret
|
13
|
+
end
|
14
|
+
end
|
data/lib/deno92/init.rb
CHANGED
@@ -1,71 +1,4 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
1
|
module Deno92
|
4
|
-
|
5
|
-
|
6
|
-
def initialize(api_key = '',api_secret = '')
|
7
|
-
@api_key = api_key
|
8
|
-
@api_secret = api_secret
|
9
|
-
end
|
10
|
-
|
11
|
-
def set_api_key(api_key)
|
12
|
-
@api_key = api_key
|
13
|
-
end
|
14
|
-
def set_api_secret(api_secret)
|
15
|
-
@api_secret = api_secret
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
class Mocean
|
20
|
-
|
21
|
-
attr_reader :obj_auth
|
22
|
-
|
23
|
-
def initialize client = Client
|
24
|
-
if client.class == Client
|
25
|
-
@obj_auth = client
|
26
|
-
elsif client.api_key == nil || client.api_secret == nil
|
27
|
-
raise Exception.new("Api key and api secret can't be empty")
|
28
|
-
else
|
29
|
-
raise Exception.new("Arguement pass into Mocean object must be Client object")
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def sms
|
34
|
-
require_relative "modules/message/sms"
|
35
|
-
return Sms.new(@obj_auth)
|
36
|
-
|
37
|
-
end
|
38
|
-
|
39
|
-
def flashSms
|
40
|
-
require_relative "modules/message/sms"
|
41
|
-
_sms = Sms.new(@obj_auth)
|
42
|
-
_sms.flashSms = true
|
43
|
-
return _sms
|
44
|
-
end
|
45
|
-
|
46
|
-
def pricing_list
|
47
|
-
require_relative "modules/account/pricing"
|
48
|
-
return Pricing.new(@obj_auth)
|
49
|
-
end
|
50
|
-
|
51
|
-
def balance
|
52
|
-
require_relative "modules/account/balance"
|
53
|
-
return Balance.new(@obj_auth)
|
54
|
-
end
|
55
|
-
|
56
|
-
def message_status
|
57
|
-
require_relative "modules/message/message_status"
|
58
|
-
return Message_status.new(@obj_auth)
|
59
|
-
end
|
60
|
-
|
61
|
-
def verify_request
|
62
|
-
require_relative "modules/message/verify_request"
|
63
|
-
return Verify_request.new(@obj_auth)
|
64
|
-
end
|
65
|
-
|
66
|
-
def verify_validate
|
67
|
-
require_relative "modules/message/verify_validate"
|
68
|
-
return Verify_validate.new(@obj_auth)
|
69
|
-
end
|
70
|
-
end
|
2
|
+
require_relative "./mocean"
|
3
|
+
require_relative "./client"
|
71
4
|
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
class Mocean
|
2
|
+
|
3
|
+
attr_reader :obj_auth
|
4
|
+
|
5
|
+
def initialize client = Client
|
6
|
+
if client.class == Client
|
7
|
+
@obj_auth = client
|
8
|
+
elsif client.api_key == nil || client.api_secret == nil
|
9
|
+
raise Exception.new("Api key and api secret can't be empty")
|
10
|
+
else
|
11
|
+
raise Exception.new("Arguement pass into Mocean object must be Client object")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def sms
|
16
|
+
require_relative "modules/message/sms"
|
17
|
+
return Sms.new(@obj_auth)
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
def flashSms
|
22
|
+
require_relative "modules/message/sms"
|
23
|
+
_sms = Sms.new(@obj_auth)
|
24
|
+
_sms.flashSms = true
|
25
|
+
return _sms
|
26
|
+
end
|
27
|
+
|
28
|
+
def pricing_list
|
29
|
+
require_relative "modules/account/pricing"
|
30
|
+
return Pricing.new(@obj_auth)
|
31
|
+
end
|
32
|
+
|
33
|
+
def balance
|
34
|
+
require_relative "modules/account/balance"
|
35
|
+
return Balance.new(@obj_auth)
|
36
|
+
end
|
37
|
+
|
38
|
+
def message_status
|
39
|
+
require_relative "modules/message/message_status"
|
40
|
+
return Message_status.new(@obj_auth)
|
41
|
+
end
|
42
|
+
|
43
|
+
def verify_request
|
44
|
+
require_relative "modules/message/verify_request"
|
45
|
+
return Verify_request.new(@obj_auth)
|
46
|
+
end
|
47
|
+
|
48
|
+
def verify_validate
|
49
|
+
require_relative "modules/message/verify_validate"
|
50
|
+
return Verify_validate.new(@obj_auth)
|
51
|
+
end
|
52
|
+
end
|
data/lib/deno92/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deno92
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- deno
|
@@ -63,7 +63,9 @@ files:
|
|
63
63
|
- README.md
|
64
64
|
- deno92.gemspec
|
65
65
|
- lib/deno92.rb
|
66
|
+
- lib/deno92/client.rb
|
66
67
|
- lib/deno92/init.rb
|
68
|
+
- lib/deno92/mocean.rb
|
67
69
|
- lib/deno92/modules/abstract.rb
|
68
70
|
- lib/deno92/modules/account/balance.rb
|
69
71
|
- lib/deno92/modules/account/pricing.rb
|