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.34.0 examples/create_user.rb
discourse_api-0.33.0 examples/create_user.rb
discourse_api-0.32.0 examples/create_user.rb
discourse_api-0.31.0 examples/create_user.rb
discourse_api-0.30.0 examples/create_user.rb
discourse_api-0.29.0 examples/create_user.rb
discourse_api-0.28.1 examples/create_user.rb
discourse_api-0.28.0 examples/create_user.rb
discourse_api-0.27.0 examples/create_user.rb
discourse_api-0.26.0 examples/create_user.rb
discourse_api-0.25.0 examples/create_user.rb
discourse_api-0.24.0 examples/create_user.rb
discourse_api-0.23.1 examples/create_user.rb
discourse_api-0.23.0 examples/create_user.rb
discourse_api-0.22.0 examples/create_user.rb
discourse_api-0.20.1 examples/create_user.rb
discourse_api-0.20.0 examples/create_user.rb
discourse_api-0.19.0 examples/create_user.rb
discourse_api-0.18.0 examples/create_user.rb
discourse_api-0.17.0 examples/create_user.rb