Sha256: f4dbcebc0826abd45f83f4279ca475c07af252c2805d211c292d315997b26704

Contents?: true

Size: 1.21 KB

Versions: 18

Compression:

Stored size: 1.21 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

18 entries across 18 versions & 1 rubygems

Version Path
jess-1.2.1 lib/jess.rb
jess-1.2.0 lib/jess.rb
jess-1.1.3 lib/jess.rb
jess-1.1.2 lib/jess.rb
jess-1.1.1 lib/jess.rb
jess-1.1.0 lib/jess.rb
jess-1.0.0 lib/jess.rb
jess-0.10.1 lib/jess.rb
jess-0.10.0 lib/jess.rb
jess-0.9.0 lib/jess.rb
jess-0.8.0 lib/jess.rb
jess-0.7.0 lib/jess.rb
jess-0.6.0 lib/jess.rb
jess-0.5.0 lib/jess.rb
jess-0.4.0 lib/jess.rb
jess-0.3.0 lib/jess.rb
jess-0.2.0 lib/jess.rb
jess-0.1.0 lib/jess.rb