API リファレンス
通話
機能の対応状況は app.capabilities、認可は app.access とホストの権限で確認してください。例は合成値を使用しています。呼び出す前にパス、ID、入力、フィルターを置き換えてください。
型定義
graphql
type Mutation {
call(number: String!, showDialer: Boolean!): Boolean!
deleteCalls(query: String!): ActionResult!
}
type Query {
callCount(query: String!): Int!
calls(query: String!, offset: Int!, limit: Int!): [Call!]!
}
type ActionResult {
affectedCount: Int!
}
type Call {
typeCode: Int!
id: ID!
number: String!
name: String!
photo: String!
startedAt: Instant!
durationSec: Int!
type: CallType!
accountId: ID!
geo: PhoneGeo
tags: [Tag!]!
}
enum CallType {
INCOMING
OUTGOING
MISSED
VOICEMAIL
REJECTED
BLOCKED
ANSWERED_EXTERNALLY
UNKNOWN
}
enum DataType {
DEFAULT
AUDIO
VIDEO
IMAGE
SMS
CONTACT
NOTE
FEED_ENTRY
CALL
PACKAGE
FILE
APP_FILE
DOC
}
scalar Instant
type PhoneGeo {
country: String!
numberType: PhoneNumberType!
carrier: String!
description: String!
}
enum PhoneNumberType {
FIXED_LINE
MOBILE
FIXED_LINE_OR_MOBILE
TOLL_FREE
PREMIUM_RATE
SHARED_COST
PERSONAL_NUMBER
VOIP
PAGER
UAN
VOICEMAIL
}
type Tag {
id: ID!
name: String!
type: DataType!
count: Int!
}操作
mutation
call
指定した番号に電話をかけます。すぐに発信せず電話アプリのダイヤラーを開くには、showDialer を true にします。CALL_PHONE 権限が必要です。
graphql
# `showDialer` hands the number to the dialer instead of placing the
# call outright.
mutation call($number: String!, $showDialer: Boolean!) {
call(number: $number, showDialer: $showDialer)
}mutation
deleteCalls
クエリに一致する通話履歴を削除します。
graphql
mutation deleteCalls($query: String!) {
deleteCalls(query: $query) { affectedCount }
}query
callCount
クエリに一致する通話数を数えます。
graphql
query callCount($query: String!) {
callCount(query: $query)
}query
calls
通話履歴を検索します。すべて表示するには query を空にします。
graphql
query calls($query: String!, $offset: Int!, $limit: Int!) {
calls(query: $query, offset: $offset, limit: $limit) { typeCode id number name photo startedAt durationSec type }
}