Statistic
public struct Statistic : Codable
The Statistic
struct represents the enclosing structure of statistics
returning from the various stat API calls. It contains the
date of the aggregated time period, along with the raw stats.
-
The date for this statistic set.
Declaration
Swift
public let date: Date
-
The individual stat samples that make up this collection.
Declaration
Swift
public let stats: [Statistic.Sample]
-
Initializes the struct.
Declaration
Swift
public init(date: Date, stats: [Statistic.Sample])
Parameters
date
The date for this statistic set.
stats
The individual stat samples that make up this collection.
-
The
See moreStatistic.Metric
struct represents the raw statistics for a given time period.Declaration
Swift
struct Metric : Codable
-
The
See moreStatistic.Sample
struct represents a single group of statistics, with the raw stats being made available via themetrics
property.Declaration
Swift
struct Sample : Codable
-
Represents the various aggregation methods a stats call can have.
- day: Statistic aggregated by day.
- week: Statistics aggregated by week.
- month: Statistics aggregated by month.
Declaration
Swift
enum Aggregation : String, Codable