Method: DataSift::AccountIdentityToken#update

Defined in:
lib/account_identity_token.rb

#update(identity_id = '', service = '', token = '') ⇒ Object

Updates a specific Token by Identity ID and Service

Parameters:

  • identity_id (String) (defaults to: '')

    ID of the Identity you are updating a token for

  • service (String) (defaults to: '')

    The service this token will be used to access. For example; ‘facebook’

  • token (String) (defaults to: '')

    The token provided by the PYLON data provider

Returns:

  • (Object)

    API reponse object



62
63
64
65
66
67
68
69
70
71
# File 'lib/account_identity_token.rb', line 62

def update(identity_id = '', service = '', token = '')
  fail BadParametersError, 'identity_id is required' if identity_id.empty?
  fail BadParametersError, 'service is required' if service.empty?
  fail BadParametersError, 'token is required' if token.empty?
  params = {
    token: token
  }

  DataSift.request(:PUT, "account/identity/#{identity_id}/token/#{service}", @config, params)
end