Sha256: 06488d497435ea1d79274674cb4b00457e5002615c2c9507b9321b20891e339b

Contents?: true

Size: 1.18 KB

Versions: 15

Compression:

Stored size: 1.18 KB

Contents

module DataSift
  # Methods for using Auth specific Managed Sources API endpoints
  class ManagedSourceResource < DataSift::ApiResource
    # Add resources to a Managed Source
    #
    # @param id [String] ID of the Managed Source you are adding resources to
    # @param resources [Array] Array of resources you are adding to your source
    # @param validate [Boolean] Whether you want to validate your new resources
    #   against the third party API (i.e. the Facebook or Instagram API)
    def add(id, resources, validate = 'true')
      params = {
        id: id,
        resources: resources,
        validate: validate
      }
      requires params
      DataSift.request(:PUT, 'source/resource/add', @config, params)
    end

    # Remove resources from a Managed Source
    #
    # @param id [String] ID of the Managed Source you are removing resources
    #   from
    # @param resource_ids [Array] Array of resource_id strings you need to
    #   remove from your source
    def remove(id, resource_ids)
      params = {
        id: id,
        resource_ids: resource_ids
      }
      requires params
      DataSift.request(:PUT, 'source/resource/remove', @config, params)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
datasift-3.10.0 lib/managed_source_resource.rb
datasift-3.9.0 lib/managed_source_resource.rb
datasift-3.8.0 lib/managed_source_resource.rb
datasift-3.7.2 lib/managed_source_resource.rb
datasift-3.5.2 lib/managed_source_resource.rb
datasift-3.5.1 lib/managed_source_resource.rb
datasift-3.7.1 lib/managed_source_resource.rb
datasift-3.7.0 lib/managed_source_resource.rb
datasift-3.6.2 lib/managed_source_resource.rb
datasift-3.6.1 lib/managed_source_resource.rb
datasift-3.6.0 lib/managed_source_resource.rb
datasift-3.5.0 lib/managed_source_resource.rb
datasift-3.4.0 lib/managed_source_resource.rb
datasift-3.3.0 lib/managed_source_resource.rb
datasift-3.2.0 lib/managed_source_resource.rb