Skip to content

Commit

Permalink
fix: add docs to DevCycleOptions methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathannorris committed Aug 10, 2023
1 parent 7ebcd5d commit b6aea5b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions DevCycle/Models/DevCycleOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class DevCycleOptions {
self.options = DevCycleOptions()
}

// Controls the interval between flushing events to the DevCycle servers in milliseconds, defaults to 10 seconds.
public func flushEventsIntervalMs(_ interval: Int? = 10000) -> OptionsBuilder {
self.options.flushEventsIntervalMs = interval
return self
Expand All @@ -35,41 +36,49 @@ public class DevCycleOptions {
return self
}

// Disables logging of SDK generated events (e.g. variableEvaluated, variableDefaulted) to DevCycle.
public func disableAutomaticEventLogging(_ disable: Bool) -> OptionsBuilder{
self.options.disableAutomaticEventLogging = disable
return self
}

// Disables logging of custom events generated by calling .track() method to DevCycle.
public func disableCustomEventLogging(_ disable: Bool) -> OptionsBuilder{
self.options.disableCustomEventLogging = disable
return self
}

// Controls the log level of the SDK, defaults to `error`
public func logLevel(_ level: LogLevel) -> OptionsBuilder {
self.options.logLevel = level
return self
}

// Enables the usage of EdgeDB for DevCycle that syncs User Data to DevCycle.
public func enableEdgeDB(_ enable: Bool) -> OptionsBuilder {
self.options.enableEdgeDB = enable
return self
}

// Disable the use of cached configs
public func disableConfigCache(_ disable: Bool) -> OptionsBuilder {
self.options.disableConfigCache = disable
return self
}

// The maximum allowed age of a cached config in milliseconds, defaults to 7 days
public func configCacheTTL(_ ttl: Int = 604800000) -> OptionsBuilder {
self.options.configCacheTTL = ttl
return self
}

// Disable Realtime Update and their SSE connection.
public func disableRealtimeUpdates(_ disable: Bool) -> OptionsBuilder {
self.options.disableRealtimeUpdates = disable
return self
}

// Allows the SDK to communicate with a proxy of DevCycle APIs.
public func apiProxyURL(_ proxyURL: String) -> OptionsBuilder {
self.options.apiProxyURL = proxyURL
return self
Expand Down

0 comments on commit b6aea5b

Please sign in to comment.