Media (Cross-Type)
பல மீடியா வகைகளில் (images, video, audio, docs) பரவிய செயல்பாடுகள்: bucket listing, டிராஷ், மீட்டெடுப்பு, மற்றும் மொத்த நீக்கம். டிராஷ்/மீட்டெடுப்புக்கு Android R+ (API 30+) தேவை.
வகை வரையறைகள்
type MediaBucket {
id: String! # media store bucket id
name: String! # display name (folder name)
count: Int!
}
type ActionResult {
type: DataType! # the DataType the operation ran on
query: String! # the query that was passed in
}
enum DataType {
AUDIO VIDEO IMAGE SMS CONTACT NOTE FEED_ENTRY CALL DOC PACKAGE FILE
}செயல்பாடுகள்
mediaBuckets
கொடுக்கப்பட்ட தரவு வகைக்கான (உதா. IMAGE, VIDEO) அனைத்து media-store buckets-ஐயும் பட்டியலிடவும். gallery UI-இல் "Folders" காட்சியை உருவாக்கப் பயன்படுகிறது.
query GetMediaBuckets($type: DataType!) {
mediaBuckets(type: $type) { id name count }
}deleteMediaItems
ஒரு query-யுடன் பொருந்தும் மீடியா உருப்படிகளை நிரந்தரமாக நீக்கவும். Android R+-இல் இது டிராஷ் செய்யப்பட்ட உருப்படிகளை நீக்குகிறது; பழைய பதிப்புகளில் பொருந்தும் உருப்படிகளை நேரடியாக நீக்குகிறது. Image index entries-ம் அகற்றப்படுகின்றன.
mutation DeleteMediaItems($type: DataType!, $query: String!) {
deleteMediaItems(type: $type, query: $query) { type query }
}trashMediaItems
ஒரு query-யுடன் பொருந்தும் மீடியா உருப்படிகளை சிஸ்டம் டிராஷுக்கு நகர்த்தவும். Android R+ தேவை. AUDIO/VIDEO-க்கு, உருப்படிகள் பிளேலிஸ்ட்டிலிருந்தும் அகற்றப்படுகின்றன.
mutation TrashMediaItems($type: DataType!, $query: String!) {
trashMediaItems(type: $type, query: $query) { type query }
}restoreMediaItems
ஒரு query-யுடன் பொருந்தும் டிராஷ் செய்யப்பட்ட மீடியா உருப்படிகளை மீட்டெடுக்கவும். Android R+ தேவை.
mutation RestoreMediaItems($type: DataType!, $query: String!) {
restoreMediaItems(type: $type, query: $query) { type query }
}