API குறிப்பு

SMS

SMS/MMS செய்திகளைப் படிக்கவும் அனுப்பவும். SMS அனுமதி தேவை. Google Play பில்டில் கிடைக்கவில்லை.

வகை வரையறைகள்

bash
type Message {
  id: ID!
  body: String!
  address: String!       # phone number
  date: String!          # ISO 8601
  serviceCenter: String!
  read: Boolean!
  threadId: String!
  type: Int!             # 1=inbox 2=sent 3=draft 5=failed
  subscriptionId: Int!
  isMms: Boolean!
  attachments: [MessageAttachment!]!
}

type MessageAttachment {
  path: String!
  contentType: String!
  name: String!
}

type SmsConversation {
  id: String!
  address: String!
  snippet: String!
  date: String!
  messageCount: Int!
  read: Boolean!
}

type SmsCounts {
  inbox: Int!
  sent: Int!
  draft: Int!
  failed: Int!
}

செயல்பாடுகள்

query

sms

SMS செய்திகளைத் தேடவும். அனைத்தையும் பட்டியலிட query-யில் வெற்று சரத்தைப் பயன்படுத்தவும்.

bash
query GetSms($offset: Int!, $limit: Int!, $query: String!) {
  sms(offset: $offset, limit: $limit, query: $query) {
    id body address date read threadId type subscriptionId isMms
    attachments { path contentType name }
  }
}
query

smsCount

ஒரு query-யுடன் பொருந்தும் SMS செய்திகளை எண்ணவும்.

bash
query GetSmsCount($query: String!) {
  smsCount(query: $query)
}
query

smsConversations

SMS உரையாடல்களை (threads) பட்டியலிடவும், பக்கமிடப்பட்ட.

bash
query GetSmsConversations($offset: Int!, $limit: Int!, $query: String!) {
  smsConversations(offset: $offset, limit: $limit, query: $query) {
    id address snippet date messageCount read
  }
}
query

smsConversationCount

ஒரு query-யுடன் பொருந்தும் SMS உரையாடல்களை எண்ணவும்.

bash
query GetSmsConversationCount($query: String!) {
  smsConversationCount(query: $query)
}
query

smsAllCounts

அனைத்து SMS வகைகளுக்குமான எண்ணிக்கைகளை திருப்பி அனுப்பவும்.

bash
query GetSmsAllCounts {
  smsAllCounts { inbox sent draft failed }
}
query

archivedConversations

காப்பகப்படுத்தப்பட்ட (மறைக்கப்பட்ட) உரையாடல்களை பட்டியலிடவும்.

bash
query GetArchivedConversations {
  archivedConversations { id address snippet date messageCount read }
}
mutation

sendSms

ஒரு SMS அனுப்பவும். இயல்புநிலை SIM-ஐப் பயன்படுத்த subscriptionId=-1-ஐ அனுப்பவும்.

bash
mutation SendSms($number: String!, $body: String!, $subscriptionId: Int!) {
  sendSms(number: $number, body: $body, subscriptionId: $subscriptionId)
}
mutation

sendMms

இயல்புநிலை SMS செயலியை ஒரு MMS (ஒன்று அல்லது அதற்கு மேற்பட்ட இணைப்புகள்) உடன் முன்னரே நிரப்பி தொடங்கவும். நிலுவையில் உள்ள MMS id-ஐ திருப்பி அனுப்புகிறது; PlainApp அனுப்பிய நிலையை கண்காணித்து WebSocket நிகழ்வுகள் மூலம் வெற்றியைப் புகாரளிக்கிறது. attachmentPaths PlainApp-இன் AppFile store-இல் உள்ள கோப்புகளை (fid: URIs) சுட்டிக்காட்ட வேண்டும்.

bash
mutation SendMms($number: String!, $body: String!, $attachmentPaths: [String!]!, $threadId: String!) {
  sendMms(number: $number, body: $body, attachmentPaths: $attachmentPaths, threadId: $threadId)
}
mutation

archiveConversation

thread id மற்றும் தேதி மூலம் ஒரு உரையாடலை காப்பகப்படுத்தவும்.

bash
mutation ArchiveConversation($id: String!, $date: Long!) {
  archiveConversation(id: $id, date: $date)
}
mutation

unarchiveConversation

காப்பகத்திலிருந்து ஒரு உரையாடலை அகற்றவும்.

bash
mutation UnarchiveConversation($id: String!) {
  unarchiveConversation(id: $id)
}