Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIAccount ¶
type APIAccount struct { Kind string `json:"kind"` ID int `json:"id"` Name string `json:"name"` Status string `json:"status"` Plan string `json:"plan"` }
APIAccount defines the structure for an Account object in responses to API queries
type APINotification ¶
type APINotification struct { Kind string `json:"kind"` ID int `json:"id"` Project APINotificationReference `json:"project"` Performer APINotificationReference `json:"performer"` Message string `json:"message"` NotificationType string `json:"notification_type"` NewAttachmentCount int `json:"new_attachment_count,omitempty"` Action string `json:"action"` Story APINotificationReference `json:"story,omitempty"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Epic *APINotificationReference `json:"epic,omitempty"` CommentID int `json:"comment_id,omitempty"` ReadAt string `json:"read_at,omitempty"` }
APINotification defines the structure for a Notification object in responses to API queries
func (APINotification) String ¶
func (n APINotification) String() string
String converts the notification object into a CLI-friendly text
type APINotificationReference ¶
type APINotificationReference struct { Kind string `json:"kind"` ID int `json:"id"` Name string `json:"name"` }
APINotificationReference defines the structure for an object reference in responses to API queries
type APIProject ¶
type APIProject struct { Kind string `json:"kind"` ID int `json:"id"` ProjectID int `json:"project_id"` ProjectName string `json:"project_name"` ProjectColor string `json:"project_color"` Favorite bool `json:"favorite"` Role string `json:"role"` LastViewedAt string `json:"last_viewed_at"` }
APIProject defines the structure for a project object in a response to API queries
type APIStory ¶
type APIStory struct { Kind string `json:"kind"` ID int `json:"id"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` StoryType string `json:"story_type"` Name string `json:"name"` Description string `json:"description,omitempty"` CurrentState string `json:"current_state"` RequestedByID int `json:"requested_by_id"` URL string `json:"url"` ProjectID int `json:"project_id"` OwnerIds []int `json:"owner_ids"` Labels []APILabel `json:"labels"` OwnedByID int `json:"owned_by_id,omitempty"` Estimate int `json:"estimate,omitempty"` }
APIStory stores data about a pivotal tracker story as returned by its API
type APITimezone ¶
type APIv5MeResponse ¶
type APIv5MeResponse struct { Accounts []APIAccount `json:"accounts"` APIToken string `json:"api_token"` CreatedAt string `json:"created_at"` Email string `json:"email"` HasGoogleIdentity bool `json:"has_google_identity"` ID int `json:"id"` Initials string `json:"initials"` Kind string `json:"kind"` Name string `json:"name"` Projects []APIProject `json:"projects"` ReceivesInAppNotifications bool `json:"receives_in_app_notifications"` TimeZone APITimezone `json:"time_zone"` UpdatedAt string `json:"updated_at"` Username string `json:"username"` }
APIv5MeResponse defines the response structure for a request made to the endpoint at https://www.pivotaltracker.com/services/v5/me
func GetAccount ¶
func GetAccount(accessToken string) (*APIv5MeResponse, error)
func (APIv5MeResponse) String ¶
func (m APIv5MeResponse) String(format ...string) string
type APIv5NotificationsResponse ¶
type APIv5NotificationsResponse []APINotification
APIv5NotificationsResponse defines the response structure for a request made to the endpoint at https://www.pivotaltracker.com/services/v5/my/notifications
func GetNotifs ¶
func GetNotifs(accessToken string, since ...time.Time) (*APIv5NotificationsResponse, error)
GetNotifs returns a user's current notifications
func (APIv5NotificationsResponse) String ¶
func (n APIv5NotificationsResponse) String() string
String converts the notifications object into a CLI-friendly block of text
type APIv5StoriesResponse ¶
type APIv5StoriesResponse []APIStory
APIv5StoriesResponse defines the reponse structure for a request made to the endpoint at https://www.pivotaltracker.com/services/v5/projects/{project_id}/stories
func GetStories ¶
func GetStories(accessToken string, inProjectID string, since ...time.Time) (*APIv5StoriesResponse, error)
GetStories returns a user's stories
func (APIv5StoriesResponse) String ¶
func (s APIv5StoriesResponse) String(format ...string) string
String converts the notifications object into a CLI-friendly block of text
type Config ¶
type Config struct { // Projects is the list of projects to monitor Projects Projects `json:"projects" yaml:"projects"` // AccessToken to be used for all listed projects if their own access token is not defined. // This value can be retrieved from the section named API Token at https://www.pivotaltracker.com/profile AccessToken string `json:"accessToken" yaml:"accessToken"` }
Config defines the structure of the configuration that can be consumed for tracking notifications and events from the Pivotal Tracker platform
func (Config) GetSanitized ¶
type Project ¶
type Project struct { // Name is the custom label given to this project as the user would like to define it Name string `json:"name" yaml:"name"` // Description is a user-defined description of what this project is for Description string `json:"description" yaml:"description"` // ProjectID of the project in PivotalTracker that's obtainable by going to a board and getting it from the URL ProjectID string `json:"projectID" yaml:"projectID"` // AccessToken for this project, if not specified, defaults to use parent access token. // This value can be retrieved from the section named API Token at the URL:L // https://www.pivotaltracker.com/profile AccessToken string `json:"accessToken" yaml:"accessToken"` // Public indicates whether this account should be public, if so, the /platforms // endpoint on the dev server will expose this account; this is done to accomodate // using both personal and work accounts, note that even if this is set to true, // the AccessToken should not be exposed Public bool `json:"public" yaml:"public"` }
Project defines a Pivotal Tracker project