Work with badges

Description

Work with badges

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
badges(url = NULL, key = NULL, user = NULL, ...)

badges_user(username, url = NULL, key = NULL, user = NULL, ...)

badge_create(name, badge_type_id, description = NULL, allow_title = NULL,
  multiple_grant = NULL, icon = NULL, listable = NULL,
  target_posts = NULL, query = NULL, enabled = NULL, auto_revoke = NULL,
  badge_grouping_id = NULL, trigger = NULL, show_posts = NULL,
  image = NULL, long_description = 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 GET, POST, PUT, or DELETE

username

A current user name. required

name

(character) A badge name to be created. required

badge_type_id

(integer) A badge type id. one of 1 (gold), 2 (silver), or 3 (bronze). required

description

(character) A description(character) . optional

allow_title

(logical) Allow a title. optional

multiple_grant

(character) multiple grant. optional

icon

(character) icon. optional

listable

(logical) listable. optional

target_posts

(character) . optional

query

(character) query string. optional

enabled

(logical) enabled or not. optional

auto_revoke

(character) auto revoke. optional

badge_grouping_id

(character) badge grouping id. optional

trigger

(character) trigger. optional

show_posts

(logical) show posts. optional

image

(character) an image. optional

long_description

(character) long description. optional

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# all badges
badges()

# specific group by name
badges_user("sckott")

# create a group
(res <- badge_create(name = "funbadge", badge_type_id = 3))

## End(Not run)