Module: Mailblastr::ApiKeys
- Defined in:
- lib/mailblastr/api_keys.rb
Class Method Summary collapse
-
.create(params) ⇒ Object
Create an API key — the full token is returned only once, here.
-
.delete(api_key_id) ⇒ Object
DELETE /api-keys/:id.
-
.list ⇒ Object
GET /api-keys.
Class Method Details
.create(params) ⇒ Object
Create an API key — the full token is returned only once, here. POST /api-keys — params: { name:, permission: "full_access"|"sending_access", domain_id:, domain_ids: } domain_ids: scopes the key to one or more domains — sending_access only (combining a domain restriction with full_access is a 422); domain_id: is the legacy single-domain form. Providing both is a 422.
11 12 13 |
# File 'lib/mailblastr/api_keys.rb', line 11 def create(params) Client.request(:post, "/api-keys", body: params) end |
.delete(api_key_id) ⇒ Object
DELETE /api-keys/:id
21 22 23 |
# File 'lib/mailblastr/api_keys.rb', line 21 def delete(api_key_id) Client.request(:delete, "/api-keys/#{Client.path_escape(api_key_id)}") end |