Airgram

Guides
/
/
Methods

api.getNetworkStatistics()

Returns network data usage statistics. Can be called before authorization

Parameters GetNetworkStatisticsParams:

NameTypeDescription
onlyCurrentboolean If true, returns only data for the current library launch
Returns ApiResponse interface:
interface ApiResponse {
  _: 'getNetworkStatistics' | 'error'
  airgram: Airgram
  request: {
    method: 'getNetworkStatistics'
    params: GetNetworkStatisticsParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}