API Module: Connection - mschnitzer/open-build-service-api GitHub Wiki
The Connection module is being used to establish a connection to a Build Service instance.
Introduction
This module is being used to connect and authenticate to a Build Service instance and holds a relation to all other modules of this library. All other modules can be accessed via an OpenBuildServiceAPI::Connection instance.
How to Use
A simple connection to the main Build Service instance can be established via:
api = OpenBuildServiceAPI::Connection.new(username, password, api_endpoint: 'https://api.opensuse.org')
The username and password have to match the credentials you haved used on that Build Service instance. The api_endpoint does not need to be specified as the default is already https://api.opensuse.org. All options are listed here.
Instance Method: new
Establishes a new connection to an API endpoint of an Open Build Service.
Arguments:
username: Username under which the API requests will be performedpassword: Password of the API useropts: Hash of options to configure the API. Available Options:api_endpoint:String(default: https://api.opensuse.org)ca_file:String- path to a Certificate Authority file which should be used to verify the remote certificaterequest_timeout:Integer(default: 10) - defines the maximum of how long an API call can take to be executed (in case the remote server does not answer or takes too long)