Class: DBio::DiscordConnection
- Inherits:
-
Object
- Object
- DBio::DiscordConnection
- Defined in:
- lib/dbio/discord_connection.rb
Overview
Find information about a Discord Connection.
Instance Method Summary collapse
-
#initialize(data) ⇒ DiscordConnection
constructor
Initialize the connection.
-
#name ⇒ String
The name as it appears on the Discord profile.
-
#type ⇒ String
The type of Discord connection, e.g.
-
#url ⇒ String
The URL to the connection as it is on the Discord profile.
Constructor Details
#initialize(data) ⇒ DiscordConnection
Initialize the connection
4 5 6 |
# File 'lib/dbio/discord_connection.rb', line 4 def initialize(data) @data = data end |
Instance Method Details
#name ⇒ String
Returns the name as it appears on the Discord profile.
15 16 17 |
# File 'lib/dbio/discord_connection.rb', line 15 def name @data['name'] end |
#type ⇒ String
The type of Discord connection, e.g. Twitter, YouTube, etc.
10 11 12 |
# File 'lib/dbio/discord_connection.rb', line 10 def type @data['connection_type'] end |
#url ⇒ String
Returns the URL to the connection as it is on the Discord profile.
20 21 22 |
# File 'lib/dbio/discord_connection.rb', line 20 def url @data['url'] end |