Classes

The following classes are available globally.

  • An asset represents a media file in Contentful.

    See more

    Declaration

    Swift

    public class Asset : LocalizableResource, AssetDecodable
    extension Asset: EndpointAccessible
    extension Asset: ResourceQueryable
  • Client object for performing requests against the Contentful Delivery and Preview APIs.

    See more

    Declaration

    Swift

    open class Client
  • A ContentType represents your content model for entries in a Contentful space.

    See more

    Declaration

    Swift

    public class ContentType : Resource, FlatResource, Decodable, ResourceQueryable
    extension ContentType: EndpointAccessible
  • An Entry represents a typed collection of content, structured via fields, in Contentful.

    See more

    Declaration

    Swift

    public class Entry : LocalizableResource
    extension Entry: EndpointAccessible
    extension Entry: ResourceQueryable
  • Information regarding an error received from Contentful’s API.

    See more

    Declaration

    Swift

    public class APIError : Decodable, Error, CustomDebugStringConvertible
  • For requests that do hit the Contentful Delivery API enforces rate limits of 78 requests per second and 280800 requests per hour by default. Higher rate limits may apply depending on your current plan.

    See more

    Declaration

    Swift

    public final class RateLimitError : APIError
  • A Locale represents possible translations for Entry Fields

    See more

    Declaration

    Swift

    public class Locale : Resource, FlatResource, Decodable
    extension Locale: EndpointAccessible
  • The LocalizationContext contains meta information about a Spaces locales including information about which locale is the default, and what the fallback locale chain is.

    This contextual information is necessary to intiialize Entry and Asset instances properly so that the correct data is displayed for the currently selected locale. For instance, if a particular field for an Entry does not have data for the currently selected locale, the SDK will walk the fallback chain for this field until a non-null value is found, or full chain has been walked.

    See more

    Declaration

    Swift

    public class LocalizationContext
  • Small class to store location coordinates. This is used in preferences over CoreLocation types to avoid extra linking requirements for the SDK.

    See more

    Declaration

    Swift

    @objc
    public class Location : NSObject, Decodable, NSCoding
  • A small class to create parameters used for ordering the responses when querying an endpoint that returns a colleciton of resources. See: ChainableQuery.order(by order: Ordering...)

    See more

    Declaration

    Swift

    public class Ordering
  • A small class to create parameters used for ordering the responses when querying an endpoint that returns a collection of resources. This variation of an ordering takes a generic type parameter that conforms to ResourceQueryable in order to take advantage of the FieldKeys available on your type. See: ChainableQuery.order(by order: Ordering...)

    See more

    Declaration

    Swift

    public class Ordered<EntryType> : Ordering where EntryType : FieldKeysQueryable

KeyPath/Value operations.