badges: Work with badges

Description Usage Arguments Examples

Description

Work with badges

Usage

1
2
3
4
5
6
7
8
9
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, enabled = NULL, auto_revoke = NULL,
  badge_grouping_id = 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 HttpClient

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

enabled

(logical) enabled or not. optional

auto_revoke

(character) auto revoke. optional

badge_grouping_id

(character) badge grouping id. 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 badge by name
badges_user("sckott")

# create a badge
(res <- badge_create(name = "funnestbadge", badge_type_id = 3))

## End(Not run)

discgolf documentation built on May 1, 2019, 11:30 p.m.