class PlatformLib::TaskService

Public: A wrapper around the Task Data Service

Examples:

# the preferred method
service = PlatformLib::DataService.new("user", "pass").task_service

# direct instantiation
service = PlatformLib::TaskService.new("auth_token")

Constants

END_POINT

Public Class Methods

new(auth_token) click to toggle source

Public: Creates a new instance

auth_token - the authentication token to be used

# File lib/platform_lib/task_service.rb, line 24
def initialize(auth_token)
  @auth_token = auth_token
end

Public Instance Methods

get_task_items(params = {}, &block) click to toggle source

Public: Queries the task end point

params - an optional hash of parameters (query string) block - an optional block to be called for each item returned

Examples:

items = task_service.get_task_items(range: "1-10")

task_service.get_task_items(byCustomValue: "{test}{val}") do |item|
  puts item.title
end

Returns the items supplied from the service

# File lib/platform_lib/task_service.rb, line 42
def get_task_items(params = {}, &block)
  if block.nil?
    get_entries(END_POINT, params)      
  else
    get_entries(END_POINT, params, &block)
  end
end