pivotaltracker

package
v0.1.44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2020 License: MIT Imports: 8 Imported by: 0

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 APILabel

type APILabel struct {
	ID        int    `json:"id"`
	ProjectID int    `json:"project_id"`
	Kind      string `json:"kind"`
	Name      string `json:"name"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

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

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

func (APIStory) String

func (s APIStory) String(format ...string) string

String converts the story object into a CLI-friendly block of text

type APITimezone

type APITimezone struct {
	Kind      string `json:"kind"`
	OlsonName string `json:"olson_name"`
	Offset    string `json:"offset"`
}

type APIv5AccountResponse added in v0.0.5

type APIv5AccountResponse 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"`
}

APIv5AccountResponse 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) (*APIv5AccountResponse, error)

func (APIv5AccountResponse) String added in v0.0.5

func (m APIv5AccountResponse) 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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL