dbiorb 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fc93ac9fc1e4a99dd8f3ee921bf47a8ab9c80acb2826ad75b9c01982bd68fbc
4
- data.tar.gz: 2c8c500a671a4b17b03a69544307e6735722e37999ecaa31bceab435631ffe1b
3
+ metadata.gz: adb8d6a712f4d76ef0f5baf5d8061d0940e5651c21947ceee764f436f300b096
4
+ data.tar.gz: 8ed87a06a991cd35ad624825d02c2e09688f7cdb297513edfd75efe61f8006ab
5
5
  SHA512:
6
- metadata.gz: e636b2cbe0d4916da8db6240c8dc89beeaf413f2bf9fdd40b3d3c53c0abedb03309c44dc739c13cc1fd196e573792d779febe6da34bb9ecb5265d5fc10f2d10a
7
- data.tar.gz: 03d7850c5258d270acafb11a9b601f34c1828e00b09ac8866182521f83e474df1cf9fbd965c77b46d231534908273589bb58dd5484c6dad66c29b811f4f093fe
6
+ metadata.gz: 3bc0d6a45d6d20b108e96a1ee9cce0bf70de322d40a0f222fefbcea70351a180298893277a6ac5c57f23bb07ed62962286d396c7d9b7a6d6a43b49d6266cc4c9
7
+ data.tar.gz: ed8a3de45499cd7f87398574150f99e4763c4e8a3b1ecae386d74b1f5804792fac3ae47ade3d7e1822e5485db64982c95966eb86cacc0fef4c9492bbed7fa631
@@ -20,4 +20,14 @@ class DBio::DiscordConnection
20
20
  def url
21
21
  @data['url']
22
22
  end
23
+
24
+ # The icon is used on the website, it's a Font Awesome icon code.
25
+ # Not really useful unless you're making a site with the gem, in which case you'd probably do:
26
+ # <a href="<%= @connection.url %>"><i class="<%= @connection.icon %>"></i> <%= @connection.name %></a>
27
+ # Which could return:
28
+ # <a href="https://twitter.com/twitter"><i class="fab fa-twitter"></i> Twitter</a>
29
+ # @return [String] the font awesome icon code for this connection
30
+ def icon
31
+ @data['icon']
32
+ end
23
33
  end
@@ -14,12 +14,18 @@ class DBio::User
14
14
  alias_method :to_s, :data
15
15
 
16
16
  # The slug of this user. Use: dsc.bio/slug
17
- # @see [User#profile_url]
17
+ # @see User#profile_url
18
18
  # @return [String] the slug
19
19
  def slug
20
20
  @user['slug']
21
21
  end
22
22
 
23
+ # The link to this user's profile
24
+ # @return [String] this user's profile
25
+ def profile_url
26
+ "https://dsc.bio/#{profile_url}"
27
+ end
28
+
23
29
  # The id of the user.
24
30
  # @return [Integer] User ID in integer form.
25
31
  def id
@@ -31,7 +37,8 @@ class DBio::User
31
37
  @user['upvotes']
32
38
  end
33
39
 
34
- # The flags for this user. Not entirely sure what they mean, but they're there.
40
+ # The oauth flags for this user. Not useful on their own.
41
+ # @see DBio::DiscordProfile#public_flags
35
42
  # @return [Integer] the flags for this user
36
43
  def flags
37
44
  @user['flags']
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.1.1
4
+ version: 0.1.2
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-09 00:00:00.000000000 Z
11
+ date: 2020-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json