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
-
.authenticate(server, login, password) ⇒ Object
Sets up basic authentication credentials for all the resources.
- .resources ⇒ Object
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, login, password) @server = server @username = login @password = password self::Base.user = login self::Base.password = password resources.each do |klass| klass.site = klass.site_format % "http://#{login}:#{password}@#{server}/api/v2" end end |
.resources ⇒ Object
28 29 30 |
# File 'lib/mingle/mingle-api.rb', line 28 def resources @resources ||= [] end |