func (service *EpicService) Update(projectID, epicID int, epic *EpicRequest) (*Epic, *http.Response, error) {
	u := fmt.Sprintf("projects/%v/stories/%v", projectID, epicID)
	req, err := service.client.NewRequest("PUT", u, epic)
	if err != nil {
		return nil, nil, err
	}
	var updatedEpic Epic
	resp, err := service.client.Do(req, &updatedEpic)
	if err != nil {
		return nil, resp, err
	}
	return &updatedEpic, resp, err
}
Update is will update an Epic with an EpicRequest.
package pivotal
import (
	"fmt"
	"io"
	"net/http"
	"net/url"
	"time"
)
type Epic struct {
	ID          int        `json:"id,omitempty"`
	ProjectID   int        `json:"project_id,omitempty"`
	Name        string     `json:"name,omitempty"`
	LabelID     int        `json:"label_id,omitempty"`
	Description string     `json:"description,omitempty"`
	CommentIDs  []int      `json:"comment_ids,omitempty"`
	FollowerIDs []int      `json:"follower_ids,omitempty"`
	CreatedAt   *time.Time `json:"created_at,omitempty"`
	UpdatedAt   *time.Time `json:"updated_at,omitempty"`
	AfterID     int        `json:"after_id,omitempty"`
	BeforeID    int        `json:"before_id,omitempty"`
	URL         string     `json:"url,omitempty"`
	CompletedAt *time.Time `json:"completed_at,omitempty"`
	Kind        string     `json:"kind,omitempty"`
}
type EpicRequest struct {
	ProjectID   int       `json:"project_id,omitempty"`
	Name        string    `json:"name,omitempty"`
	Label       Label     `json:"label,omitempty"`
	LabelID     int       `json:"label_id,omitempty"`
	Description string    `json:"description,omitempty"`
	Comments    []Comment `json:"comments,omitempty"`
	CommentIDs  []int     `json:"comment_ids,omitempty"`
	Followers   []Person  `json:"followers,omitempty"`
	FollowerIDs []int     `json:"follower_ids,omitempty"`
	AfterID     int       `json:"after_id,omitempty"`
	BeforeID    int       `json:"before_id,omitempty"`
}
type EpicService struct {
	client *Client
}
func newEpicService(client *Client) *EpicService {
	return &EpicService{client}
}
func (service *EpicService) List(projectID int, filter string) ([]*Epic, error) {
	reqFunc := newEpicsRequestFunc(service.client, projectID, filter)
	cursor, err := newCursor(service.client, reqFunc, 0)
	if err != nil {
		return nil, err
	}
	var epics []*Epic
	if err := cursor.all(&epics); err != nil {
		return nil, err
	}
	return epics, nil
}
func newEpicsRequestFunc(client *Client, projectID int, filter string) func() *http.Request {
	return func() *http.Request {
		u := fmt.Sprintf("projects/%v/epics", projectID)
		if filter != "" {
			u += "?filter=" + url.QueryEscape(filter)
		}
		req, _ := client.NewRequest("GET", u, nil)
		return req
	}
}
type EpicCursor struct {
	*cursor
	buff []*Epic
}
func (c *EpicCursor) Next() (e *Epic, err error) {
	if len(c.buff) == 0 {
		_, err = c.next(&c.buff)
		if err != nil {
			return nil, err
		}
	}
	if len(c.buff) == 0 {
		err = io.EOF
	} else {
		e, c.buff = c.buff[0], c.buff[1:]
	}
	return e, err
}
func (service *EpicService) Iterate(projectID int, filter string) (c *EpicCursor, err error) {
	reqFunc := newEpicsRequestFunc(service.client, projectID, filter)
	cursor, err := newCursor(service.client, reqFunc, PageLimit)
	if err != nil {
		return nil, err
	}
	return &EpicCursor{cursor, make([]*Epic, 0)}, nil
}
func (service *EpicService) Create(projectID int, epic *EpicRequest) (*Epic, *http.Response, error) {
	if projectID == 0 {
		return nil, nil, &ErrFieldNotSet{"project_id"}
	}
	if epic.Name == "" {
		return nil, nil, &ErrFieldNotSet{"name"}
	}
	u := fmt.Sprintf("projects/%v/epics", projectID)
	req, err := service.client.NewRequest("POST", u, epic)
	if err != nil {
		return nil, nil, err
	}
	var newEpic Epic
	resp, err := service.client.Do(req, &newEpic)
	if err != nil {
		return nil, resp, err
	}
	return &newEpic, resp, nil
}
func (service *EpicService) Get(projectID, epicID int) (*Epic, *http.Response, error) {
	u := fmt.Sprintf("projects/%v/epics/%v", projectID, epicID)
	req, err := service.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}
	var epic Epic
	resp, err := service.client.Do(req, &epic)
	if err != nil {
		return nil, resp, err
	}
	return &epic, resp, err
}