require "json" module Jess # Computer-related JSS API operations class Computers attr_reader :http_client def initialize(http_client) @http_client = http_client end # Retrieve a computer by ID. def find(id) json = JSON.parse(http_client.get("computers/id/#{id}")) Computer.new(json.fetch("computer")) end end end