Module: Lighthouse

Defined in:
lib/lighthouse.rb

Overview

Ruby lib for working with the Lighthouse API’s XML interface.

The first thing you need to set is the account name. This is the same as the web address for your account.

Lighthouse. = 'activereload'

Then, you should set the authentication. You can either use your login credentials with HTTP Basic Authentication or with an API Tokens. You can find more info on tokens at lighthouseapp.com/help/using-beacons.

# with basic authentication
Lighthouse.authenticate('[email protected]', 'spacemonkey')

# or, use a token
Lighthouse.token = 'abcdefg'

If no token or authentication info is given, you’ll only be granted public access.

This library is a small wrapper around the REST interface. You should read the docs at lighthouseapp.com/api.

Defined Under Namespace

Classes: Base, Bin, Change, Changeset, Error, Membership, Message, Milestone, Project, ProjectMembership, Tag, TagResource, Ticket, Token, User

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.accountObject

Returns the value of attribute account.



54
55
56
# File 'lib/lighthouse.rb', line 54

def 
  @account
end

.domain_formatObject

Returns the value of attribute domain_format.



53
54
55
# File 'lib/lighthouse.rb', line 53

def domain_format
  @domain_format
end

.emailObject

Returns the value of attribute email.



53
54
55
# File 'lib/lighthouse.rb', line 53

def email
  @email
end

.host_formatObject

Returns the value of attribute host_format.



53
54
55
# File 'lib/lighthouse.rb', line 53

def host_format
  @host_format
end

.passwordObject

Returns the value of attribute password.



53
54
55
# File 'lib/lighthouse.rb', line 53

def password
  @password
end

.portObject

Returns the value of attribute port.



53
54
55
# File 'lib/lighthouse.rb', line 53

def port
  @port
end

.protocolObject

Returns the value of attribute protocol.



53
54
55
# File 'lib/lighthouse.rb', line 53

def protocol
  @protocol
end

.tokenObject

Returns the value of attribute token.



54
55
56
# File 'lib/lighthouse.rb', line 54

def token
  @token
end

Class Method Details

.authenticate(email, password) ⇒ Object

Sets up basic authentication credentials for all the resources.



65
66
67
68
# File 'lib/lighthouse.rb', line 65

def authenticate(email, password)
  @email    = email
  @password = password
end

.resourcesObject



78
79
80
# File 'lib/lighthouse.rb', line 78

def resources
  @resources ||= []
end