Method: DiscourseApi::API::Badges#create_badge
- Defined in:
- lib/discourse_api/api/badges.rb
#create_badge(params = {}) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/discourse_api/api/badges.rb', line 18 def create_badge(params={}) args = API.params(params) .required(:name, :badge_type_id) .optional(:description, :allow_title, :multiple_grant, :icon, :listable, :target_posts, :query, :enabled, :auto_revoke, :badge_grouping_id, :trigger, :show_posts, :image, :long_description) post("/admin/badges.json", args) end |