igpapi — Instagram private API Simulator for Node.js (API reference) 4.14.0
    Preparing search index...

    Type Alias BatterySimulation

    BatterySimulation:
        | { kind: "charging"; startedAtMs: number; startLevel: number }
        | {
            kind: "discharging";
            percentPerHour: number;
            startedAtMs: number;
            startLevel: number;
        }

    The parameters a device's battery reading is derived from, as a sum: the level at startedAtMs (0–100) and either the charge (a charging device holds its level) or the percent it loses per hour (a discharging one). A charging simulation has no discharge rate to be switched on later, and a discharging one has no charging flag to contradict its fields. The reading is computed at request time, so two requests at different times report different levels.