blackerz-sdk 0.1.0 → 0.1.01
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/Gemfile +1 -0
- data/Gemfile.lock +78 -1
- data/README.md +6 -8
- data/lib/blackerz/sdk/version.rb +1 -1
- data/lib/blackerz/sdk.rb +22 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74b4088b096fc571b60f16d6d83fe06b93678d83dc3e19a4c8fe279301eabc30
|
4
|
+
data.tar.gz: 4ea8269c6abb4f9a82eb1522ec7880984c25f6cd61532a0c786704e62573fb2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5fe4e01661d920d6df8733233fc770609504781fea540a4183eec4eb4a07ce627b3d16a764f20f685f23f9b3d6f504d1a45b3e5e67e2db9baef385745d14cae
|
7
|
+
data.tar.gz: bedf562f901a9a0d809453114cd6858361f38f0afe29172a3cc9b436343e153b80e504aad9326ec9f3b04299ed9f58df0d51cdeb67960d3d5eecea2e9ee784c6
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,12 +1,88 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
blackerz-sdk (0.1.
|
4
|
+
blackerz-sdk (0.1.01)
|
5
|
+
http
|
5
6
|
|
6
7
|
GEM
|
7
8
|
remote: https://rubygems.org/
|
8
9
|
specs:
|
10
|
+
addressable (2.8.0)
|
11
|
+
public_suffix (>= 2.0.2, < 5.0)
|
12
|
+
ast (2.4.2)
|
13
|
+
backport (1.2.0)
|
14
|
+
benchmark (0.2.0)
|
15
|
+
diff-lcs (1.4.4)
|
16
|
+
domain_name (0.5.20190701)
|
17
|
+
unf (>= 0.0.5, < 1.0.0)
|
18
|
+
e2mmap (0.1.0)
|
19
|
+
ffi (1.15.4-x64-mingw32)
|
20
|
+
ffi-compiler (1.0.1)
|
21
|
+
ffi (>= 1.0.0)
|
22
|
+
rake
|
23
|
+
http (5.0.4)
|
24
|
+
addressable (~> 2.8)
|
25
|
+
http-cookie (~> 1.0)
|
26
|
+
http-form_data (~> 2.2)
|
27
|
+
llhttp-ffi (~> 0.4.0)
|
28
|
+
http-cookie (1.0.4)
|
29
|
+
domain_name (~> 0.5)
|
30
|
+
http-form_data (2.3.0)
|
31
|
+
jaro_winkler (1.5.4)
|
32
|
+
kramdown (2.3.1)
|
33
|
+
rexml
|
34
|
+
kramdown-parser-gfm (1.1.0)
|
35
|
+
kramdown (~> 2.0)
|
36
|
+
llhttp-ffi (0.4.0)
|
37
|
+
ffi-compiler (~> 1.0)
|
38
|
+
rake (~> 13.0)
|
39
|
+
nokogiri (1.12.2-x64-mingw32)
|
40
|
+
racc (~> 1.4)
|
41
|
+
parallel (1.20.1)
|
42
|
+
parser (3.0.2.0)
|
43
|
+
ast (~> 2.4.1)
|
44
|
+
public_suffix (4.0.6)
|
45
|
+
racc (1.5.1)
|
46
|
+
rainbow (3.0.0)
|
9
47
|
rake (13.0.3)
|
48
|
+
regexp_parser (2.1.1)
|
49
|
+
reverse_markdown (2.0.0)
|
50
|
+
nokogiri
|
51
|
+
rexml (3.2.5)
|
52
|
+
rubocop (1.18.4)
|
53
|
+
parallel (~> 1.10)
|
54
|
+
parser (>= 3.0.0.0)
|
55
|
+
rainbow (>= 2.2.2, < 4.0)
|
56
|
+
regexp_parser (>= 1.8, < 3.0)
|
57
|
+
rexml
|
58
|
+
rubocop-ast (>= 1.8.0, < 2.0)
|
59
|
+
ruby-progressbar (~> 1.7)
|
60
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
61
|
+
rubocop-ast (1.9.0)
|
62
|
+
parser (>= 3.0.1.1)
|
63
|
+
ruby-progressbar (1.11.0)
|
64
|
+
solargraph (0.44.2)
|
65
|
+
backport (~> 1.2)
|
66
|
+
benchmark
|
67
|
+
bundler (>= 1.17.2)
|
68
|
+
diff-lcs (~> 1.4)
|
69
|
+
e2mmap
|
70
|
+
jaro_winkler (~> 1.5)
|
71
|
+
kramdown (~> 2.3)
|
72
|
+
kramdown-parser-gfm (~> 1.1)
|
73
|
+
parser (~> 3.0)
|
74
|
+
reverse_markdown (>= 1.0.5, < 3)
|
75
|
+
rubocop (>= 0.52)
|
76
|
+
thor (~> 1.0)
|
77
|
+
tilt (~> 2.0)
|
78
|
+
yard (~> 0.9, >= 0.9.24)
|
79
|
+
thor (1.1.0)
|
80
|
+
tilt (2.0.10)
|
81
|
+
unf (0.1.4)
|
82
|
+
unf_ext
|
83
|
+
unf_ext (0.0.8-x64-mingw32)
|
84
|
+
unicode-display_width (2.0.0)
|
85
|
+
yard (0.9.26)
|
10
86
|
|
11
87
|
PLATFORMS
|
12
88
|
x64-mingw32
|
@@ -14,6 +90,7 @@ PLATFORMS
|
|
14
90
|
DEPENDENCIES
|
15
91
|
blackerz-sdk!
|
16
92
|
rake (~> 13.0)
|
93
|
+
solargraph
|
17
94
|
|
18
95
|
BUNDLED WITH
|
19
96
|
2.2.22
|
data/README.md
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
# Blackerz::Sdk
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
|
-
|
3
|
+
Ruby SDK to interact with blackerz bot list
|
7
4
|
## Installation
|
8
5
|
|
9
6
|
Add this line to your application's Gemfile:
|
@@ -22,14 +19,15 @@ Or install it yourself as:
|
|
22
19
|
|
23
20
|
## Usage
|
24
21
|
|
25
|
-
|
22
|
+
```rb
|
23
|
+
data = Blackerz::Bots.bot_data("867571104784318464") # bot client id
|
24
|
+
p data
|
25
|
+
```
|
26
26
|
|
27
27
|
## Development
|
28
28
|
|
29
|
-
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.
|
30
29
|
|
31
|
-
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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
30
|
|
33
31
|
## Contributing
|
34
32
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
33
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Fastering18/Blackerz-API-Ruby.
|
data/lib/blackerz/sdk/version.rb
CHANGED
data/lib/blackerz/sdk.rb
CHANGED
@@ -4,19 +4,28 @@ require "http"
|
|
4
4
|
require_relative "sdk/version"
|
5
5
|
|
6
6
|
module Blackerz
|
7
|
-
#module Sdk
|
8
|
-
# class Error < StandardError; end
|
9
|
-
# Your code goes here...
|
10
|
-
#end
|
11
|
-
|
12
7
|
class Bots
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
8
|
+
attr_accessor :BotID, :AuthV1
|
9
|
+
|
10
|
+
# class static method, Bots.bot_data() -> hash
|
11
|
+
def self.bot_data(bot_id: String)
|
12
|
+
res = HTTP.get("https://blackerz.herokuapp.com/api/v1/bots/" + bot_id)
|
13
|
+
unless res.code == 200
|
14
|
+
nil
|
15
|
+
end
|
16
|
+
data = res.parse
|
17
|
+
data
|
18
|
+
end
|
19
|
+
|
20
|
+
def initialize(botID, authv1)
|
21
|
+
self.BotID = botID
|
22
|
+
self.AuthV1 = authv1
|
23
|
+
end
|
24
|
+
def data()
|
25
|
+
Bots.bot_data(self.BotID)
|
26
|
+
end
|
20
27
|
end
|
21
28
|
end
|
22
|
-
|
29
|
+
|
30
|
+
#bot = Blackerz::Bots.bot_data("867571104784318464")
|
31
|
+
#p bot
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blackerz-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.01
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fastering
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|