Sha256: 2c9ef432da16186df1d92ea7b8d2544681e42bc528157df06f32bea9dc68f80d

Contents?: true

Size: 421 Bytes

Versions: 1

Compression:

Stored size: 421 Bytes

Contents

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require File.expand_path('../../lib/discourse_api', __FILE__)

client = DiscourseApi::Client.new("http://localhost:3000")
client.api_key = "YOUR_API_KEY"
client.api_username = "YOUR_USERNAME"

client.create_private_message(
  title: "Confidential: Hello World!",
  raw: "This is the raw markdown for my private message",
  target_usernames: ["user1", "user2"]
)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
discourse_api-0.15.0 examples/create_private_message.rb