Sha256: d0c3e744778755d965c31f826f1e34a8fc421e0ede6d0d0e04c86723aa210e02

Contents?: true

Size: 1.2 KB

Versions: 7

Compression:

Stored size: 1.2 KB

Contents

require "jess/version"

# Jess is a lightweight client for the JAMF Software Server (JSS) API.
#
# Example usage:
#
# conn = Jess.connect("https://jsshost", username: "user", password: "secret")
# computer = conn.computers.find(1234)
# computer.id             # => 1234
# computer.name           # => "Matt's iMac"
# computer.hardware.model # => "iMac Intel (Retina 5k, 27-Inch, Late 2015)"
#
module Jess
  autoload :Computer, "jess/computer"
  autoload :Computers, "jess/computers"
  autoload :Connection, "jess/connection"
  autoload :ExtensionAttributes, "jess/extension_attributes"
  autoload :HttpClient, "jess/http_client"
  autoload :MobileDevice, "jess/mobile_device"
  autoload :MobileDevices, "jess/mobile_devices"
  autoload :Resource, "jess/resource"

  # Establish a connection with JSS and return a Jess::Connection object that
  # can be used to interact with the JSS API. This is a convenience method. For
  # more fine-grained control over the connection, create a Jess::HttpClient
  # using the desired options, then pass it to Jess::Connection.new.
  #
  def self.connect(url, username:, password:)
    client = HttpClient.new(url, username: username, password: password)
    Connection.new(client)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
jess-1.3.2 lib/jess.rb
jess-1.3.1 lib/jess.rb
jess-1.3.0 lib/jess.rb
jess-1.2.5 lib/jess.rb
jess-1.2.4 lib/jess.rb
jess-1.2.3 lib/jess.rb
jess-1.2.2 lib/jess.rb