Sha256: cdfb35813ea583b472783e19e41b8a95affc5d49d79f85d6ccbd94afa6b5a76d
Contents?: true
Size: 702 Bytes
Versions: 13
Compression:
Stored size: 702 Bytes
Contents
# frozen_string_literal: true $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require File.expand_path('../../lib/discourse_api', __FILE__) config = DiscourseApi::ExampleHelper.load_yml client = DiscourseApi::Client.new(config['host'] || 'http://localhost:3000') client.api_key = config['api_key'] || "YOUR_API_KEY" client.api_username = config['api_username'] || "YOUR_USERNAME" # invite user client.invite_user(email: "name@example.com", group_ids: "41,42") # invite to a topic client.invite_user_to_topic(email: "foo@bar.com", topic_id: 1) # if the user is an admin you may invite to a group as well client.invite_user_to_topic(email: "foo@bar.com", topic_id: 1, group_ids: "1,2,3")
Version data entries
13 entries across 13 versions & 1 rubygems