Sha256: 736a541b9b0d2ac29efa7deae3e3c99b01cc6de80403b97c8f75fd1b20b3f04b

Contents?: true

Size: 445 Bytes

Versions: 23

Compression:

Stored size: 445 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"

# create user
user = client.create_user(
  name: "Bruce Wayne",
  email: "bruce@wayne.com",
  username: "batman",
  password: "WhySoSerious"
)

# activate user
client.activate(user["user_id"])

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
discourse_api-0.16.1 examples/create_user.rb
discourse_api-0.16.0 examples/create_user.rb
discourse_api-0.15.0 examples/create_user.rb