Documentation ¶
Index ¶
- Constants
- type GetCurrentTodoParams
- type GetTodoParams
- type ResponseCurrentTodo
- type ResponseTodos
- type ServerError
- type Settings
- type SettingsParams
- type Todo
- type Todorant
- func (td *Todorant) CreateTodo(todos []Todo) (string, error)
- func (td *Todorant) DeleteTodo(todoId string) error
- func (td *Todorant) DoneTodo(todoId string) error
- func (td *Todorant) EditTodo(todo *Todo) error
- func (td *Todorant) GetCurrentTodo(params GetCurrentTodoParams) (ResponseCurrentTodo, error)
- func (td *Todorant) GetTodos(params GetTodoParams) (*ResponseTodos, error)
- func (td *Todorant) GetUserData() (*User, error)
- func (td *Todorant) Request(requestMethod string, method string, data interface{}, params interface{}) (string, error)
- func (td *Todorant) SetSettings(settings SettingsParams) (string, error)
- func (td *Todorant) SkipTodo(todoId string) error
- func (td *Todorant) UnDoneTodo(todoId string) error
- type User
Constants ¶
View Source
const ApiUrl = "https://backend.todorant.com"
View Source
const RequestMethodDelete = "DELETE"
View Source
const RequestMethodGet = "GET"
View Source
const RequestMethodPost = "POST"
View Source
const RequestMethodPut = "PUT"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetCurrentTodoParams ¶
type GetCurrentTodoParams struct {
Date string `url:"date"`
}
type GetTodoParams ¶
type ResponseCurrentTodo ¶
type ResponseTodos ¶
type ServerError ¶
type ServerError struct { ErrorTitle string `json:"error"` ErrorMessage string `json:"message"` ErrorCode int }
func (*ServerError) Error ¶
func (e *ServerError) Error() string
type SettingsParams ¶
type Todo ¶
type Todo struct { Id string `json:"_id,omitempty"` Text string `json:"text"` Completed bool `json:"completed"` Frog bool `json:"frog"` FrogFails int `json:"frogFails"` Skipped bool `json:"skipped"` Order int `json:"order"` MonthAndYear string `json:"monthAndYear"` Date string `json:"date"` Time string `json:"time"` GoFirst bool `json:"goFirst"` Today string `json:"today"` Repetitive bool `json:"repetitive"` Deleted bool `json:"deleted"` Encrypted bool `json:"encrypted"` ClientId string `json:"clientId"` User User `json:"user"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` }
type Todorant ¶
var TodorantGlobal *Todorant
func (*Todorant) DeleteTodo ¶
func (*Todorant) GetCurrentTodo ¶
func (td *Todorant) GetCurrentTodo(params GetCurrentTodoParams) (ResponseCurrentTodo, error)
func (*Todorant) GetTodos ¶
func (td *Todorant) GetTodos(params GetTodoParams) (*ResponseTodos, error)
func (*Todorant) GetUserData ¶
func (*Todorant) Request ¶
func (td *Todorant) Request(requestMethod string, method string, data interface{}, params interface{}) (string, error)
Returns json string
func (*Todorant) SetSettings ¶
func (td *Todorant) SetSettings(settings SettingsParams) (string, error)
func (*Todorant) UnDoneTodo ¶
type User ¶
type User struct { Id string `json:"_id"` Name string `json:"name"` Email string `json:"email"` FacebookId string `json:"facebookId"` TelegramId string `json:"telegramId"` AppleSubId string `json:"appleSubId"` Token string `json:"token"` Settings Settings `json:"settings"` Timezone string `json:"timezone"` TelegramZen bool `json:"telegramZen"` TelegramLanguage string `json:"telegramLanguage"` SubscriptionStatus string `json:"subscriptionStatus"` SubscriptionId string `json:"subscriptionId"` AppleReceipt string `json:"appleReceipt"` GoogleReceipt string `json:"googleReceipt"` CreatedOnApple bool `json:"createdOnApple"` }
Click to show internal directories.
Click to hide internal directories.