Class: DBio::DiscordConnection

Inherits:
Object
  • Object
show all
Defined in:
lib/dbio/discord_connection.rb

Overview

Find information about a Discord Connection.

Instance Method Summary collapse

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

#nameString

Returns the name as it appears on the Discord profile.

Returns:

  • (String)

    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

#typeString

The type of Discord connection, e.g. Twitter, YouTube, etc.

Returns:

  • (String)

    the type of connection


10
11
12
# File 'lib/dbio/discord_connection.rb', line 10

def type
  @data['connection_type']
end

#urlString

Returns the URL to the connection as it is on the Discord profile.

Returns:

  • (String)

    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