dbiorb 0.3.0 → 0.4.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/dbio.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f740860860737d6b7cc450fb0c27dbdc08756daadeac6248902b0ddbae17c38
|
4
|
+
data.tar.gz: e88c2abc140fee0524897602ff0db19501873a0838aa764b6b43b60e100f79fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70af506bd80c55418eeb8fdf2dd71f03948b3b4bf3bf421ba7ec3140a115fb354d75d111b5c1e0bc439c9bcb69a80c5137cebb69a8110c57c5c9487d5092403c
|
7
|
+
data.tar.gz: e92b20fcd04d64bf476210da620c6b43d42dab7d5c20054e623097df9d4d5d94a15c9688875135a030a0c065a7ac7686ea282ea31d6e3e353d06f5a047c99b3c
|
data/lib/dbio.rb
CHANGED
@@ -12,7 +12,7 @@ class DBio
|
|
12
12
|
# @raise [RestClient::NotFound] if the specified user does not exist
|
13
13
|
# @return [User] the new user object
|
14
14
|
def user(id)
|
15
|
-
user = JSON.parse(RestClient.get("https://api.discord.bio/
|
15
|
+
user = JSON.parse(RestClient.get("https://api.discord.bio/user/details/#{id}"))
|
16
16
|
|
17
17
|
User.new(user['payload'])
|
18
18
|
end
|
@@ -22,14 +22,14 @@ class DBio
|
|
22
22
|
# @see [SearchResult#user]
|
23
23
|
# @return [Array<SearchResult>] the response
|
24
24
|
def top_likes
|
25
|
-
JSON.parse(RestClient.get("https://api.discord.bio/
|
25
|
+
JSON.parse(RestClient.get("https://api.discord.bio/topLikes"))['payload'].map { |e| SearchResult.new(e) }
|
26
26
|
end
|
27
27
|
|
28
28
|
# Searches for a user
|
29
29
|
# This API is not publicly documented and can break at any time. Be careful!
|
30
30
|
# @return [Array<SearchResult>] the response
|
31
31
|
def search(user)
|
32
|
-
JSON.parse(RestClient.get("https://api.discord.bio/
|
32
|
+
JSON.parse(RestClient.get("https://api.discord.bio/user/search/#{user}"))['payload'].map { |e| SearchResult.new(e) }
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|