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
통화 기록 항목을 검색합니다. 모두 나열하려면 쿼리를 비워 두십시오.
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
쿼리와 일치하는 통화 수를 셉니다.
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
쿼리와 일치하는 통화 기록 항목을 삭제합니다.
bash
mutation DeleteCalls($query: String!) {
deleteCalls(query: $query)
}