Sha256: 4d0b5ad279b3607a1ffbf3a764a30cfc8c47ca2719ef4ba36c56905ef9690f75
Contents?: true
Size: 613 Bytes
Versions: 8
Compression:
Stored size: 613 Bytes
Contents
# frozen_string_literal: true module DiscourseApi module API module ApiKey def list_api_keys response = get("/admin/api/keys") response[:body] end def create_api_key(args) args = API.params(args) .required(:key) .to_h post("/admin/api/keys", args) end def revoke_api_key(id) post("/admin/api/keys/#{id}/revoke") end def undo_revoke_api_key(id) post("/admin/api/keys/#{id}/undo-revoke") end def delete_api_key(id) delete("/admin/api/keys/#{id}") end end end end
Version data entries
8 entries across 8 versions & 1 rubygems