Class: Taskworld::Client

Inherits:
Object
  • Object
show all
Includes:
Connection, Endpoints, Request
Defined in:
lib/taskworld/client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Endpoints::Checklist

#checklist_add_item, #checklist_delete_item, #checklist_update_item

Methods included from Endpoints::Task

#task_create, #task_delete, #task_get, #task_update

Methods included from Endpoints::Tasklist

#tasklist_create, #tasklist_delete, #tasklist_get_all, #tasklist_move_task, #tasklist_update

Methods included from Endpoints::Project

#project_create, #project_delete, #project_get_all, #project_update

Methods included from Request

#delete, #get, #post, #put

Constructor Details

#initializeClient

Returns a new instance of Client.



19
20
21
22
# File 'lib/taskworld/client.rb', line 19

def initialize
  @endpoint ||= Config::ENDPOINTS.fetch(Config.server, Config::DEFAULT_ENDPONT)
  auth
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



7
8
9
# File 'lib/taskworld/client.rb', line 7

def access_token
  @access_token
end

#default_space_idObject

Returns the value of attribute default_space_id.



7
8
9
# File 'lib/taskworld/client.rb', line 7

def default_space_id
  @default_space_id
end

#endpointObject

Returns the value of attribute endpoint.



7
8
9
# File 'lib/taskworld/client.rb', line 7

def endpoint
  @endpoint
end

#workspacesObject

Returns the value of attribute workspaces.



7
8
9
# File 'lib/taskworld/client.rb', line 7

def workspaces
  @workspaces
end

Class Method Details

.configObject



14
15
16
# File 'lib/taskworld/client.rb', line 14

def config
  Config
end

.configureObject



10
11
12
# File 'lib/taskworld/client.rb', line 10

def configure
  block_given? ? yield(Config) : Config
end