dblista 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/dblista/user/actions.rb +1 -1
- data/lib/dblista/user/boosting.rb +1 -2
- data/lib/dblista/user/client.rb +10 -1
- data/lib/dblista/user/notifications.rb +20 -0
- data/lib/dblista/user/rating.rb +1 -1
- data/lib/dblista/user/voting.rb +1 -1
- data/lib/dblista/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f20cf6b8c70ff3aaffe688fd51db2370f13e6407a40ad6e6c0c926c129df9ee4
|
4
|
+
data.tar.gz: ccc4a69f0712815b3afdf5cf417ffcd1c3aa5983ce83cc9b2471e0441b3b6b7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19af727c3ab021766d7bbf3115756544b6ce7ecf90958d28c3c03fc49a2f6dc323e063e0864916a6431a6fda98f47bb6edad3d49bc48a6de15a7f897ce87cd2d
|
7
|
+
data.tar.gz: 5112159c5a572e66e11dba712ae35c9b4f35f86ac588577902dc74f6de66e2aa55ed25840e6b5e00f5f8ee2c71573a080fddc9bb635e2c3f68c7acbff334a0f7
|
data/Gemfile.lock
CHANGED
data/lib/dblista/user/actions.rb
CHANGED
data/lib/dblista/user/client.rb
CHANGED
@@ -4,6 +4,7 @@ require_relative './actions'
|
|
4
4
|
require_relative './boosting'
|
5
5
|
require_relative './rating'
|
6
6
|
require_relative './voting'
|
7
|
+
require_relative './notifications'
|
7
8
|
|
8
9
|
# User module - client + client modules
|
9
10
|
module DBLista::User
|
@@ -21,6 +22,7 @@ module DBLista::User
|
|
21
22
|
include DBLista::User::Actions
|
22
23
|
include DBLista::User::Boosting
|
23
24
|
include DBLista::User::Rating
|
25
|
+
include DBLista::User::Notifications
|
24
26
|
|
25
27
|
# Allowed entity types to use
|
26
28
|
ALLOWED_TYPES = %i[bot server].freeze
|
@@ -35,11 +37,18 @@ module DBLista::User
|
|
35
37
|
raise DBLista::Error, DBLista::Errors::INVALID_TOKEN unless me['status'] == 'success'
|
36
38
|
end
|
37
39
|
|
38
|
-
# Fetches information about user
|
40
|
+
# Fetches information about current user
|
39
41
|
#
|
40
42
|
# @return [Hash] raw data from DBLista
|
41
43
|
def me
|
42
44
|
DBLista._get('/users/me', @token)
|
43
45
|
end
|
46
|
+
|
47
|
+
# Fetches current user guilds
|
48
|
+
#
|
49
|
+
# @return [Hash] raw data from DBLista
|
50
|
+
def guilds
|
51
|
+
DBLista._get('/users/me/guilds', @token)
|
52
|
+
end
|
44
53
|
end
|
45
54
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DBLista::User
|
4
|
+
# User client - notifications
|
5
|
+
module Notifications
|
6
|
+
# Fetches user notifications
|
7
|
+
#
|
8
|
+
# @return [Hash] raw data from DBLista
|
9
|
+
def notifications
|
10
|
+
DBLista._get('/users/me/notifications/read', @token)
|
11
|
+
end
|
12
|
+
|
13
|
+
# Clears user notifications
|
14
|
+
#
|
15
|
+
# @return [Hash] raw data from DBLista
|
16
|
+
def clear_notifications
|
17
|
+
DBLista._delete('/users/me/notifications/clear', @token)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/dblista/user/rating.rb
CHANGED
data/lib/dblista/user/voting.rb
CHANGED
data/lib/dblista/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dblista
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- deepivin
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- lib/dblista/user/actions.rb
|
79
79
|
- lib/dblista/user/boosting.rb
|
80
80
|
- lib/dblista/user/client.rb
|
81
|
+
- lib/dblista/user/notifications.rb
|
81
82
|
- lib/dblista/user/rating.rb
|
82
83
|
- lib/dblista/user/voting.rb
|
83
84
|
- lib/dblista/version.rb
|