damien-rivet / JamfKit

A Jamf Classic communication framework written in Swift
MIT License
41 stars 1 forks source link

Allow users to perform request(s) against the configured Jamf host #63

Closed damien-rivet closed 5 years ago

damien-rivet commented 6 years ago

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 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:

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.

erikberglund commented 6 years ago

This would be a great feature! +1

damien-rivet commented 5 years ago

Closing the issue for now, the JSS API is quite unstable and has already changed a lot since JamfKit was started.