dbiorb 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dbio/user.rb +11 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f740860860737d6b7cc450fb0c27dbdc08756daadeac6248902b0ddbae17c38
4
- data.tar.gz: e88c2abc140fee0524897602ff0db19501873a0838aa764b6b43b60e100f79fe
3
+ metadata.gz: 3565ccefb9e1eb0dc274b71be6fdeb2c454c70621911505e7f2d6fcbf5cb065b
4
+ data.tar.gz: 0b911b55c964887470ba13c8d232717a0b65b5408f00967aca1168f87217bb01
5
5
  SHA512:
6
- metadata.gz: 70af506bd80c55418eeb8fdf2dd71f03948b3b4bf3bf421ba7ec3140a115fb354d75d111b5c1e0bc439c9bcb69a80c5137cebb69a8110c57c5c9487d5092403c
7
- data.tar.gz: e92b20fcd04d64bf476210da620c6b43d42dab7d5c20054e623097df9d4d5d94a15c9688875135a030a0c065a7ac7686ea282ea31d6e3e353d06f5a047c99b3c
6
+ metadata.gz: cfeada1f447ce82cf783f9349c10e881549ed1e1c9aa5caabc15042c4237329f9bc1f7c016a1d22b7b4e35f32e08a648955d6e032670405d5d7e4bb6c30d03b7
7
+ data.tar.gz: f5c58be8e8f15664e2b0428e8827fc85ca15ff0a6555773058e54d9b6dea7b8c6833570b46c65e6d0b0c108a7cba28964c9c90e64ff9748bbfe13f60ac04a2e5
@@ -23,7 +23,7 @@ class DBio::User
23
23
  # The link to this user's profile
24
24
  # @return [String] this user's profile
25
25
  def profile_url
26
- "https://dsc.bio/#{profile_url}"
26
+ "https://dsc.bio/#{slug}"
27
27
  end
28
28
 
29
29
  # The id of the user.
@@ -51,7 +51,7 @@ class DBio::User
51
51
 
52
52
  # @return [boolean] if this user is verified
53
53
  def verified?
54
- @user['verified'] == 1
54
+ @user['verified']
55
55
  end
56
56
 
57
57
  # @return [Time] The time this user was created
@@ -116,10 +116,18 @@ class DBio::User
116
116
  @user['staff']
117
117
  end
118
118
 
119
+ # The premium type as found on Discord.
120
+ # ezpz way to see if they're Nitro.
121
+ # For Types, see https://discord.com/developers/docs/resources/user#user-object-premium-types
122
+ # @return [Integer] this user's premium type
123
+ def premium_type
124
+ @user['premium_type']
125
+ end
126
+
119
127
  # This is the user's Discord connections as they appear on their Discord profile
120
128
  # @return [Array<DiscordConnection>] the user's discord connections
121
129
  def discord_connections
122
- @discord_connections.map{ |e| DBio::DiscordConnection.new(e) }
130
+ @discord_connections.map { |e| DBio::DiscordConnection.new(e) }
123
131
  end
124
132
 
125
133
  # The user's Discord.Bio connections. Not as specific.
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.4.0
4
+ version: 0.4.1
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-20 00:00:00.000000000 Z
11
+ date: 2020-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json