dblista 0.5.0 → 0.6.4
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.lock +2 -1
- data/README.md +3 -3
- data/lib/dblista.rb +1 -1
- data/lib/dblista/list/bot.rb +1 -1
- data/lib/dblista/list/server.rb +1 -1
- data/lib/dblista/user/actions.rb +10 -0
- data/lib/dblista/user/client.rb +1 -1
- data/lib/dblista/user/info.rb +3 -2
- data/lib/dblista/user/rating.rb +4 -0
- data/lib/dblista/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b662a5b156e72ac37ec051e1bffb77587db382a8ded509544cd0fd67b56242b0
|
4
|
+
data.tar.gz: 1622b294e66a1977e63b7f60b758643b961907d895ec2884781ab3780a8b9076
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26852865ee9ac0534f350da349872f5ab6f97329017b0c34eec7779e7aa5a87242829dfba29cb14aff6240f1d779c3051eba962792372f52141c52c99a51dcaa
|
7
|
+
data.tar.gz: 02cdea3a50877b4f53c112648a40df8b35db33e4a6c5263d7fd9a9bf70b10fdcd8f897caf92c8f170385fe5bc79b485585c6ad3ed89286daeaf2dcfef9743314
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
# DBLista Ruby wrapper [](https://badge.fury.io/rb/dblista)
|
1
|
+
# DList (kiedyś DBLista) Ruby wrapper [](https://badge.fury.io/rb/dblista)
|
2
2
|
|
3
3
|
[Dokumentacja](https://www.rubydoc.info/github/marek12306/dblista-wrapper-ruby)
|
4
4
|
|
5
|
-
Gem pozwalający na komunikację z API
|
5
|
+
Gem pozwalający na komunikację z API DList.
|
6
6
|
|
7
7
|
Pozwala na:
|
8
8
|
|
9
9
|
- Automatyczne/ręczne wysyłanie statystyk
|
10
10
|
- Kontrolowanie kontem użytkownika
|
11
|
-
- Pobieranie różnych list botów
|
11
|
+
- Pobieranie różnych list botów, serwerów oraz ich wyszukiwanie
|
12
12
|
- Pobieranie informacji o botach, serwerach oraz użytkownikach
|
13
13
|
|
14
14
|
## Instalacja
|
data/lib/dblista.rb
CHANGED
data/lib/dblista/list/bot.rb
CHANGED
data/lib/dblista/list/server.rb
CHANGED
data/lib/dblista/user/actions.rb
CHANGED
@@ -58,6 +58,7 @@ module DBLista::User
|
|
58
58
|
}, @token)
|
59
59
|
true
|
60
60
|
end
|
61
|
+
|
61
62
|
# Generates token for bot
|
62
63
|
#
|
63
64
|
# @param id [Integer] bot ID
|
@@ -66,5 +67,14 @@ module DBLista::User
|
|
66
67
|
DBLista._validate_id id
|
67
68
|
DBLista._get("/bots/stats/#{id}?token=#{@token}")
|
68
69
|
end
|
70
|
+
|
71
|
+
# Resets token for bot
|
72
|
+
#
|
73
|
+
# @param id [Integer] bot ID
|
74
|
+
# @return [Hash] raw data from DBLista
|
75
|
+
def reset_token(id)
|
76
|
+
DBLista._validate_id id
|
77
|
+
DBLista._post("/bots/stats/#{id}/reset", nil, @token)
|
78
|
+
end
|
69
79
|
end
|
70
80
|
end
|
data/lib/dblista/user/client.rb
CHANGED
data/lib/dblista/user/info.rb
CHANGED
@@ -7,13 +7,14 @@ module DBLista::User
|
|
7
7
|
#
|
8
8
|
# @return [Hash] raw data from DBLista
|
9
9
|
def servers
|
10
|
-
DBLista._get(
|
10
|
+
DBLista._get('/servers/user/me', @token)
|
11
11
|
end
|
12
|
+
|
12
13
|
# Fetches your bots
|
13
14
|
#
|
14
15
|
# @return [Hash] raw data from DBLista
|
15
16
|
def bots
|
16
|
-
DBLista._get(
|
17
|
+
DBLista._get('/bots/user/me', @token)
|
17
18
|
end
|
18
19
|
end
|
19
20
|
end
|
data/lib/dblista/user/rating.rb
CHANGED
@@ -20,6 +20,7 @@ module DBLista::User
|
|
20
20
|
}, @token)
|
21
21
|
true
|
22
22
|
end
|
23
|
+
|
23
24
|
# Removes rate for a selected bot/server
|
24
25
|
#
|
25
26
|
# @param id [Integer] entity ID
|
@@ -33,6 +34,7 @@ module DBLista::User
|
|
33
34
|
DBLista._delete("/#{type}s/#{id}/rate/#{target_id}", nil, @token)
|
34
35
|
true
|
35
36
|
end
|
37
|
+
|
36
38
|
# Reports rate of a selected bot/server
|
37
39
|
#
|
38
40
|
# @param id [Integer] ID
|
@@ -49,12 +51,14 @@ module DBLista::User
|
|
49
51
|
}, @token)
|
50
52
|
true
|
51
53
|
end
|
54
|
+
|
52
55
|
# Fetches all rate reports
|
53
56
|
#
|
54
57
|
# @return [Hash] raw data from DBLista
|
55
58
|
def reports
|
56
59
|
DBLista._get('/reports')
|
57
60
|
end
|
61
|
+
|
58
62
|
# Deletes rate report
|
59
63
|
#
|
60
64
|
# @param id [Integer] report ID
|
data/lib/dblista/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dblista
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- deepivin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zache
|
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
|
-
rubygems_version: 3.
|
127
|
+
rubygems_version: 3.1.2
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: Wrapper for dblista.pl API
|