Documentation
¶
Index ¶
- Constants
- type Account
- type Client
- func (c *Client) DeleteEvents(events []*timelyGetEvent) (wait bool, err error)
- func (c *Client) Export(events []*event.Event) error
- func (c *Client) GetAllLabels() (err error)
- func (c *Client) GetCurrentUser() (User, error)
- func (c *Client) GetProjectByID(id int) (Project, bool)
- func (c *Client) GetProjectLabels() (labels []Label, err error)
- func (c *Client) GetProjects() error
- func (c *Client) GetRequest(version, endpoint string, params map[string]string) (*client.Resp, error)
- func (c *Client) Init(ctx context.Context) error
- func (c *Client) ListAccounts() (accounts []Account, err error)
- func (c *Client) ListAllEvents(date string) ([]timelyGetEvent, error)
- func (c *Client) ListAllEventsForProject(date string) ([]timelyGetEvent, error)
- func (c *Client) ListProjects() (string, error)
- func (c *Client) ListRootLabels() (string, error)
- func (c *Client) PostEventBatch(batch []*timelyPostEvent) error
- func (c *Client) PostRequest(version, endpoint string, body []byte) (*client.Resp, error)
- func (c *Client) SelectAccount() error
- type Label
- type Project
- type ProjectLabel
- type User
Constants ¶
View Source
const LocalCallback = "urn:ietf:wg:oauth:2.0:oob"
LocalCallback is the OAuth2 callback URL for local applications
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// Configuration
ApiURL string
ApplicationID string
ClientSecret string
CallbackURL string
AccountID int
ProjectID int
DebugMode bool // Will occasionally get used for debugging
// State
HttpClient *client.HttpClient
// contains filtered or unexported fields
}
func (*Client) DeleteEvents ¶
func (*Client) GetAllLabels ¶
func (*Client) GetCurrentUser ¶
func (*Client) GetProjectLabels ¶
func (*Client) GetProjects ¶
func (*Client) GetRequest ¶
func (*Client) ListAccounts ¶
func (*Client) ListAllEvents ¶
ListAllEvents retrieves all events for the specified date (YYYY-MM-DD), across all projects.
func (*Client) ListAllEventsForProject ¶
ListAllEventsForProject retrieves all events for the specified date (YYYY-MM-DD), filtered by the client's ProjectID.
func (*Client) ListProjects ¶
func (*Client) ListRootLabels ¶
func (*Client) PostEventBatch ¶
func (*Client) PostRequest ¶
func (*Client) SelectAccount ¶
type Project ¶
type Project struct {
ID int `json:"id"`
Active bool `json:"active"`
Name string `json:"name"`
Labels []ProjectLabel `json:"labels,omitempty"`
RequiredNotes bool `json:"required_notes"`
}
type ProjectLabel ¶
Click to show internal directories.
Click to hide internal directories.