Sha256: 6ce80c70c208ffa706bb9cfb63ad24923ef82ed4949bee911d8fec0c39ce425d

Contents?: true

Size: 747 Bytes

Versions: 85

Compression:

Stored size: 747 Bytes

Contents

# frozen_string_literal: true

require "resend/request"
require "resend/errors"

module Resend
  # api keys api wrapper
  module ApiKeys
    class << self
      # https://resend.com/docs/api-reference/api-keys/create-api-key
      def create(params)
        path = "api-keys"
        Resend::Request.new(path, params, "post").perform
      end

      # https://resend.com/docs/api-reference/api-keys/list-api-keys
      def list
        path = "api-keys"
        Resend::Request.new(path, {}, "get").perform
      end

      # https://resend.com/docs/api-reference/api-keys/delete-api-key
      def remove(api_key_id = "")
        path = "api-keys/#{api_key_id}"
        Resend::Request.new(path, {}, "delete").perform
      end
    end
  end
end

Version data entries

85 entries across 85 versions & 2 rubygems

Version Path
resend-0.14.0 lib/resend/api_keys.rb
resend-0.13.0 lib/resend/api_keys.rb
resend-0.12.0 lib/resend/api_keys.rb
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
resend-0.11.0 lib/resend/api_keys.rb
resend-0.10.0 lib/resend/api_keys.rb
harbr-0.2.10 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
resend-0.9.0 lib/resend/api_keys.rb
harbr-0.2.9 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
harbr-0.2.8 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
harbr-0.2.7 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
harbr-0.2.6 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
harbr-0.2.5 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
harbr-0.2.4 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
harbr-0.2.3 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
harbr-0.2.2 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
harbr-0.2.1 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
harbr-0.2.0 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
harbr-0.1.99 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
harbr-0.1.98 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb