Sha256: afd397002c65df9e9e665cd908579bdf120e8ae33b56a2959504fe5ae7c35f42
Contents?: true
Size: 660 Bytes
Versions: 2
Compression:
Stored size: 660 Bytes
Contents
# require 'discourse_api' $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require File.expand_path('../../lib/discourse_api', __FILE__) client = DiscourseApi::Client.new("localhost", 3000) client.api_key = "YOUR_API_KEY" client.api_username = "YOUR_USERNAME" puts client.username_update(username: "Batman", new_username: "Alfred") puts client.user_update(username: "Batman", name: "Bruce Wayne") puts client.email_update(username: "Batman", email: "batman@example.com") puts client.toggle_avatar(username: "Batman", use_uploaded_avatar: true) puts client.upload_avatar(username: "DiscourseHero", file: "http://cdn.discourse.org/assets/logo.png")
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
discourse_api-0.1.2 | examples/update_user.rb |
discourse_api-0.1.1 | examples/update_user.rb |