Module: UnfuddleAPI

Defined in:
lib/unfuddle/unfuddle-api.rb

Overview

Ruby lib for working with the Unfuddle 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.

UnfuddleAPI. = 'activereload'

Then, you should set the authentication with HTTP Basic Authentication.

# with basic authentication
UnfuddleAPI.authenticate('rick', 'spacemonkey')

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

Defined Under Namespace

Classes: Base, Comment, Error, Message, People, Project, Ticket

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.accountObject

Returns the value of attribute account.



48
49
50
# File 'lib/unfuddle/unfuddle-api.rb', line 48

def 
  @account
end

.domain_formatObject

Returns the value of attribute domain_format.



47
48
49
# File 'lib/unfuddle/unfuddle-api.rb', line 47

def domain_format
  @domain_format
end

.host_formatObject

Returns the value of attribute host_format.



47
48
49
# File 'lib/unfuddle/unfuddle-api.rb', line 47

def host_format
  @host_format
end

.passwordObject

Returns the value of attribute password.



47
48
49
# File 'lib/unfuddle/unfuddle-api.rb', line 47

def password
  @password
end

.portObject

Returns the value of attribute port.



47
48
49
# File 'lib/unfuddle/unfuddle-api.rb', line 47

def port
  @port
end

.protocolObject

Returns the value of attribute protocol.



47
48
49
# File 'lib/unfuddle/unfuddle-api.rb', line 47

def protocol
  @protocol
end

.usernameObject

Returns the value of attribute username.



47
48
49
# File 'lib/unfuddle/unfuddle-api.rb', line 47

def username
  @username
end

Class Method Details

.authenticate(username, password) ⇒ Object

Sets up basic authentication credentials for all the resources.



59
60
61
62
63
64
# File 'lib/unfuddle/unfuddle-api.rb', line 59

def authenticate(username, password)
  @username    = username
  @password = password
  self::Base.user = username
  self::Base.password = password
end

.resourcesObject



66
67
68
# File 'lib/unfuddle/unfuddle-api.rb', line 66

def resources
  @resources ||= []
end