Class: TeamsIncomingClients::Client

Inherits:
Object
  • Object
show all
Extended by:
Modules::ClientConfigure
Includes:
Dates, Teams
Defined in:
lib/teams_incoming_clients/models/client.rb

Direct Known Subclasses

DayOfWeekClient, TargetDateClient, WeekdayClient

Constant Summary

Constants included from Modules::ClientConfigure

Modules::ClientConfigure::VALID_CONFIG_KEYS

Instance Method Summary collapse

Methods included from Modules::ClientConfigure

configure

Constructor Details

#initialize(webhook_url) ⇒ Client

Returns a new instance of Client.

Parameters:

  • webhook_url (String)

    Teamsに送信するためのIncomingWebhoolURL



11
12
13
# File 'lib/teams_incoming_clients/models/client.rb', line 11

def initialize(webhook_url)
  @poster = Poster.new(webhook_url)
end

Instance Method Details

#post(text) ⇒ PostResult

メッセージを送信する

Examples:

client.post(“hello world”)

Parameters:

  • text (String)

    送信するメッセージ

Returns:



19
20
21
# File 'lib/teams_incoming_clients/models/client.rb', line 19

def post(text)
  post_message(text)
end