Sha256: 68988e918decfd2adcdf01fcb7db031ad19eb96a3b1a4e681c0d73049b87379a

Contents?: true

Size: 392 Bytes

Versions: 6

Compression:

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

# get categories
puts client.categories()

# get sub categories for parent category with id 2
puts client.categories(parent_category_id: 2)

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
discourse_api-0.4.4 examples/category.rb
discourse_api-0.4.3 examples/category.rb
discourse_api-0.4.2 examples/category.rb
discourse_api-0.4.1 examples/category.rb
discourse_api-0.4.0 examples/category.rb
discourse_api-0.3.6 examples/category.rb