class Teamweek::Api::Client
Attributes
base_uri[RW]
client[RW]
Public Class Methods
new(client, account_id, opts={})
click to toggle source
# File lib/teamweek/api/client.rb, line 8 def initialize(client, account_id, opts={}) @client = client set_base_uri(opts[:base_uri], account_id) end
Public Instance Methods
import_projects(data)
click to toggle source
Posts projects to Teamweek
bulk_import url.
@param projects: an array of projects data as hash. @return [Teamweek::Api::Project] the added or found Teamweek
project instances
# File lib/teamweek/api/client.rb, line 25 def import_projects(data) bulk_import('projects', data, Teamweek::Api::Project) end
import_tasks(data)
click to toggle source
import_users(data)
click to toggle source
Private Instance Methods
full_path(uri)
click to toggle source
# File lib/teamweek/api/client.rb, line 44 def full_path(uri) base_uri + uri end
set_base_uri(site, account_id)
click to toggle source
# File lib/teamweek/api/client.rb, line 39 def set_base_uri(site, account_id) site ||= "https://teamweek.com" @base_uri = "#{site}/api/v3/#{account_id}" end