Method: DataSift::Task#create

Defined in:
lib/tasks.rb

#create(service:, type:, subscription_id:, name:, parameters:) ⇒ Object

Creates a Task; this call requires use of an identity API key

Parameters:

  • service (String)

    Service you wish to create a Task for

  • type (String)

    Type of Task to be run

  • subscription_id (String)

    Subscription ID as returned by /pylon/start

  • name (String)

    Human identifier for this Task

  • parameters (Hash)

    Object representing the parameters for the Task type

Returns:

  • (Object)

    API reponse object



13
14
15
16
17
18
19
20
# File 'lib/tasks.rb', line 13

def create(service:, type:, subscription_id:, name:, parameters:)
  DataSift.request(:POST, "pylon/#{service}/task", @config, {
    type: type,
    subscription_id: subscription_id,
    name: name,
    parameters: parameters
  })
end