Sha256: 61b33809ad0bf774c70c19f17e4804a9ad2c410c1e2a454b26cb8c084cdab1e8
Contents?: true
Size: 618 Bytes
Versions: 2
Compression:
Stored size: 618 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" # get latest topics puts client.latest_topics({}) # get top topics puts client.top_topics # recategorize topic puts client.recategorize_topic(topic_id: 108, category_id: 5) # get all categories puts client.categories({})
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
discourse_api-2.0.1 | examples/topic_lists.rb |
discourse_api-2.0.0 | examples/topic_lists.rb |