PreferencesAPI
public enum PreferencesAPI
Caseless enumeration with static methods to send Preference Requests
-
Sends a request to get preferences from the API.
Declaration
Swift
public static func getPreferences(with parameters: Parameters? = nil, completion: ResponseCompletion<[Preference]> = nil)Parameters
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
-
Sends a request to create a new domain inside a named preference.
Declaration
Swift
public static func addDomain(domain: String, preferenceName: String, completion: ResponseCompletion<Bool> = nil)Parameters
domainThe new domain that will be created.
preferencePreferencein which the new domain will be created into.completionThe closure to be executed once the request has finished.
-
Sends a request to delete an existing domain inside a named preference.
Declaration
Swift
public static func deleteDomain(domain: String, preferenceName: String, completion: ResponseCompletion<Bool> = nil)Parameters
domainThe domain that will be deleted.
preferencePreferencein which the domain will be deleted from.completionThe closure to be executed once the request has finished.
-
Sends a request to select domain(s) inside a named preference.
Declaration
Swift
public static func selectDomains(domains: [String], preferenceName: String, isMultiSelect: Bool, completion: ResponseCompletion<Bool> = nil)Parameters
domainsArray of domain that will be selected.
preferencePreferencein which the domains will be selected from.completionThe closure to be executed once the request has finished.
View on GitHub
PreferencesAPI Enumeration Reference