Module: MingleAPI

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

Overview

This library is a small wrapper around the REST interface

Defined Under Namespace

Classes: Base, Card, Comment, Error, Project

Class Method Summary collapse

Class Method Details

.authenticate(server, login, password) ⇒ Object

Sets up basic authentication credentials for all the resources.



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/mingle/mingle-api.rb', line 16

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

  resources.each do |klass|
    klass.site = klass.site_format % "http://#{}:#{password}@#{server}/api/v2"
  end
end

.resourcesObject



28
29
30
# File 'lib/mingle/mingle-api.rb', line 28

def resources
  @resources ||= []
end