CategoryRequest
public class CategoryRequest : MoltinRequest
An entry point to make API calls relating to Category
-
The API endpoint for this resource.
Declaration
Swift
public var endpoint: String -
A typealias which allows automatic casting of a collection to
[Category].Declaration
Swift
public typealias DefaultCollectionRequestHandler = CollectionRequestHandler<[Category]> -
A typealias which allows automatic casting of an object to
Category.Declaration
Swift
public typealias DefaultObjectRequestHandler = ObjectRequestHandler<Category> -
Return all instances of type
CategoryDeclaration
Swift
@discardableResult public func all(completionHandler: @escaping DefaultCollectionRequestHandler) -> MoltinRequestParameters
completionHandlerThe handler to be called on success or failure
Return Value
A instance of
MoltinRequestwhich encapsulates the request. -
Return all instances of type
Category, cast to typeT, which must beCodable.Declaration
Swift
@discardableResult public func all<T: Codable>(completionHandler: @escaping CollectionRequestHandler<[T]>) -> MoltinRequestParameters
completionHandlerThe handler to be called on success or failure
Return Value
A instance of
MoltinRequestwhich encapsulates the request. -
Return all instances of type
CategorybyidDeclaration
Swift
@discardableResult public func get(forID id: String, completionHandler: @escaping DefaultObjectRequestHandler) -> MoltinRequestParameters
forIDThe ID of the object
completionHandlerThe handler to be called on success or failure
Return Value
A instance of
MoltinRequestwhich encapsulates the request. -
Return all instances of type
Categorybyid, cast to typeT, which must beCodable.Declaration
Swift
@discardableResult public func get<T: Codable>(forID id: String, completionHandler: @escaping ObjectRequestHandler<T>) -> MoltinRequestParameters
forIDThe ID of the object
completionHandlerThe handler to be called on success or failure
Return Value
A instance of
MoltinRequestwhich encapsulates the request. -
Return the tree of
CategoryDeclaration
Swift
@discardableResult public func tree(completionHandler: @escaping DefaultCollectionRequestHandler) -> MoltinRequestParameters
completionHandlerThe handler to be called on success or failure
Return Value
A instance of
MoltinRequestwhich encapsulates the request. -
Return the tree of
Category, cast to typeT, which must beCodable.Declaration
Swift
@discardableResult public func tree<T: Codable>(completionHandler: @escaping CollectionRequestHandler<[T]>) -> MoltinRequestParameters
completionHandlerThe handler to be called on success or failure
Return Value
A instance of
MoltinRequestwhich encapsulates the request.
View on GitHub
CategoryRequest Class Reference