Sha256: 4acd1d4fc2bd1002bf88b39fac8463ebd1ba5a3234602a368a5ca66968a910b7
Contents?: true
Size: 556 Bytes
Versions: 27
Compression:
Stored size: 556 Bytes
Contents
require "json" module Jess # Mobile device-related JSS API operations class MobileDevices attr_reader :http_client def initialize(http_client) @http_client = http_client end # Retrieve a mobile device by ID. def find(id) json = JSON.parse(http_client.get("mobiledevices/id/#{id}")) MobileDevice.new(json.fetch("mobile_device")) end # Get all mobile device IDs. def all_ids json = JSON.parse(http_client.get("mobiledevices")) json["mobile_devices"].map { |c| c["id"] } end end end
Version data entries
27 entries across 27 versions & 1 rubygems