Documentation
¶
Index ¶
- func PrettyYAML(t *Task) string
- type APIResponse
- type Account
- type Context
- type Environment
- type EnvironmentWithKey
- type Error
- type FetchTasksMsg
- type Folder
- type Goal
- type Item
- type PaginatedAPIResponse
- type PaginatedInfo
- type RefreshPropertiesMsg
- type RefreshTasksMsg
- type RefreshUIMsg
- type ReturnMsg
- type RichTask
- func (t RichTask) AddedString() string
- func (t RichTask) CompletedString() string
- func (t RichTask) DueString() string
- func (t RichTask) LengthString() string
- func (t RichTask) Link() string
- func (t RichTask) ModifiedString() string
- func (t RichTask) PriorityString() string
- func (t RichTask) RepeatString() string
- func (t RichTask) StarString() string
- func (t RichTask) StatusString() string
- func (t RichTask) TagString() string
- func (t RichTask) ThatContext() Context
- func (t RichTask) ThatFolder() Folder
- func (t RichTask) ThatGoal() Goal
- func (t RichTask) TheDueDate() time.Time
- func (t RichTask) TheDueTime() time.Time
- func (t RichTask) TimerString() string
- type SavedSearch
- type SearchGroup
- type SearchGroupItem
- type SidebarItemChangeMsg
- type StatusMsg
- type Task
- type TaskDeleteItem
- type TaskDeleted
- type TaskEdit
- type TaskEditableFormatted
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrettyYAML ¶
Types ¶
type APIResponse ¶
type APIResponse struct { // code Code int64 `json:"code,omitempty"` // message Message string `json:"message,omitempty"` // type Type string `json:"type,omitempty"` }
APIResponse Api response
swagger:model ApiResponse
func (*APIResponse) ContextValidate ¶
ContextValidate validates this Api response based on context it is used
func (*APIResponse) MarshalBinary ¶
func (m *APIResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*APIResponse) UnmarshalBinary ¶
func (m *APIResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Account ¶
type Account struct { // The user's display name on the website. Alias string `json:"alias,omitempty"` // The user's prefered format for representing dates. (0=M D, Y, 1=M/D/Y, 2=D/M/Y, 3=Y-M-D) Dateformat int32 `json:"dateformat,omitempty"` // The user's login email address. Email string `json:"email,omitempty"` // If the task is due this many months into the future, the user wants them to be hidde Hidemonths int32 `json:"hidemonths,omitempty"` // The due date lead-time by which tasks should will appear on the hotlist. Hotlistduedate int32 `json:"hotlistduedate,omitempty"` // The priority value above which tasks should appear on the hotlist. Hotlistpriority int32 `json:"hotlistpriority,omitempty"` // A timestamp that indicates the last time that any note was deleted from this account. You can quickly check this field to determine if you need to identify and remove notes from your application. LastdeleteNote int32 `json:"lastdelete_note,omitempty"` // A timestamp that indicates the last time that any task was deleted from this account. You can quickly check this field to determine if you need to identify and remove tasks from your application. LastdeleteTask int32 `json:"lastdelete_task,omitempty"` // A timestamp that indicates the last time that a context was added, edited or deleted. You can quickly check this field to determine if you need to refresh your cached context list. LasteditContext int32 `json:"lastedit_context,omitempty"` // A timestamp that indicates the last time that any task was added or edited on this account. You can quickly check this field to determine if you need to download updates. LasteditFolder int32 `json:"lastedit_folder,omitempty"` // A timestamp that indicates the last time that a goal was edited, edited or deleted. You can quickly check this field to determine if you need to refresh your cached goal list. LasteditGoal int32 `json:"lastedit_goal,omitempty"` // A timestamp that indicates the last time that any list was edited on this account. You can quickly check this field to determine if you need to sync lists. LasteditList int32 `json:"lastedit_list,omitempty"` // A timestamp that indicates the last time that a context was added, edited or deleted. You can quickly check this field to determine if you need to refresh your cached context list. LasteditLocation int32 `json:"lastedit_location,omitempty"` // A timestamp that indicates the last time that any note was added or edited on this account. You can quickly check this field to determine if you need to download updates. LasteditNote int32 `json:"lastedit_note,omitempty"` // A timestamp that indicates the last time that any outline was edited on this account. You can quickly check this field to determine if you need to sync outlines. LasteditOutline int32 `json:"lastedit_outline,omitempty"` // A timestamp that indicates the last time that any task was added or edited on this account. You can quickly check this field to determine if you need to download updates. LasteditTask int32 `json:"lastedit_task,omitempty"` // Whether or not the user is a Silver or Gold Subscriber. You need to know this if you want to use subtasks. A value of 0 means a free account. 1 means Silver and 2 means Gold or higher. Pro int32 `json:"pro,omitempty"` // The user's preference for viewing counters showing the number of tasks in each section. Showtabnums int32 `json:"showtabnums,omitempty"` // The number of half hours that the user's timezone is offset from the server's timezone. A value of -4 means that the user's timezone is 2 hours earlier than the server's timezone. The server is in the Eastern Standard Timezone. Timezone int32 `json:"timezone,omitempty"` // A unique string that identifies the user. You will need to store this and compare when a user re-authenticates their account to make sure you are syncing with the same account. Userid string `json:"userid,omitempty"` }
Account account
swagger:model Account
func (*Account) ContextValidate ¶
ContextValidate validates this account based on context it is used
func (*Account) MarshalBinary ¶
MarshalBinary interface implementation
func (*Account) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Context ¶
type Context struct { // id ID int64 `json:"id,omitempty"` // name Name string `json:"name,omitempty"` // private Private int64 `json:"private,omitempty"` }
Context context
swagger:model Context
func (*Context) ContextValidate ¶
ContextValidate validates this context based on context it is used
func (*Context) MarshalBinary ¶
MarshalBinary interface implementation
func (*Context) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Environment ¶
type Environment struct { Name string `json:"name,omitempty"` Space string `json:"space,omitempty"` Project string `json:"project,omitempty"` DefaultAssignee string `json:"default-assignee,omitempty"` DefaultAssigner string `json:"default-assigner,omitempty"` }
Environment is a model for environment.
type EnvironmentWithKey ¶
type EnvironmentWithKey struct { Environment Key string }
type Error ¶
type Error struct { // error code // Required: true ErrorCode *int64 `json:"errorCode"` // error desc // Required: true ErrorDesc *string `json:"errorDesc"` }
Error error
swagger:model Error
func (*Error) ContextValidate ¶
ContextValidate validates this error based on context it is used
func (*Error) MarshalBinary ¶
MarshalBinary interface implementation
func (*Error) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type FetchTasksMsg ¶
type FetchTasksMsg struct {
IsHardRefresh bool
}
type Folder ¶
type Folder struct { // archived Archived int64 `json:"archived,omitempty"` // id ID int64 `json:"id,omitempty"` // name Name string `json:"name,omitempty"` // ord Ord int64 `json:"ord,omitempty"` // private Private int64 `json:"private,omitempty"` }
Folder folder
swagger:model Folder
func (*Folder) ContextValidate ¶
ContextValidate validates this folder based on context it is used
func (*Folder) MarshalBinary ¶
MarshalBinary interface implementation
func (*Folder) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Goal ¶
type Goal struct { // archived Archived int64 `json:"archived,omitempty"` // contributes Contributes int64 `json:"contributes,omitempty"` // id ID int64 `json:"id,omitempty"` // level Level int64 `json:"level,omitempty"` // name Name string `json:"name,omitempty"` // note Note string `json:"note,omitempty"` // private Private int64 `json:"private,omitempty"` }
Goal goal
swagger:model Goal
func (*Goal) ContextValidate ¶
ContextValidate validates this goal based on context it is used
func (*Goal) MarshalBinary ¶
MarshalBinary interface implementation
func (*Goal) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
func (Item) Description ¶
func (Item) FilterValue ¶
type PaginatedAPIResponse ¶
type PaginatedAPIResponse []interface{}
PaginatedAPIResponse paginated Api response
swagger:model PaginatedApiResponse
func (PaginatedAPIResponse) ContextValidate ¶
ContextValidate validates this paginated Api response based on context it is used
type PaginatedInfo ¶
type PaginatedInfo struct { // num Num int64 `json:"num,omitempty"` // total Total int64 `json:"total,omitempty"` }
PaginatedInfo paginated info
swagger:model PaginatedInfo
func (*PaginatedInfo) ContextValidate ¶
ContextValidate validates this paginated info based on context it is used
func (*PaginatedInfo) MarshalBinary ¶
func (m *PaginatedInfo) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PaginatedInfo) UnmarshalBinary ¶
func (m *PaginatedInfo) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type RefreshPropertiesMsg ¶
type RefreshPropertiesMsg struct { }
RefreshPropertiesMsg refresh context, goals, folders etc.
type RefreshUIMsg ¶
type RefreshUIMsg struct { }
RefreshUIMsg refreshes UI actually, did nothing in Update().
type ReturnMsg ¶
type ReturnMsg struct { }
ReturnMsg is a message for return parent component, just like tea.Quit.
type RichTask ¶
type RichTask struct { Task TheContext *Context `json:"the_context"` TheFolder *Folder `json:"the_folder"` TheGoal *Goal `json:"the_goal"` }
func (RichTask) AddedString ¶
func (RichTask) CompletedString ¶
func (RichTask) LengthString ¶
func (RichTask) ModifiedString ¶
func (RichTask) PriorityString ¶
func (RichTask) RepeatString ¶
func (RichTask) StarString ¶
func (RichTask) StatusString ¶
func (RichTask) ThatContext ¶
ThatContext returns the context of the task if the context is not set, it returns a default context.
func (RichTask) ThatFolder ¶
ThatFolder returns the folder of the task if the folder is not set, it returns a default folder.
func (RichTask) ThatGoal ¶
ThatGoal returns the goal of the task if the goal is not set, it returns a default goal.
func (RichTask) TheDueDate ¶
func (RichTask) TheDueTime ¶
func (RichTask) TimerString ¶
TimerString return the timer string of the task if timer is on, * will be added in the front.
type SavedSearch ¶
type SavedSearch struct { // Indicates the state of the "Match" option for a search. There are two possible values. "All" means that all the root rules and groups must match (The outer boolean will be AND and the inner boolean will be OR). "Any" means that only one of the root rules or groups must match (The outer boolean will be OR and the inner boolean will be AND). Bool string `json:"bool,omitempty"` // The id number of the saved search. This is unique per user, but two different users may have different searches with the same id. ID int64 `json:"id,omitempty"` // The display name for the saved search, up to 32 characters. Name string `json:"name,omitempty"` // In the JSON return format, this contains the nested rules for the saved search. Each group will have a numerical index (which may or may not be consecutive). Order does not matter. Search map[string]SearchGroup `json:"search,omitempty"` }
SavedSearch saved search
swagger:model SavedSearch
func (*SavedSearch) ContextValidate ¶
ContextValidate validate this saved search based on the context it is used
func (*SavedSearch) MarshalBinary ¶
func (m *SavedSearch) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SavedSearch) UnmarshalBinary ¶
func (m *SavedSearch) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SearchGroup ¶
type SearchGroup map[string]SearchGroupItem
SearchGroup search group
swagger:model SearchGroup
func (SearchGroup) ContextValidate ¶
ContextValidate validate this search group based on the context it is used
type SearchGroupItem ¶
type SearchGroupItem struct { // The name of the field being inspected. Field string `json:"field,omitempty"` // The type of search being performed. // - contains : Matches a string if it contains this substring // - yes : Boolean true // - is : Exact value match // - begins with : Matches a string if it starts with this substring // - ends with : Matches a string if it ends with this substring // - does not contain : Matches a string if it does not contain this substring // - no : Boolean false // - is not : Exact value mismatch // - is after : Matches a date if it comes after this value // - is more than : Matches a number if it comes after this value // - is before : Matches a date if it comes before this value // - is less than : Matches a number if it comes before this value // - was in the last : Matches a date if it was in the last X days // - was not in the last : Matches a date if it was not in the last X days // - is in the next : Matches a date if it is in the next X days // - is not in the next : Matches a date if it is not in the next X days // - is in : Matches a date if it is in exactly X days // - is not in : Matches a date if it is not in exactly X days // - was : Matches a date if it was exactly X days ago // - was not : Matches a date if it was not exactly X days ago // - exists : Matches if the field has a non-zero value // - does not exist : Matches if the field is empty or zero // Type string `json:"type,omitempty"` // The value to search with. Value string `json:"value,omitempty"` }
SearchGroupItem search group item
swagger:model SearchGroupItem
func (*SearchGroupItem) ContextValidate ¶
ContextValidate validates this search group item based on context it is used
func (*SearchGroupItem) MarshalBinary ¶
func (m *SearchGroupItem) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SearchGroupItem) UnmarshalBinary ¶
func (m *SearchGroupItem) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SidebarItemChangeMsg ¶
type SidebarItemChangeMsg struct {
// contains filtered or unexported fields
}
func NewSidebarItemChangeMsg ¶
func NewSidebarItemChangeMsg(tab string, item Item) *SidebarItemChangeMsg
func (SidebarItemChangeMsg) Item ¶
func (m SidebarItemChangeMsg) Item() Item
func (SidebarItemChangeMsg) Tab ¶
func (m SidebarItemChangeMsg) Tab() string
type StatusMsg ¶
type StatusMsg struct { Mode string ClearMode bool Message string ClearMessage bool Info1 string ClearInfo1 bool Info2 string ClearInfo2 bool }
StatusMsg is a message for status.
type Task ¶
type Task struct { // A GMT unix timestamp for when the task was last modified. Added int64 `json:"added,omitempty"` // The user id of the collaborator who assigned the task (Subscription required for user). Addedby int64 `json:"addedby,omitempty"` // An array of attachment items. Each item will contain the following three fields. Attachments are currently read only. You can use the id number to reference the outline, list or note that you can get via this API. File's are not currently readable, but we plan to add this functionality soon. // id: The unique id number for the attachment // kind: The kind of attachment (file,note,outline,list) // name: The display name of the attachment // Attatchment string `json:"attatchment,omitempty"` // This is used with Subscriptions that have access to subtasks. This will indicate the number of child tasks that this task has. This will be 0 for subtasks or for regular tasks without subtasks. Children int64 `json:"children,omitempty"` // A GMT unix timestamp for when the task was completed. If the task is not completed, the value will be 0. Toodledo does not track the time that a task was completed, so tasks will always appear to be completed at noon. Completed int64 `json:"completed,omitempty"` // The id number of the context. Omit this field or set it to 0 to leave the task unassigned to a context. Context int64 `json:"context,omitempty"` // A GMT unix timestamp for when the task is due. The time component of this timestamp doesn't matter. When fetching from the server, it will always be noon. Duedate int64 `json:"duedate,omitempty"` // An integer representing the due date modifier. // 0 = Due By // 1 = Due On (=) // 2 = Due After (>) // 3 = Optionally (?) // Duedatemod int64 `json:"duedatemod"` // A GMT unix timestamp for when the task is due. If the task does not have a time set, then this will be 0. If the task has a duetime without a duedate set, then the date component of this timestamp will be Jan 1, 1970. Times are stored as floating times. In other words, 10am is always 10am, regardless of your timezone. You can convert this timestamp to a GMT string and display the time component without worrying about timezones. Duetime int64 `json:"duetime,omitempty"` // The id number of the folder. Omit this field or set it to 0 to leave the task unassigned to a folder. Folder int64 `json:"folder,omitempty"` // The id number of the goal. Omit this field or set it to 0 to leave the task unassigned to a goal. Goal int64 `json:"goal,omitempty"` // The server id number for this task. It is guaranteed to be unique per account, but two different accounts may have two different tasks with the same id number. ID int64 `json:"id,omitempty"` // An integer representing the number of minutes that the task will take to complete. Length int64 `json:"length,omitempty"` // The id number of the location. Omit this field or set it to 0 to leave the task unassigned to a location. Location int64 `json:"location,omitempty"` // A text string up to 1024 bytes long for storing metadata about the task. This is useful for syncing data that cannot otherwise be synced to Toodledo. This data is unique per task ID. This data is private to your App ID. Neither the user, nor other App IDs can see the data that you put in here. Because of an implementation detail, using the meta field introduces extra latency to each API call, so you should only use this field when necessary. Meta string `json:"meta,omitempty"` // A GMT unix timestamp for when the task was last modified. Modified int64 `json:"modified,omitempty"` // A text string up to 32,000 bytes long. New lines should be sent as \n. Note string `json:"note,omitempty"` // This is used with Subscriptions that have access to subtasks. This is an integer that indicates the manual order of subtasks within the parent task. Currently this is read-only. Order int64 `json:"order,omitempty"` // This is used with Subscriptions that have access to subtasks. To create a subtask, set this to the id number of the parent task. The default is 0, which creates a normal task. Parent int64 `json:"parent,omitempty"` // If the task was repeated from another task, this will contain the id number of the previous version of this task. Previous int64 `json:"previous,omitempty"` // An integer that represents the priority. // -1 = Negative // 0 = Low // 1 = Medium // 2 = High // 3 = Top // Priority int64 `json:"priority"` // A read-only field that contains the id number of the task that this task is a reference to. This is useful for tasks that are created from another task. Ref string `json:"ref,omitempty"` // An integer that represents the number of minutes prior to the duedate/time that a reminder will be sent. Set it to 0 for no reminder. Values will be constrained to this list of valid numbers (0, 1, 15, 30, 45, 60, 90, 120, 180, 240, 1440, 2880, 4320, 5760, 7200, 8640, 10080, 20160, 43200). Additionally, if the user does not have a Subscription, the only valid numbers are 0,60. If you submit an invalid number, it will be rounded up or down to a valid non zero value. Remind int64 `json:"remind,omitempty"` // A string indicating how the task repeats. When a task is rescheduled, it is moved forward to the new date. For record keeping purposes, a completed copy of this task will be added to the user's list. It will have a new ID number and will be already completed. To make a task no longer repeat, set this field to an empty string. // // This string is in the standard iCal RRULE format. For example: "FREQ=DAILY" or "FREQ=WEEKLY;BYDAY=TU". Not every valid iCal RRULE is understood by Toodledo, but we will be improving our ability to understand more options in the future. Please read our repeat format FAQ for details about how we can currently repeat tasks. Note that users enter their repeat settings using a GUI or by typing a human readable string. These get converted to iCal rules behind the scenes. // // There are three enhancements to the iCal RRULE format that we have made to support some advanced Toodledo features. // Subtasks can repeat based on their parent's repeat value. There is not a comparable iCal RRULE for this, so we have a custom RRULE of "PARENT" to indicate this setting. // Tasks can be set to repeat from their due-date or their completion date. There is not a way to indicate this in a standard iCAL RRULE. To indicate this, we have a custom string of ";FROMCOMP" that we append to the RRULE if the task is set to repeat from the completion date. The absence of this string means that the task repeats from the due-date. // Normally, when a task is rescheduled it moves forwards by 1 occurrence. If the user has procrastinated, the new due-date could still be in the past. Toodledo will have the option to indicate that certain repeating tasks should be rescheduled to the next future occurance of the task. If this is the case, the custom ";FASTFORWARD" string will be appended to the RRULE. // Repeat string `json:"repeat,omitempty"` Shared int64 `json:"shared,omitempty"` Sharedowner int64 `json:"sharedowner,omitempty"` Sharedwith int64 `json:"sharedwith,omitempty"` // A boolean (0 or 1) that indicates if the task has a star or not. Star int64 `json:"star"` // A GMT unix timestamp for when the task starts. The time component of this timestamp will always be noon. Startdate int64 `json:"startdate,omitempty"` // A GMT unix timestamp for when the task starts. If the task does not have a time set, then this will be 0. If the task has a starttime without a startdate set, then the date component of this timestamp will be Jan 1, 1970. Times are stored as floating times. In other words, 10am is always 10am, regardless of your timezone. You can convert this timestamp to a GMT string and display the time component without worrying about timezones. Starttime int64 `json:"starttime,omitempty"` // An integer that represents the status of the task. // 0 = None // 1 = Next Action // 2 = Active // 3 = Planning // 4 = Delegated // 5 = Waiting // 6 = Hold // 7 = Postponed // 8 = Someday // 9 = Canceled // 10 = Reference // Status int64 `json:"status"` // A comma separated string listing the tags assigned to this task. Up to 250 characters. Tag string `json:"tag,omitempty"` // The value in the timer field indicates the number of seconds that have elapsed for the timer not including the current session. Timer int64 `json:"timer,omitempty"` // If the timer is currently on, this will contain a unix timestamp indicating the last time that the timer was started. Therefore, if the timer is currently on, you will need to calculate the elapsed time when you present it to the user. This calculation is: Total Time=timer+(now-timeron). Where "now" is a unix timestamp for the current time. Timeron int64 `json:"timeron,omitempty"` // A string for the name of the task. Up to 255 characters. Title string `json:"title,omitempty"` // A read-only field that indicates how the task was added. These are the possible values: // 0: Main website // 1: Email Import // 2: Firefox Addon // 3: This API // 4: Widgets (Google Gadget, etc) // 5: Not used // 6: Mobile Phone // 7: iPhone App // 8: Import Tools // 9: Twitter // Via string `json:"via"` }
Task task
swagger:model Task
func (*Task) ContextValidate ¶
ContextValidate validates this task based on context it is used
func (*Task) MarshalBinary ¶
MarshalBinary interface implementation
func (*Task) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type TaskDeleteItem ¶
type TaskDeleteItem struct { // The error code for the delete operation. This will be 0 if the delete was successful. ErrorCode int64 `json:"errorCode,omitempty"` // The error description for the delete operation. This will be empty if the delete was successful. ErrorDesc string `json:"errorDesc,omitempty"` // id ID int64 `json:"id,omitempty"` // A read-only field that contains the id number of the task that this task is a reference to. This is useful for tasks that are deleted failed. Ref string `json:"ref,omitempty"` }
TaskDeleteItem task delete item
swagger:model TaskDeleteItem
func (*TaskDeleteItem) ContextValidate ¶
ContextValidate validates this task delete item based on context it is used
func (*TaskDeleteItem) MarshalBinary ¶
func (m *TaskDeleteItem) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TaskDeleteItem) UnmarshalBinary ¶
func (m *TaskDeleteItem) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TaskDeleted ¶
type TaskDeleted struct { // The server id number for this task. It is guaranteed to be unique per account, but two different accounts may have two different tasks with the same id number. ID int64 `json:"id,omitempty"` // A GMT unix timestamp. Stamp int64 `json:"stamp,omitempty"` }
TaskDeleted task deleted
swagger:model TaskDeleted
func (*TaskDeleted) ContextValidate ¶
ContextValidate validates this task deleted based on context it is used
func (*TaskDeleted) MarshalBinary ¶
func (m *TaskDeleted) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TaskDeleted) UnmarshalBinary ¶
func (m *TaskDeleted) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TaskEdit ¶
type TaskEdit struct { // A GMT unix timestamp for when the task was last modified. Added *int64 `json:"added,omitempty"` // The user id of the collaborator who assigned the task (Subscription required for user). Addedby *int64 `json:"addedby,omitempty"` // An array of attachment items. Each item will contain the following three fields. Attachments are currently read only. You can use the id number to reference the outline, list or note that you can get via this API. File's are not currently readable, but we plan to add this functionality soon. // id: The unique id number for the attachment // kind: The kind of attachment (file,note,outline,list) // name: The display name of the attachment // Attatchment string `json:"attatchment,omitempty"` // This is used with Subscriptions that have access to subtasks. This will indicate the number of child tasks that this task has. This will be 0 for subtasks or for regular tasks without subtasks. Children *int64 `json:"children,omitempty"` // A GMT unix timestamp for when the task was completed. If the task is not completed, the value will be 0. Toodledo does not track the time that a task was completed, so tasks will always appear to be completed at noon. Completed *int64 `json:"completed,omitempty"` // The id number of the context. Omit this field or set it to 0 to leave the task unassigned to a context. Context *int64 `json:"context,omitempty"` // A GMT unix timestamp for when the task is due. The time component of this timestamp doesn't matter. When fetching from the server, it will always be noon. Duedate *int64 `json:"duedate,omitempty"` // An integer representing the due date modifier. // 0 = Due By // 1 = Due On (=) // 2 = Due After (>) // 3 = Optionally (?) // Duedatemod *int64 `json:"duedatemod,omitempty"` // A GMT unix timestamp for when the task is due. If the task does not have a time set, then this will be 0. If the task has a duetime without a duedate set, then the date component of this timestamp will be Jan 1, 1970. Times are stored as floating times. In other words, 10am is always 10am, regardless of your timezone. You can convert this timestamp to a GMT string and display the time component without worrying about timezones. Duetime *int64 `json:"duetime,omitempty"` // The id number of the folder. Omit this field or set it to 0 to leave the task unassigned to a folder. Folder int64 `json:"folder,omitempty"` // The id number of the goal. Omit this field or set it to 0 to leave the task unassigned to a goal. Goal *int64 `json:"goal,omitempty"` // The server id number for this task. It is guaranteed to be unique per account, but two different accounts may have two different tasks with the same id number. ID int64 `json:"id,omitempty"` // An integer representing the number of minutes that the task will take to complete. Length *int64 `json:"length,omitempty"` // The id number of the location. Omit this field or set it to 0 to leave the task unassigned to a location. Location *int64 `json:"location,omitempty"` // A text string up to 1024 bytes long for storing metadata about the task. This is useful for syncing data that cannot otherwise be synced to Toodledo. This data is unique per task ID. This data is private to your App ID. Neither the user, nor other App IDs can see the data that you put in here. Because of an implementation detail, using the meta field introduces extra latency to each API call, so you should only use this field when necessary. Meta *string `json:"meta,omitempty"` // A GMT unix timestamp for when the task was last modified. Modified *int64 `json:"modified,omitempty"` // A text string up to 32,000 bytes long. New lines should be sent as \n. Note *string `json:"note,omitempty"` // This is used with Subscriptions that have access to subtasks. This is an integer that indicates the manual order of subtasks within the parent task. Currently this is read-only. Order *int64 `json:"order,omitempty"` // This is used with Subscriptions that have access to subtasks. To create a subtask, set this to the id number of the parent task. The default is 0, which creates a normal task. Parent *int64 `json:"parent,omitempty"` // If the task was repeated from another task, this will contain the id number of the previous version of this task. Previous *int64 `json:"previous,omitempty"` // An integer that represents the priority. // -1 = Negative // 0 = Low // 1 = Medium // 2 = High // 3 = Top // Priority *int64 `json:"priority,omitempty"` // A read-only field that contains the id number of the task that this task is a reference to. This is useful for tasks that are created from another task. Ref *string `json:"ref,omitempty"` // An integer that represents the number of minutes prior to the duedate/time that a reminder will be sent. Set it to 0 for no reminder. Values will be constrained to this list of valid numbers (0, 1, 15, 30, 45, 60, 90, 120, 180, 240, 1440, 2880, 4320, 5760, 7200, 8640, 10080, 20160, 43200). Additionally, if the user does not have a Subscription, the only valid numbers are 0,60. If you submit an invalid number, it will be rounded up or down to a valid non zero value. Remind *int64 `json:"remind,omitempty"` // A string indicating how the task repeats. When a task is rescheduled, it is moved forward to the new date. For record keeping purposes, a completed copy of this task will be added to the user's list. It will have a new ID number and will be already completed. To make a task no longer repeat, set this field to an empty string. // // This string is in the standard iCal RRULE format. For example: "FREQ=DAILY" or "FREQ=WEEKLY;BYDAY=TU". Not every valid iCal RRULE is understood by Toodledo, but we will be improving our ability to understand more options in the future. Please read our repeat format FAQ for details about how we can currently repeat tasks. Note that users enter their repeat settings using a GUI or by typing a human readable string. These get converted to iCal rules behind the scenes. // // There are three enhancements to the iCal RRULE format that we have made to support some advanced Toodledo features. // Subtasks can repeat based on their parent's repeat value. There is not a comparable iCal RRULE for this, so we have a custom RRULE of "PARENT" to indicate this setting. // Tasks can be set to repeat from their due-date or their completion date. There is not a way to indicate this in a standard iCAL RRULE. To indicate this, we have a custom string of ";FROMCOMP" that we append to the RRULE if the task is set to repeat from the completion date. The absence of this string means that the task repeats from the due-date. // Normally, when a task is rescheduled it moves forwards by 1 occurrence. If the user has procrastinated, the new due-date could still be in the past. Toodledo will have the option to indicate that certain repeating tasks should be rescheduled to the next future occurance of the task. If this is the case, the custom ";FASTFORWARD" string will be appended to the RRULE. // Repeat *string `json:"repeat,omitempty"` // Set the "reschedule" variable to "1" if you want Toodledo to automatically reschedule the repeating task for you. This will only apply if you also set the completion date, and if the task has a due-date and repeating value. If you do not set this, then you are responsible for rescheduling repeating tasks yourself, as well as properly handling any subtasks that the task may have. It is recommended that you allow Toodledo to reschedule repeating tasks for you. Reschedule int64 `json:"reschedule,omitempty"` Sharedowner *int64 `json:"sharedowner,omitempty"` Sharedwith *int64 `json:"sharedwith,omitempty"` // A boolean (0 or 1) that indicates if the task has a star or not. Star int64 `json:"star,omitempty"` // A GMT unix timestamp for when the task starts. The time component of this timestamp will always be noon. Startdate *int64 `json:"startdate,omitempty"` // A GMT unix timestamp for when the task starts. If the task does not have a time set, then this will be 0. If the task has a starttime without a startdate set, then the date component of this timestamp will be Jan 1, 1970. Times are stored as floating times. In other words, 10am is always 10am, regardless of your timezone. You can convert this timestamp to a GMT string and display the time component without worrying about timezones. Starttime *int64 `json:"starttime,omitempty"` // An integer that represents the status of the task. // 0 = None // 1 = Next Action // 2 = Active // 3 = Planning // 4 = Delegated // 5 = Waiting // 6 = Hold // 7 = Postponed // 8 = Someday // 9 = Canceled // 10 = Reference // Status *int64 `json:"status,omitempty"` // A comma separated string listing the tags assigned to this task. Up to 250 characters. Tag *string `json:"tag,omitempty"` // The value in the timer field indicates the number of seconds that have elapsed for the timer not including the current session. Timer *int64 `json:"timer,omitempty"` // If the timer is currently on, this will contain a unix timestamp indicating the last time that the timer was started. Therefore, if the timer is currently on, you will need to calculate the elapsed time when you present it to the user. This calculation is: Total Time=timer+(now-timeron). Where "now" is a unix timestamp for the current time. Timeron *int64 `json:"timeron,omitempty"` // A string for the name of the task. Up to 255 characters. Title *string `json:"title,omitempty"` // A read-only field that indicates how the task was added. These are the possible values: // 0: Main website // 1: Email Import // 2: Firefox Addon // 3: This API // 4: Widgets (Google Gadget, etc) // 5: Not used // 6: Mobile Phone // 7: iPhone App // 8: Import Tools // 9: Twitter // Via string `json:"via,omitempty"` }
TaskEdit task edit
swagger:model TaskEdit
func LoadTaskFromYAML ¶
func (*TaskEdit) ContextValidate ¶
ContextValidate validates this task edit based on context it is used
func (*TaskEdit) MarshalBinary ¶
MarshalBinary interface implementation
func (*TaskEdit) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type TaskEditableFormatted ¶
type TaskEditableFormatted struct { TaskEdit // Added is the time when the task is added. // it was NO omitempty, we should display in editor so that user can edit it. // it was skip copier, it should be convert format // and other fields are same as Added Added string `json:"added" copier:"-"` Completed string `json:"completed" copier:"-"` Duedate string `json:"duedate" copier:"-"` Duetime string `json:"duetime" copier:"-"` Modified string `json:"modified" copier:"-"` Startdate string `json:"startdate" copier:"-"` Starttime string `json:"starttime" copier:"-"` Timeron string `json:"timeron" copier:"-"` }
TaskEditableFormatted is the task that can be edited. all the date time fields will convert to human-readable format.
Source Files
¶
- environments.go
- messages.go
- sidebar.go
- task.go
- task_encode.go
- task_string.go
- zz_generated_account.go
- zz_generated_api_response.go
- zz_generated_context.go
- zz_generated_error.go
- zz_generated_folder.go
- zz_generated_goal.go
- zz_generated_paginated_api_response.go
- zz_generated_paginated_info.go
- zz_generated_saved_search.go
- zz_generated_search_group.go
- zz_generated_search_group_item.go
- zz_generated_task.go
- zz_generated_task_delete_item.go
- zz_generated_task_deleted.go
- zz_generated_task_edit.go