Documentation
¶
Index ¶
- Constants
- type Account
- type RefreshResponse
- type Task
- type TaskResponse
- type TaskResponseMeta
- type ToodleClient
- func (c *ToodleClient) AccountInfo() (*Account, error)
- func (c *ToodleClient) RefreshCredentials() (*RefreshResponse, error)
- func (c *ToodleClient) SaveConfig() error
- func (c *ToodleClient) Tasks(modifiedBefore *time.Time, modifiedAfter *time.Time, completed ToodleCompleted, ...) (*TaskResponse, error)
- type ToodleCompleted
- type ToodleTime
Constants ¶
const BASE_URL = "https://api.toodledo.com/3"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
Alias string `json:"alias"`
DateFormat int `json:"dateformat"`
Email string `json:"email"`
HideMonths int `json:"hidemonths"`
HotListduedate int `json:"hotlistduedate"`
HotListpriority int `json:"hotlistpriority"`
HotListstar int `json:"hotliststar"`
HotListstatus int `json:"hotliststatus"`
LastDeleteNote int `json:"lastdelete_note"`
LastDeleteTask int `json:"lastdelete_task"`
LastEditContext int `json:"lastedit_context"`
LastEditFolder int `json:"lastedit_folder"`
LastEditGoal int `json:"lastedit_goal"`
LastEditList int `json:"lastedit_list"`
LastEditLocation int `json:"lastedit_location"`
LastEditNote int `json:"lastedit_note"`
LastEditOutline int `json:"lastedit_outline"`
LastEditTask int `json:"lastedit_task"`
Pro int `json:"pro"`
ShowTabNums int `json:"showtabnums"`
Timezone int `json:"timezone"`
Userid string `json:"userid"`
}
type RefreshResponse ¶
type Task ¶
type Task struct {
Completed int64 `json:"completed"`
Folder int64 `json:"folder"`
ID int64 `json:"id"`
Modified int64 `json:"modified"`
Priority int `json:"priority"`
Star int `json:"star"`
Title string `json:"title"`
// Date and time are ToodleTimes and should not be used directly
// Use Due() and Start() instead
DueDate ToodleTime `json:"duedate"`
DueTime ToodleTime `json:"duetime"`
StartDate ToodleTime `json:"startdate"`
StartTime ToodleTime `json:"starttime"`
Length int64 `json:"length"`
TagsString string `json:"tag"`
Parent int64 `json:"parent"`
}
func (Task) ImplicitStart ¶
ImplicitStart finds the start time for the task implied by the combination of the due time and the length of the task If either the length or the due time is not specified, ImplicitStart defaults to the explicit start time specified
type TaskResponse ¶
type TaskResponse struct {
Meta TaskResponseMeta
Tasks []Task
}
type TaskResponseMeta ¶
type ToodleClient ¶
type ToodleClient struct {
AppId string
ClientSecret string
AccessToken string
RefreshToken string
}
func LoadConfig ¶
func LoadConfig() (*ToodleClient, error)
func (*ToodleClient) AccountInfo ¶
func (c *ToodleClient) AccountInfo() (*Account, error)
func (*ToodleClient) RefreshCredentials ¶
func (c *ToodleClient) RefreshCredentials() (*RefreshResponse, error)
func (*ToodleClient) SaveConfig ¶
func (c *ToodleClient) SaveConfig() error
func (*ToodleClient) Tasks ¶
func (c *ToodleClient) Tasks(modifiedBefore *time.Time, modifiedAfter *time.Time, completed ToodleCompleted, id int64, start int, fields ...string) (*TaskResponse, error)
type ToodleCompleted ¶
type ToodleCompleted int
const ( CompletedOrNot ToodleCompleted = iota Uncompleted Completed )
type ToodleTime ¶
type ToodleTime int64