SwiftBombConfig

public struct SwiftBombConfig

A struct which the client app is required to instantiate and pass into the API instance containing the user’s API key, optional level of logging and user agent.

  • An enum specifying the various levels of logging the framework should make. None should be used in production.

    See more

    Declaration

    Swift

    public enum LoggingLevel
  • Designated initializer for creating a configuration object.

    Declaration

    Swift

    public init(apiKey: String, loggingLevel: LoggingLevel = .requestsAndResponses, userAgentIdentifier: String? = nil, networkingDelegate: SwiftBombNetworkingDelegate? = nil, urlRequestCachePolicy: NSURLRequest.CachePolicy = .useProtocolCachePolicy)

    Parameters

    apiKey

    Your API key for Giant Bomb. Get one from www.giantbomb.com/api.

    loggingLevel

    Optional level of logging SwiftBomb should make. See LoggingLevel for options.

    userAgentIdentifier

    Optional user agent to provide when making requests to the Giant Bomb API.

    networkingDelegate

    Optional object conforming to SwiftBombNetworkingDelegate which allows inspection and denial of requests being made by the library.

    urlRequestCachePolicy

    Optionally define how you would like the internal NSURLSession to handle caching. Defaults to the default policy of UserProtocolCachePolicy.