ContentAPI
public enum ContentAPI
Caseless enumeration with static methods to send Content Requests
-
Sends a request to get content pages from the API.
Declaration
Swift
public static func getContentPages(completion: ResponseCompletion<[ContentPage]> = nil)Parameters
completionThe closure to be executed once the request has finished.
-
Sends a request to get a specific content page with internalName.
Declaration
Swift
public static func getContentPage(name: String, completion: ResponseCompletion<ContentPage> = nil)Parameters
nameInternal name of the content page.
completionThe closure to be executed once the request has finished.
-
Sends a request to get a specific content page with ID.
Declaration
Swift
public static func getContentPage(id: Int, completion: ResponseCompletion<ContentPage> = nil)Parameters
idID of the content page.
completionThe closure to be executed once the request has finished.
-
Sends a request to get static files from the API.
Declaration
Swift
public static func getStaticFiles(completion: ResponseCompletion<[StaticFile]> = nil)Parameters
completionThe closure to be executed once the request has finished.
-
Sends a request to get a specific static file with name.
Declaration
Swift
public static func getStaticFile(name: String, completion: ResponseCompletion<StaticFile> = nil)Parameters
nameName of the static file.
completionThe closure to be executed once the request has finished.
View on GitHub
ContentAPI Enumeration Reference