blackerz-sdk 0.1.0 → 0.1.01

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ebedb92dab8999bd48a6ba2149da69d5b8501d33afdb89b9cbc7fb915243222
4
- data.tar.gz: f2f9e6eb3f38e3a7000078f70bb03624de50dd1d78c63cfc460c15f250c19720
3
+ metadata.gz: 74b4088b096fc571b60f16d6d83fe06b93678d83dc3e19a4c8fe279301eabc30
4
+ data.tar.gz: 4ea8269c6abb4f9a82eb1522ec7880984c25f6cd61532a0c786704e62573fb2f
5
5
  SHA512:
6
- metadata.gz: 1e9691bbf89f03a9464122f5bc4e45880e7a1ca30c35def5bb50630b7c3f3630203a556a6d1dd2447e6fe82df150c121d46c6b4f0bdd91e7336320759ec14f2c
7
- data.tar.gz: 0fe1f9b81aef314bb9c911214005926f086a73c5ebd691345d26a5ac73a0b881db6edacb524d44178afe21b5bd36ce2c27df914d90e9869ca01ded253bbd45bc
6
+ metadata.gz: d5fe4e01661d920d6df8733233fc770609504781fea540a4183eec4eb4a07ce627b3d16a764f20f685f23f9b3d6f504d1a45b3e5e67e2db9baef385745d14cae
7
+ data.tar.gz: bedf562f901a9a0d809453114cd6858361f38f0afe29172a3cc9b436343e153b80e504aad9326ec9f3b04299ed9f58df0d51cdeb67960d3d5eecea2e9ee784c6
data/Gemfile CHANGED
@@ -6,3 +6,4 @@ source "https://rubygems.org"
6
6
  gemspec
7
7
 
8
8
  gem "rake", "~> 13.0"
9
+ gem 'solargraph', group: :development
data/Gemfile.lock CHANGED
@@ -1,12 +1,88 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- blackerz-sdk (0.1.0)
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
- 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/blackerz/sdk`. 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
-
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
- TODO: Write usage instructions here
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/[USERNAME]/blackerz-sdk.
33
+ Bug reports and pull requests are welcome on GitHub at https://github.com/Fastering18/Blackerz-API-Ruby.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Blackerz
4
4
  module Sdk
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.01"
6
6
  end
7
7
  end
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
- def self.bot_data(bot_id)
14
- res = HTTP.get("https://blackerz.herokuapp.com/api/v1/bots/" + bot_id)
15
- unless res.code == 200 then
16
- nil
17
- end
18
- data = res.parse
19
- data
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
- end
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.0
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-08-07 00:00:00.000000000 Z
11
+ date: 2021-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http