// Delete deletes your media item. StoryMedia or FeedMedia
//
// See example: examples/media/mediaDelete.go
Delete deletes your media item. StoryMedia or FeedMedia

See example: examples/media/mediaDelete.go
// Delete deletes your media item . StoryMedia or FeedMedia // // See example : examples / media / mediaDelete . go
func (item *Item) Delete() error {
	insta := item.media.instagram()
	data, err := insta.prepareData(
		map[string]interface{}{
			"media_id": item.ID,
		},
	)
	if err != nil {
		return err
	}
	_, err = insta.sendRequest(
		&reqOptions{
			Endpoint: fmt.Sprintf(urlMediaDelete, item.ID),
			Query:    generateSignature(data),
			IsPost:   true,
		},
	)
	return err
}
func ( item * Item ) Delete ( ) error { insta := item . media . instagram ( ) data , err := insta . prepareData ( map [ string ] interface { } { " " : item . ID , } , ) if err != nil { return err } _ , err = insta . sendRequest ( & reqOptions { Endpoint : fmt . Sprintf ( urlMediaDelete , item . ID ) , Query : generateSignature ( data ) , IsPost : true , } , ) return err }
Delete deletes your media item.
Delete deletes your media item .