Sha256: 17838afdb04c3a5bca86dc946ceaff1f3b85be0b22fa9f66eb049b937e514cbe

Contents?: true

Size: 896 Bytes

Versions: 1

Compression:

Stored size: 896 Bytes

Contents

# frozen_string_literal: true

require_relative "../../response/contributors_response"
require_relative "../../request/contributors_request_handler"

module ONEAccess
  module API
    module V3_0 # rubocop:disable Style/ClassAndModuleCamelCase
      class References < Base
        api_path "/references"

        class << self
          def contributors(contributor_names: nil, limit: 20, offset: 0)
            params = {
              contributor_names: contributor_names,
              limit:             limit,
              offset:            offset
            }.reject { |_, v| v.nil? }

            resp = send_get("contributors", params)

            Response::ContributorsResponse.from_json(resp.body)
          end

          def contributors_list
            Request::ContributorsRequestHandler.new(url: api_url("contributors"))
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
oneaccess-0.2.0 lib/oneaccess/api/v3_0/references.rb