Module: BWAPI::Client::Brandwatch::Clients::Users

Included in:
BWAPI::Client::Brandwatch::Clients
Defined in:
lib/bwapi/client/brandwatch/clients/users.rb

Overview

Users module for brandwatch/users endpoints

Instance Method Summary collapse

Instance Method Details

#brandwatch_create_client_user(client_id, opts = {}) ⇒ Hash

Create a new client user

Parameters:

  • client_id (Integer)

    Id of the client

  • opts (Hash) (defaults to: {})

    options Hash of parameters

Options Hash (opts):

  • address (String)

    The users address

  • apiRole (Array)

    The users api role

  • ccAccess (String)

    The user Vizia access level

  • clientId (Integer)

    The users client id

  • creationDate (Date)

    Date the user was created on

  • department (String)

    The users department

  • enabled (Boolean)

    The status of the user

  • externalId (String)

    The Users external Id

  • firstName (String)

    The users first name

  • id (Integer)

    Id of the user

  • job (String)

    The users job

  • lastName (String)

    The last name of the user

  • messenger (String)

    The users IM details

  • mobile (String)

    The users mobile number

  • oldPassword (String)

    The old password of the user

  • password (String)

    The password of the user

  • passwordConfirmation (String)

    The confirmed password

  • phone (String)

    The users phone number

  • tags (Hash)

    The users assigned tags

  • uiRole (String)

    The users ui role

  • username (String)

    The users username

Returns:

  • (Hash)

    New user



40
41
42
# File 'lib/bwapi/client/brandwatch/clients/users.rb', line 40

def brandwatch_create_client_user(client_id, opts = {})
  post "brandwatch/clients/#{client_id}/users", opts
end

#brandwatch_get_client_user(client_id, user_id, opts = {}) ⇒ Object

Get a user in a client

TODO: Add parameters documentation



47
48
49
# File 'lib/bwapi/client/brandwatch/clients/users.rb', line 47

def brandwatch_get_client_user(client_id, user_id, opts = {})
  get "brandwatch/clients/#{client_id}/users/#{user_id}", opts
end

#brandwatch_get_client_users(client_id, opts = {}) ⇒ Object

List all users in a client

TODO: Add parameters documentation



10
11
12
# File 'lib/bwapi/client/brandwatch/clients/users.rb', line 10

def brandwatch_get_client_users(client_id, opts = {})
  get "brandwatch/clients/#{client_id}/users", opts
end

#brandwatch_update_client_user(client_id, user_id, opts = {}) ⇒ Object

Update a user in a client

TODO: Add parameters documentation



54
55
56
# File 'lib/bwapi/client/brandwatch/clients/users.rb', line 54

def brandwatch_update_client_user(client_id, user_id, opts = {})
  put "brandwatch/clients/#{client_id}/users/#{user_id}", opts
end