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
-
.account ⇒ Object
Returns the value of attribute account.
-
.domain_format ⇒ Object
Returns the value of attribute domain_format.
-
.email ⇒ Object
Returns the value of attribute email.
-
.host_format ⇒ Object
Returns the value of attribute host_format.
-
.key ⇒ Object
Returns the value of attribute key.
-
.password ⇒ Object
Returns the value of attribute password.
-
.port ⇒ Object
Returns the value of attribute port.
-
.protocol ⇒ Object
Returns the value of attribute protocol.
Class Method Summary collapse
-
.authenticate(user, password) ⇒ Object
Sets up basic authentication credentials for all resources.
- .resources ⇒ Object
Class Attribute Details
.account ⇒ Object
Returns the value of attribute account.
14 15 16 |
# File 'lib/mite-rb.rb', line 14 def account @account end |
.domain_format ⇒ Object
Returns the value of attribute domain_format.
13 14 15 |
# File 'lib/mite-rb.rb', line 13 def domain_format @domain_format end |
.email ⇒ Object
Returns the value of attribute email.
13 14 15 |
# File 'lib/mite-rb.rb', line 13 def email @email end |
.host_format ⇒ Object
Returns the value of attribute host_format.
13 14 15 |
# File 'lib/mite-rb.rb', line 13 def host_format @host_format end |
.key ⇒ Object
Returns the value of attribute key.
14 15 16 |
# File 'lib/mite-rb.rb', line 14 def key @key end |
.password ⇒ Object
Returns the value of attribute password.
13 14 15 |
# File 'lib/mite-rb.rb', line 13 def password @password end |
.port ⇒ Object
Returns the value of attribute port.
13 14 15 |
# File 'lib/mite-rb.rb', line 13 def port @port end |
.protocol ⇒ Object
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 |
.resources ⇒ Object
43 44 45 |
# File 'lib/mite-rb.rb', line 43 def resources @resources ||= [] end |