FlowRequest
public class FlowRequest : MoltinRequest
An entry point to make API calls relating to Flow
and Entry
objects
-
The API endpoint for this resource.
Declaration
Swift
public var endpoint: String
-
The default collection handler type for
Flow
requestsDeclaration
Swift
public typealias DefaultFlowCollectionRequestHandler = CollectionRequestHandler<[Flow]>
-
The default object handler type for
Flow
requestsDeclaration
Swift
public typealias DefaultFlowObjectRequestHandler = ObjectRequestHandler<Flow>
-
The default collection handler type for
Entry
requestsDeclaration
Swift
public typealias DefaultEntryCollectionRequestHandler = CollectionRequestHandler<[Entry]>
-
The default object handler type for
Entry
requestsDeclaration
Swift
public typealias DefaultEntryObjectRequestHandler = ObjectRequestHandler<Entry>
-
Return all instances of type flow
- completionHandler: The handler to be called on success or failure
Declaration
Swift
public func all(completionHandler: @escaping DefaultFlowCollectionRequestHandler) -> MoltinRequest
-
Return get an instance of flow by
id
- forID: The ID of the object
- completionHandler: The handler to be called on success or failure
Declaration
Swift
public func get(forID id: String, completionHandler: @escaping DefaultFlowObjectRequestHandler) -> MoltinRequest
-
Return all entries for the flow with the slug
slug
- forSlug: The slug of the flow
- completionHandler: The handler to be called on success or failure
Declaration
Swift
public func entries(forSlug slug: String, completionHandler: @escaping DefaultEntryCollectionRequestHandler) -> MoltinRequest
-
Return all custom entries for the flow with the slug
slug
- forSlug: The slug of the flow
- completionHandler: The handler to be called on success or failure
Declaration
Swift
public func entries<T>(forSlug slug: String, completionHandler: @escaping CollectionRequestHandler<T>) -> MoltinRequest
-
Return an entry for the flow with the slug
slug
and an ID ofid
- forSlug: The slug of the flow
- forID: The ID of the entry
- completionHandler: The handler to be called on success or failure
Declaration
Swift
public func entry(forSlug slug: String, forID id: String, completionHandler: @escaping DefaultEntryObjectRequestHandler) -> MoltinRequest
-
Return a custom entry for the flow with the slug
slug
and an ID ofid
- forSlug: The slug of the flow
- forID: The ID of the entry
- completionHandler: The handler to be called on success or failure
Declaration
Swift
public func entry<T: Codable>(forSlug slug: String, forID id: String, completionHandler: @escaping ObjectRequestHandler<T>) -> MoltinRequest