lib/simplemdm/installed_app.rb in simplemdm-1.1.3 vs lib/simplemdm/installed_app.rb in simplemdm-1.2.0
- old
+ new
@@ -1,4 +1,19 @@
module SimpleMDM
class InstalledApp < Base
+
+ def self.find(id)
+ hash, code = fetch("installed_apps/#{id}")
+
+ build hash['data']
+ end
+
+ def uninstall
+ raise "You cannot uninstall an unmanaged app" if !self.managed
+
+ hash, code = fetch("installed_apps/#{id}", :delete)
+
+ code == 202
+ end
+
end
end