Class: OpenWFE::RestClient

Inherits:
Object
  • Object
show all
Defined in:
lib/openwfe/orest/restclient.rb

Overview

A basic REST client for OpenWFE services (control and worklist)

Direct Known Subclasses

ControlClient, WorklistClient

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, username, password) ⇒ RestClient



55
56
57
58
59
60
61
# File 'lib/openwfe/orest/restclient.rb', line 55

def initialize (url, username, password)

    split_url(url)
    @username = username

    connect(password)
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



52
53
54
# File 'lib/openwfe/orest/restclient.rb', line 52

def host
  @host
end

#portObject (readonly)

Returns the value of attribute port.



52
53
54
# File 'lib/openwfe/orest/restclient.rb', line 52

def port
  @port
end

#resourceObject (readonly)

Returns the value of attribute resource.



52
53
54
# File 'lib/openwfe/orest/restclient.rb', line 52

def resource
  @resource
end

#session_idObject (readonly)

Returns the value of attribute session_id.



52
53
54
# File 'lib/openwfe/orest/restclient.rb', line 52

def session_id
  @session_id
end

Instance Method Details

#closeObject

Closes this REST client



66
67
68
# File 'lib/openwfe/orest/restclient.rb', line 66

def close
    get('endWorkSession', nil, {})
end