Sha256: 6ce80c70c208ffa706bb9cfb63ad24923ef82ed4949bee911d8fec0c39ce425d

Contents?: true

Size: 747 Bytes

Versions: 91

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

91 entries across 91 versions & 2 rubygems

Version Path
harbr-0.1.41 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
harbr-0.1.39 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
harbr-0.1.38 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
harbr-0.1.37 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/api_keys.rb
resend-0.8.1 lib/resend/api_keys.rb
resend-0.8.0 lib/resend/api_keys.rb
resend-0.7.2 lib/resend/api_keys.rb
resend-0.7.1 lib/resend/api_keys.rb
resend-0.7.0 lib/resend/api_keys.rb
resend-0.6.0 lib/resend/api_keys.rb
resend-0.5.0 lib/resend/api_keys.rb