Sha256: ab1774e3e595b85ede52a813e9f940012e7012de7c353b945ccf956fead8482e

Contents?: true

Size: 568 Bytes

Versions: 4

Compression:

Stored size: 568 Bytes

Contents

# frozen_string_literal: true

module RDStation
  class LandingPages
    include HTTParty
    include ::RDStation::RetryableRequest

    def initialize(authorization:)
      @authorization = authorization
    end

    def all(query_params={})
      retryable_request(@authorization) do |authorization|
        response = self.class.get(base_url, headers: authorization.headers, query: query_params)
        ApiResponse.build(response)
      end
    end

    private

    def base_url(path='')
      "#{RDStation.host}/platform/landing_pages/#{path}"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rdstation-ruby-client-2.9.0 lib/rdstation/landing_pages.rb
rdstation-ruby-client-2.8.2 lib/rdstation/landing_pages.rb
rdstation-ruby-client-2.8.1 lib/rdstation/landing_pages.rb
rdstation-ruby-client-2.8.0 lib/rdstation/landing_pages.rb