Sha256: d07e7f2bdd8c5e7c3738871bd196180f782a9d7c7bb4c6ad124d426035c63442

Contents?: true

Size: 1.13 KB

Versions: 8

Compression:

Stored size: 1.13 KB

Contents

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

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
datasift-3.5.2 lib/managed_source_auth.rb
datasift-3.5.1 lib/managed_source_auth.rb
datasift-3.6.1 lib/managed_source_auth.rb
datasift-3.6.0 lib/managed_source_auth.rb
datasift-3.5.0 lib/managed_source_auth.rb
datasift-3.4.0 lib/managed_source_auth.rb
datasift-3.3.0 lib/managed_source_auth.rb
datasift-3.2.0 lib/managed_source_auth.rb