Module: Mite

Defined in:
lib/mite-rb.rb

Overview

The official ruby library for interacting with the RESTful API of mite, a sleek time tracking webapp.

Defined Under Namespace

Classes: Base, Customer, Error, Project, Service, TimeEntry, TimeEntryGroup, Tracker, User

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.accountObject

Returns the value of attribute account.



14
15
16
# File 'lib/mite-rb.rb', line 14

def 
  @account
end

.domain_formatObject

Returns the value of attribute domain_format.



13
14
15
# File 'lib/mite-rb.rb', line 13

def domain_format
  @domain_format
end

.emailObject

Returns the value of attribute email.



13
14
15
# File 'lib/mite-rb.rb', line 13

def email
  @email
end

.host_formatObject

Returns the value of attribute host_format.



13
14
15
# File 'lib/mite-rb.rb', line 13

def host_format
  @host_format
end

.keyObject

Returns the value of attribute key.



14
15
16
# File 'lib/mite-rb.rb', line 14

def key
  @key
end

.passwordObject

Returns the value of attribute password.



13
14
15
# File 'lib/mite-rb.rb', line 13

def password
  @password
end

.portObject

Returns the value of attribute port.



13
14
15
# File 'lib/mite-rb.rb', line 13

def port
  @port
end

.protocolObject

Returns the value of attribute protocol.



13
14
15
# File 'lib/mite-rb.rb', line 13

def protocol
  @protocol
end

Class Method Details

.authenticate(user, password) ⇒ Object

Sets up basic authentication credentials for all resources.



25
26
27
28
29
30
31
32
33
# File 'lib/mite-rb.rb', line 25

def authenticate(user, password)
  resources.each do |klass|
    klass.user = user
    klass.password = password
  end
  @user     = user
  @password = password
  true
end

.resourcesObject



43
44
45
# File 'lib/mite-rb.rb', line 43

def resources
  @resources ||= []
end