// Update makes a POST request containing a multipart/form-data body with the
// contents of a content item to be updated and stored in Ponzu. Note: the fileKeys
// []string argument should contain the field/key names of the item's uploads
//
// The *APIResponse will indicate whether the request failed or succeeded based
// on the contents of its Data or JSON fields, or by checking the Status of it's
// original http.Response. Callers should expect failures to occur when a Content
// type does not implement the api.Updateable interface
Update makes a POST request containing a multipart/form-data body with the
contents of a content item to be updated and stored in Ponzu. Note: the fileKeys
[]string argument should contain the field/key names of the item's uploads

The *APIResponse will indicate whether the request failed or succeeded based
on the contents of its Data or JSON fields, or by checking the Status of it's
original http.Response. Callers should expect failures to occur when a Content
type does not implement the api.Updateable interface
// Update makes a POST request containing a multipart / form - data body with the // contents of a content item to be updated and stored in Ponzu . Note : the fileKeys // [] string argument should contain the field / key names of the item ' s uploads // // The * APIResponse will indicate whether the request failed or succeeded based // on the contents of its Data or JSON fields or by checking the Status of it ' s // original http . Response . Callers should expect failures to occur when a Content // type does not implement the api . Updateable interface
func (c *Client) Update(contentType string, id int, data *Values, fileKeys []string) (*APIResponse, error) {
	endpoint := fmt.Sprintf(
		"%s/api/content/update?type=%s&id=%d",
		c.Conf.Host, contentType, id,
	)
	req, err := multipartForm(endpoint, data, fileKeys)
	if err != nil {
		return nil, err
	}
	req = mergeHeader(req, c.Conf.Header)
	w, err := c.Do(req)
	if err != nil {
		return nil, err
	}
	resp := &APIResponse{
		Response: w,
	}
	err = resp.process()
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func ( c * Client ) Update ( contentType string , id int , data * Values , fileKeys [ ] string ) ( * APIResponse , error ) { endpoint := fmt . Sprintf ( " " , c . Conf . Host , contentType , id , ) req , err := multipartForm ( endpoint , data , fileKeys ) if err != nil { return nil , err } req = mergeHeader ( req , c . Conf . Header ) w , err := c . Do ( req ) if err != nil { return nil , err } resp := & APIResponse { Response : w , } err = resp . process ( ) if err != nil { return nil , err } return resp , nil }
Update makes a POST request containing a multipart/form-data body with the
contents of a content item to be updated and stored in Ponzu.
Update makes a POST request containing a multipart / form - data body with the contents of a content item to be updated and stored in Ponzu .