Class Mu::Homepage
In: lib/mu/api/homepage.rb
Parent: Object

Methods

all   latest_test   new   queue_test   recent   status  

Included Modules

Helper

Attributes

cookie  [RW] 
docroot  [RW] 
errors  [RW] 
failed  [RW] 
host  [RW] 
password  [RW] 
posted_uuid  [RW] 
results  [RW] 
results  [RW] 
session_id  [RW] 
testsuite  [RW] 
username  [RW] 

Public Class methods

[Source]

# File lib/mu/api/homepage.rb, line 7
  def initialize(host=ENV['MU_IP'], username=ENV['MU_ADMIN_USER'], password=ENV['MU_ADMIN_PASS'])
    @host = host
    @username  = username
    @password  = password
    @docroot = "/api/v5/homepage/"
    @cookie = ""
    @response = nil
    @http = HttpHelper.new(@host, @username, @password, @docroot)
    msg "Created Homepage object to :#{@host}", Logger::DEBUG
  end

Public Instance methods

returns all homepage elements

[Source]

# File lib/mu/api/homepage.rb, line 19
  def all
    response = @http.get("all/")
    msg response, Logger::DEBUG
    return response
  end

returns the latest test

[Source]

# File lib/mu/api/homepage.rb, line 40
  def latest_test
    response = @http.get("test/latest/")
    msg response, Logger::DEBUG
    return response
  end

returns queued tests

[Source]

# File lib/mu/api/homepage.rb, line 47
  def queue_test
    response = @http.get("test/queue/")
    msg response, Logger::DEBUG
    return response
  end

returns recent homepage activity

[Source]

# File lib/mu/api/homepage.rb, line 26
  def recent
    response = @http.get("recent/")
    msg response, Logger::DEBUG
    return response
  end

returns homepage status

[Source]

# File lib/mu/api/homepage.rb, line 33
  def status
    response = @http.get("status/")
    msg response, Logger::DEBUG
    return response
  end

[Validate]