API संदर्भ

Calls

कॉल इतिहास और SIM जानकारी एक्सेस करें। READ_CALL_LOG अनुमति आवश्यक।

प्रकार परिभाषाएँ

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!
}

ऑपरेशन

query

calls

कॉल लॉग प्रविष्टियाँ खोजें। सभी सूचीबद्ध करने के लिए query खाली छोड़ें।

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

किसी query से मेल खाने वाली कॉल की गणना करें।

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

sims

डिवाइस पर उपलब्ध सभी SIM कार्ड / फ़ोन खातों को सूचीबद्ध करें।

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

call

दिए गए नंबर पर फ़ोन कॉल शुरू करें। तुरंत कॉल करने के बजाय फ़ोन ऐप डायलर खोलने के लिए showDialer को true पर सेट करें। CALL_PHONE अनुमति आवश्यक।

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

deleteCalls

किसी query से मेल खाने वाली कॉल लॉग प्रविष्टियाँ हटाएँ।

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