Add more fields to tasks
This commit is contained in:
parent
403692b72a
commit
2846322bde
|
@ -32,7 +32,7 @@ import (
|
|||
"code.vikunja.io/api/pkg/user"
|
||||
)
|
||||
|
||||
const apiScopes = `tasks.read%20tasks.read.shared`
|
||||
const apiScopes = `tasks.read tasks.read.shared`
|
||||
|
||||
type Migration struct {
|
||||
Code string `json:"code"`
|
||||
|
@ -47,18 +47,55 @@ type apiTokenResponse struct {
|
|||
}
|
||||
|
||||
type task struct {
|
||||
ID string `json:"id"`
|
||||
OdataEtag string `json:"@odata.etag"`
|
||||
Importance string `json:"importance"`
|
||||
IsReminderOn bool `json:"isReminderOn"`
|
||||
Status string `json:"status"`
|
||||
Title string `json:"title"`
|
||||
CreatedDateTime time.Time `json:"createdDateTime"`
|
||||
LastModifiedDateTime time.Time `json:"lastModifiedDateTime"`
|
||||
Body struct {
|
||||
Content string `json:"content"`
|
||||
ContentType string `json:"contentType"`
|
||||
} `json:"body"`
|
||||
OdataEtag string `json:"@odata.etag"`
|
||||
Importance string `json:"importance"`
|
||||
IsReminderOn bool `json:"isReminderOn"`
|
||||
Status string `json:"status"`
|
||||
Title string `json:"title"`
|
||||
CreatedDateTime time.Time `json:"createdDateTime"`
|
||||
LastModifiedDateTime time.Time `json:"lastModifiedDateTime"`
|
||||
ID string `json:"id"`
|
||||
Body body `json:"body"`
|
||||
DueDateTime dueDateTime `json:"dueDateTime"`
|
||||
Recurrence recurrence `json:"recurrence"`
|
||||
ReminderDateTime reminderDateTime `json:"reminderDateTime"`
|
||||
CompletedDateTime completedDateTime `json:"completedDateTime"`
|
||||
}
|
||||
type completedDateTime struct {
|
||||
DateTime string `json:"dateTime"`
|
||||
TimeZone string `json:"timeZone"`
|
||||
}
|
||||
type body struct {
|
||||
Content string `json:"content"`
|
||||
ContentType string `json:"contentType"`
|
||||
}
|
||||
type dueDateTime struct {
|
||||
DateTime string `json:"dateTime"`
|
||||
TimeZone string `json:"timeZone"`
|
||||
}
|
||||
type pattern struct {
|
||||
Type string `json:"type"`
|
||||
Interval int `json:"interval"`
|
||||
Month int `json:"month"`
|
||||
DayOfMonth int `json:"dayOfMonth"`
|
||||
DaysOfWeek []string `json:"daysOfWeek"`
|
||||
FirstDayOfWeek string `json:"firstDayOfWeek"`
|
||||
Index string `json:"index"`
|
||||
}
|
||||
type taskRange struct {
|
||||
Type string `json:"type"`
|
||||
StartDate string `json:"startDate"`
|
||||
EndDate string `json:"endDate"`
|
||||
RecurrenceTimeZone string `json:"recurrenceTimeZone"`
|
||||
NumberOfOccurrences int `json:"numberOfOccurrences"`
|
||||
}
|
||||
type recurrence struct {
|
||||
Pattern pattern `json:"pattern"`
|
||||
Range taskRange `json:"range"`
|
||||
}
|
||||
type reminderDateTime struct {
|
||||
DateTime string `json:"dateTime"`
|
||||
TimeZone string `json:"timeZone"`
|
||||
}
|
||||
|
||||
type tasksResponse struct {
|
||||
|
|
Loading…
Reference in New Issue