module Tessera
Main module of OTRS wrapper
See 'tessera/configuration.rb' for more explanation how to set configuration
Class for searching through tickets
as params hash any of these in official docs could be used: http://doc.otrs.com/doc/api/otrs/5.0/Perl/Kernel/GenericInterface/Operation/Ticket/TicketSearch.pm.html
This is configuration class that allows you to set your config like so:
Tessera.configure
do |config|
config.username = 'jon' config.password = 'SuperSecret' config.base_url = 'https://otrs.com/otrs/nph-genericinterface.pl/Webservice/rest/'
end
or
by simply assigning params by themself:
config = Tessera::Configuration.new
config.username = 'jon' config.password = 'SuperSecret' config.base_url = 'otrs.com/otrs/nph-genericinterface.pl/Webservice/rest/' Tessera.configuration
= config
Request
class
Methods acepted:
GET POST PATCH
(basically it uses Net::HTTP, but other methods are not supported by API anyway…)
Endpoint is based on you yaml setting You can find a template in templates directory here in repository
Body gets assembled in (put name of class here) class :) (not here yet) TODO
return value is Net::HTTPResponse which has to be parsed TODO (put name of class here)
Collection of errors used in this library
Every time you want to raise one of these, you just go ahead and do:
raise Tessera::ConfigNotSet
, 'Your param'
Constants
- VERSION
Public Class Methods
# File lib/tessera.rb, line 44 def self.configuration @configuration ||= Configuration.new end
# File lib/tessera.rb, line 52 def self.configure yield(configuration) end
# File lib/tessera.rb, line 48 def self.reset @configuration = Configuration.new end