பொமொடோரோ
அம்ச ஆதரவிற்கு app.capabilities-ஐயும் அனுமதிக்கு app.access மற்றும் host அனுமதிகளையும் சரிபார்க்கவும். எடுத்துக்காட்டுகள் செயற்கை மதிப்புகளைப் பயன்படுத்துகின்றன; அழைப்பதற்கு முன் பாதைகள், ID-கள், உள்ளீடுகள் மற்றும் வடிப்பான்களை மாற்றவும்.
வகை வரையறைகள்
type Subscription {
pomodoroSettingsChanged: Boolean!
pomodoroAction: PomodoroAction!
}
type Mutation {
pausePomodoro: PomodoroToday!
setPomodoroRemainingTime(remainingSec: Int!): PomodoroToday!
startPomodoro(durationSec: Int!): PomodoroToday!
stopPomodoro: PomodoroToday!
}
type Query {
pomodoroSettings: PomodoroSettings!
pomodoroToday: PomodoroToday!
}
scalar Instant
type PomodoroAction {
today: PomodoroToday!
completedState: PomodoroState
}
type PomodoroSettings {
workDurationMin: Int!
shortBreakDurationMin: Int!
longBreakDurationMin: Int!
pomodorosBeforeLongBreak: Int!
showNotification: Boolean!
playSoundOnComplete: Boolean!
soundPath: String!
originalSoundName: String!
}
enum PomodoroState {
WORK
SHORT_BREAK
LONG_BREAK
}
type PomodoroToday {
date: Instant!
completedCount: Int!
currentRound: Int!
timeLeftSec: Int!
totalTimeSec: Int!
isRunning: Boolean!
isPaused: Boolean!
state: PomodoroState!
}செயல்பாடுகள்
pomodoroSettingsChanged
பொமொடோரோ அமைப்புகள் மாறும்போது மாற்றச் சைகையைப் பெறவும்.
subscription pomodoroSettingsChanged {
pomodoroSettingsChanged
}pomodoroAction
பொமொடோரோ நேரங்காட்டிச் செயல்களின் புதுப்பிப்புகளைப் பெறவும்.
subscription pomodoroAction {
pomodoroAction { completedState }
}pausePomodoro
இயங்கும் பொமொடோரோ நேரங்காட்டியை இடைநிறுத்தவும்.
mutation pausePomodoro {
pausePomodoro { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}setPomodoroRemainingTime
இயங்கும் அல்லது இடைநிறுத்தப்பட்ட நேரங்காட்டியின் மீதமுள்ள நேரத்தை பூஜ்ஜியம் முதல் தற்போதைய சுற்றின் கால அளவு வரை வினாடிகளில் அமைக்கவும்.
mutation setPomodoroRemainingTime($remainingSec: Int!) {
setPomodoroRemainingTime(remainingSec: $remainingSec) { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}startPomodoro
கொடுக்கப்பட்ட வினாடி கால அளவுடன் பொமொடோரோ நேரங்காட்டியைத் தொடங்கவும்.
mutation startPomodoro($durationSec: Int!) {
startPomodoro(durationSec: $durationSec) { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}stopPomodoro
பொமொடோரோ நேரங்காட்டியை நிறுத்தி தற்போதைய சுற்றை மீட்டமைக்கவும்.
mutation stopPomodoro {
stopPomodoro { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}pomodoroSettings
சேமிக்கப்பட்ட பொமொடோரோ அமைப்புகளைப் பெறவும் (கால அளவுகள், தானாகத் தொடங்கும் கொடிகள், சுற்றுகள்).
query pomodoroSettings {
pomodoroSettings { workDurationMin shortBreakDurationMin longBreakDurationMin pomodorosBeforeLongBreak showNotification playSoundOnComplete soundPath originalSoundName }
}pomodoroToday
இன்றைய இயக்கநேரத் தகவலைப் பெறவும்: முடிந்த சுற்றுகள், தற்போதைய கட்டம், மீதமுள்ள நேரம் மற்றும் இயங்கும் நிலை.
query pomodoroToday {
pomodoroToday { date completedCount currentRound timeLeftSec totalTimeSec isRunning isPaused state }
}