Learn R Programming

discgolf (version 0.2.0)

badges: Work with badges

Description

Work with badges

Usage

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

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

# specific badge by name
badges_user("sckott")

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

Run the code above in your browser using DataLab