Other Classes

The following classes are available globally.

  • An abstract API client.

    Warning

    Not meant to be used directly. See Client or PlacesClient instead.

    Stateful hosts

    In order to avoid hitting timeouts at every request when one or more hosts are not working properly (whatever the reason: DNS failure, no route to host, server down…), the client maintains a known status for each host. That status can be either up, down or unknown. Initially, all hosts are in the unknown state. Then a given host’s status is updated whenever a request to it returns a response or an error.

    When a host is flagged as down, it will not be considered for subsequent requests. However, to avoid discarding hosts permanently, statuses are only remembered for a given timeframe, indicated by hostStatusTimeout. (You may adjust it as needed, although the default value defaultHostStatusTimeout should make sense for most applications.)

    See more

    Declaration

    Swift

    @objcMembers
    public class AbstractClient : NSObject
  • An abstract search query.

    Warning

    This class is not meant to be used directly. Please see Query or PlacesQuery instead.

    KVO

    Every parameter is observable via KVO under its own name.

    See more

    Declaration

    Swift

    @objc
    open class AbstractQuery : NSObject, NSCopying
  • Per-request options. This class allows specifying options at the request level, overriding default options at the Client level.

    Note

    These are reserved for advanced use cases. In most situations, they shouldn’t be needed.
    See more

    Declaration

    Swift

    @objc
    public class RequestOptions : NSObject, NSCopying