dblruby 0.1.0 → 0.2.0
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/dblruby/stats.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63fce355427db5e0ccc5261f36ace592372f7562
|
4
|
+
data.tar.gz: 4bfd62fa6caa062ec8df81d955fbdbe085db0404
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d73ffedc5fec86dbacf51449904ad02470d3d4950a8b36bf49f249db6900022c4c04b084d4d0f21b0aa0720c256a80b918144b9cae35b3f232a421a82cabea45
|
7
|
+
data.tar.gz: fa724a53740a95390fa632fb6fd0807dc38e6200d8d67dfa245b5cc2ee3c836ebd52e69045d0462cbca016db1d97e89614c1a40e2b21e58dc0c89767169dc120
|
data/lib/dblruby/stats.rb
CHANGED
@@ -12,4 +12,11 @@ class DBLRuby::Stats
|
|
12
12
|
url = "https://discordbots.org/api/bots/#{@id}"
|
13
13
|
JSON.parse(RestClient.get(url))['server_count'].to_i
|
14
14
|
end
|
15
|
+
|
16
|
+
def updateservercount(count)
|
17
|
+
url = "https://discordbots.org/api/bots/#{@id}/stats"
|
18
|
+
json = '{"server_count":' + count.to_s + '}'
|
19
|
+
RestClient.post(url, json, :Authorization => @api, :'Content-Type' => :json)
|
20
|
+
"Successfully set the server count to #{count}"
|
21
|
+
end
|
15
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dblruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chewsterchew
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|