dbiorb 0.1.1 → 0.1.2
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/discord_connection.rb +10 -0
- data/lib/dbio/user.rb +9 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adb8d6a712f4d76ef0f5baf5d8061d0940e5651c21947ceee764f436f300b096
|
4
|
+
data.tar.gz: 8ed87a06a991cd35ad624825d02c2e09688f7cdb297513edfd75efe61f8006ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/dbio/user.rb
CHANGED
@@ -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
|
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
|
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.
|
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-
|
11
|
+
date: 2020-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|