Users of JamfKit can make the request toward the Jamf host on their own accord and simply pass the extracted JSON with the objects supplied by JamfKit to obtain instances of these.
But, to ease the development process, JamfKit can also supply the output of the request needed for each single object.
Missing functionnality
Users should be able to configure the current Jamf host parameters which are going to be used to preconfigure the URLRequest used by JamfKit.
Once the host configuration is fully completed (host, port, username, password) a singleton will allow users to retrieve the following for each type of object:
the fully configured (verb, url, headers, parameters, body) URLRequest for performing a request with the framework of their choice (they'll take care of parsing the result)
the output of the same request, everything related to JSON deserialization is taken care of, the result could be a single object, some objects or simply an error
Implementation
First off, JamfKit needs to supply a way of configuring the host, this can be done through a Singleton.
Once configuration is done, the same manager can supply different types of request based on each JSS objects (some endpoints are read-only, others are CRUD ready) for the users to consume with the framework of their choice (AFNetworking, Moya, Alamofire, NSURLSession, etc.).
The library could also perform NSURLSession requests for the user and simply return the instances of the objects that are expected from the request or an error if something went wrong.
New feature
Short description
Users of
JamfKit
can make the request toward the Jamf host on their own accord and simply pass the extracted JSON with the objects supplied byJamfKit
to obtain instances of these.But, to ease the development process,
JamfKit
can also supply the output of the request needed for each single object.Missing functionnality
Users should be able to configure the current Jamf host parameters which are going to be used to preconfigure the
URLRequest
used byJamfKit
.Once the host configuration is fully completed (host, port, username, password) a singleton will allow users to retrieve the following for each type of object:
URLRequest
for performing a request with the framework of their choice (they'll take care of parsing the result)Implementation
First off,
JamfKit
needs to supply a way of configuring the host, this can be done through a Singleton.Once configuration is done, the same manager can supply different types of request based on each JSS objects (some endpoints are read-only, others are CRUD ready) for the users to consume with the framework of their choice (AFNetworking, Moya, Alamofire, NSURLSession, etc.).
The library could also perform
NSURLSession
requests for the user and simply return the instances of the objects that are expected from the request or an error if something went wrong.