ContentAPI

public enum ContentAPI

Caseless enumeration with static methods to send Content Requests

Pages

  • Sends a request to get content pages from the API.

    Declaration

    Swift

    public static func getContentPages(completion: ResponseCompletion<[ContentPage]> = nil)

    Parameters

    completion

    The 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

    name

    Internal name of the content page.

    completion

    The 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

    id

    ID of the content page.

    completion

    The closure to be executed once the request has finished.

Static Files

  • Sends a request to get static files from the API.

    Declaration

    Swift

    public static func getStaticFiles(completion: ResponseCompletion<[StaticFile]> = nil)

    Parameters

    completion

    The 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

    name

    Name of the static file.

    completion

    The closure to be executed once the request has finished.