Learn R Programming

discgolf (version 0.2.0)

categories: Work with categories

Description

Work with categories

Usage

categories(url = NULL, key = NULL, user = NULL, ...)

category(category, url = NULL, key = NULL, user = NULL, ...)

category_latest_topics(category, url = NULL, key = NULL, user = NULL, ...)

category_top_topics(category, url = NULL, key = NULL, user = NULL, ...)

category_new_topics(category, url = NULL, key = NULL, user = NULL, ...)

category_create(category, color, text_color, description = NULL, permissions = NULL, parent_category = NULL, url = NULL, key = NULL, user = NULL, ...)

Arguments

url

Base url for a Discourse installation. See disc_setup

key

Your api key on the Discourse installation. See disc_setup

user

Your user name on the Discourse installation. See disc_setup

...

Named parameters passed on to HttpClient

category

Category name. required

color

A color by name or hex string. optional

text_color

A color by name or hex string. optional

description

Description of the category. optional

permissions

Permissions - a list with the group name and permission_type which is an integer: 1 = Full, 2 = Create Post, 3 = Read Only. optional

parent_category

x. optional

Details

Apprently there's no ability to delete categories via the API.

Examples

Run this code
# NOT RUN {
# all categories
categories()

# a specfic category
category("questions")
category("packages")

# latest topics for a category
category_latest_topics("packages")

# top topics for a category
category_top_topics("packages")

# new topics for a category
category_new_topics("packages")

# create a category
category_create("stuff3", "F7941D", "FFFFFF", "My new category")
# }

Run the code above in your browser using DataLab