FieldRequest

public class FieldRequest: MoltinRequest

An entry point to make API calls relating to Field

  • The API endpoint for this resource.

    Declaration

    Swift

    public var endpoint: String = "/fields"
  • A typealias which allows automatic casting of a collection to [Field].

    Declaration

    Swift

    public typealias DefaultCollectionRequestHandler = CollectionRequestHandler<[Field]>
  • A typealias which allows automatic casting of an object to Field.

    Declaration

    Swift

    public typealias DefaultObjectRequestHandler = ObjectRequestHandler<Field>
  • Return all instances of type Field

    Author

    Craig Tweedy

    Declaration

    Swift

    @discardableResult public func all(completionHandler: @escaping DefaultCollectionRequestHandler) -> MoltinRequest

    Parameters

    completionHandler

    The handler to be called on success or failure

    Return Value

    A instance of MoltinRequest which encapsulates the request.

  • Return all instances of type Field by id

    Author

    Craig Tweedy

    Declaration

    Swift

    @discardableResult public func get(forID id: String, completionHandler: @escaping DefaultObjectRequestHandler) -> MoltinRequest

    Parameters

    forID

    The ID of the object

    completionHandler

    The handler to be called on success or failure

    Return Value

    A instance of MoltinRequest which encapsulates the request.