Class: LibDiscord::Resource Abstract
- Inherits:
-
Object
- Object
- LibDiscord::Resource
- Defined in:
- lib/lib_discord/resource.rb
Overview
This class is abstract.
Do not interact with or instantiate a Resource class. It is the parent class for discreet Discord resources.
Direct Known Subclasses
Application, ApplicationCommand, ApplicationRoleConnectionMetadata, AuditLog, AutoModeration, Channel, Emoji, Guild, GuildScheduledEvent, GuildTemplate, Interaction, Invite, Poll, StageInstance, Sticker, User, Voice, Webhook
Instance Method Summary collapse
-
#initialize(auth_header, base_url, user_agent, logger) ⇒ Resource
constructor
private
Initialize a Resource subclass.
Constructor Details
#initialize(auth_header, base_url, user_agent, logger) ⇒ Resource
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize a Resource subclass.
30 31 32 33 34 35 36 |
# File 'lib/lib_discord/resource.rb', line 30 def initialize(auth_header, base_url, user_agent, logger) @auth_header = Types::Strict::String[auth_header] @base_url = Types::Strict::String[base_url] @default_headers = {user_agent: Types::Strict::String[user_agent]} @logger = Types::Logger[logger] end |