Riferimento API

Chiamate

Accede allo storico delle chiamate e alle informazioni SIM. Richiede l'autorizzazione READ_CALL_LOG.

Definizioni di tipo

bash
type Call {
  id: ID!
  number: String!
  name: String!            # display name from contacts
  photoId: String!         # use GET /fs?id=<photoId>
  startedAt: String!       # ISO 8601
  duration: Int!           # seconds
  type: Int!               # 1=incoming 2=outgoing 3=missed 4=voicemail 5=rejected 6=blocked
  accountId: String!       # SIM slot / account id
  geo: String!             # geographic label for the number
}

type Sim {
  id: String!
  label: String!
  number: String!
  subscriptionId: Int!
}

Operazioni

query

calls

Cerca le voci del registro chiamate. Lascia la query vuota per elencarle tutte.

bash
query GetCalls($offset: Int!, $limit: Int!, $query: String!) {
  calls(offset: $offset, limit: $limit, query: $query) {
    id number name photoId startedAt duration type accountId geo
  }
}
query

callCount

Conta le chiamate corrispondenti a una query.

bash
query GetCallCount($query: String!) {
  callCount(query: $query)
}
query

sims

Elenca tutte le schede SIM / account telefonici disponibili sul dispositivo.

bash
query GetSims {
  sims { id label number subscriptionId }
}
mutation

call

Avvia una chiamata telefonica al numero indicato. Imposta showDialer su true per aprire il dialer dell'app telefono invece di chiamare immediatamente. Richiede l'autorizzazione CALL_PHONE.

bash
mutation Call($number: String!, $showDialer: Boolean!) {
  call(number: $number, showDialer: $showDialer)
}
mutation

deleteCalls

Elimina le voci del registro chiamate corrispondenti a una query.

bash
mutation DeleteCalls($query: String!) {
  deleteCalls(query: $query)
}