Sha256: f02d9ded8501da6dc663980069a3f73b2a897ab036d6473db35ea29d4abcf204

Contents?: true

Size: 734 Bytes

Versions: 7

Compression:

Stored size: 734 Bytes

Contents

# frozen_string_literal: true

require 'cloud_party/context'
require 'cloud_party/responses'
module CloudParty
  module Nodes
    class Memberships
      include CloudParty::Context
      include HTTParty
      base_uri 'api.cloudflare.com:443/client/v4'
      headers 'X-Auth-Email' => cfg.email,
              'X-Auth-Key' => cfg.api_key,
              'Content-Type' => 'application/json',
              'User-Agent' => "CloudParty/#{CloudParty::VERSION}"

      def initialize(options)
        super()
        @options = options
      end

      def list
        CloudParty::Responses::Memberships.new(:get, '/memberships', self.class.get('/memberships', @options))
      rescue APIError
        raise
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cloud_party-0.1.7 lib/cloud_party/nodes/memberships.rb
cloud_party-0.1.6 lib/cloud_party/nodes/memberships.rb
cloud_party-0.1.5 lib/cloud_party/nodes/memberships.rb
cloud_party-0.1.4 lib/cloud_party/nodes/memberships.rb
cloud_party-0.1.3 lib/cloud_party/nodes/memberships.rb
cloud_party-0.1.2 lib/cloud_party/nodes/memberships.rb
cloud_party-0.1.1 lib/cloud_party/nodes/memberships.rb