dbiorb 0.2.0 → 0.3.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dbio.rb +4 -4
  3. data/lib/dbio/user.rb +8 -3
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8154ac9d42a3e4c093e23d360b473040a3e44a23a8a82054a195d313ef1718d7
4
- data.tar.gz: 933ea43ee7dc398fbe7804ef57fa5068edbdbc2438be1e6610455e785fd9bc63
3
+ metadata.gz: cae1aa9e8607edfa6f1ff02b5056eaab95b1b66af9896e1105244cf9e5a19c3c
4
+ data.tar.gz: '0793b113d72388a91d1cdad4bb3f23bba928831075d1d568c4bb515bfba0e42b'
5
5
  SHA512:
6
- metadata.gz: 6c47d939d8ab7ad86414455301f5b1244934f074b5cd79e77a2aff80223656a0fff597cbbce73004dd9182760fabe6690f2188ddfbd2efaa8d9d8f37dda6c90d
7
- data.tar.gz: cca49f36bee87db3700dc9b1fbba38d2e326e10024e65a4729b161c8fc31d933e9ed01c7ea93ae697885cded6be3dd55de441967ab749ca9b2e01b74724f3b3f
6
+ metadata.gz: 5522919bb6d1eecb37d64ffc4a31e8611584a216c6d713b0e5c7f807ff9ee2b7a9c3afc74307d324a661b2384cd92547f3439fe47d2fa10a6337a18d42612f07
7
+ data.tar.gz: 3b5cdb68e2fdf06e01272e0fd597d564cd4130e173b4b308535f869f694004c03279a40069f73fbda1e617c55df69b16f78e14a4cb9292c5ce2029e54223892d
@@ -17,16 +17,16 @@ class DBio
17
17
  User.new(user['payload'])
18
18
  end
19
19
 
20
- # Returns the top upvoted users.
20
+ # Returns the users by most likes.
21
21
  # Their data is short, so it's not really worth storing a lot of data
22
22
  # @see [SearchResult#user]
23
23
  # @return [Array<SearchResult>] the response
24
- def top_upvoted
25
- JSON.parse(RestClient.get("https://api.discord.bio/v1/topUpvoted"))['payload'].map { |e| SearchResult.new(e) }
24
+ def top_likes
25
+ JSON.parse(RestClient.get("https://api.discord.bio/v1/topLikes"))['payload'].map { |e| SearchResult.new(e) }
26
26
  end
27
27
 
28
28
  # Searches for a user
29
- # This API is not publically documented and can break at any time. Be careful!
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
32
  JSON.parse(RestClient.get("https://api.discord.bio/v1/user/search/#{user}"))['payload'].map { |e| SearchResult.new(e) }
@@ -32,11 +32,16 @@ class DBio::User
32
32
  @user['user_id'].to_i
33
33
  end
34
34
 
35
- # @return [Integer] the amount of upvotes this user has.
36
- def upvotes
37
- @user['upvotes']
35
+ # @return [Integer] the amount of likes this user has.
36
+ def likes
37
+ @user['likes']
38
38
  end
39
39
 
40
+ # This simply returns the likes, switch to likes.
41
+ # @deprecated
42
+ # @see [likes]
43
+ alias_method :upvotes, :likes
44
+
40
45
  # The oauth flags for this user. Not useful on their own.
41
46
  # @see DBio::DiscordProfile#public_flags
42
47
  # @return [Integer] the flags for this user
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbiorb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chew
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-14 00:00:00.000000000 Z
11
+ date: 2020-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json