Sha256: 6ce89810e8178e87492c89a8434ec44bc72e9c95817fee90dd113b0bba71b242

Contents?: true

Size: 421 Bytes

Versions: 4

Compression:

Stored size: 421 Bytes

Contents

# frozen_string_literal: true

module Panoptes
  class Client
    module Collections
      def collection(collection_id)
        response = panoptes.get("/collections/#{collection_id}")
        response['collections'].first
      end

      def add_subjects_to_collection(collection_id, subject_ids)
        panoptes.post("/collections/#{collection_id}/links/subjects", subjects: subject_ids)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
panoptes-client-1.2.1 lib/panoptes/client/collections.rb
panoptes-client-1.2.0 lib/panoptes/client/collections.rb
panoptes-client-1.1.1 lib/panoptes/client/collections.rb
panoptes-client-1.1.0 lib/panoptes/client/collections.rb