func (v Market) DeleteAlbum(params MarketDeleteAlbumParams) (bool, error) {
	r, err := v.API.Request("market.deleteAlbum", params)
	if err != nil {
		return false, err
	}
	return decodeBoolIntResponse(r)
}
DeleteAlbum Deletes a collection of items.
package vkapi
import (
	"encoding/json"
	"strconv"
	"github.com/stek29/vk"
)
type Market struct {
	API vk.API
}
type MarketGetParams struct {
	OwnerID int `url:"owner_id"`
	AlbumID int `url:"album_id,omitempty"`
	Count int `url:"count,omitempty"`
	Offset int `url:"offset,omitempty"`
	Extended bool `url:"extended,omitempty"`
}
type MarketGetResponse interface {
	isMarketGet()
}
type MarketGetResponseNormal struct {
	Count int             `json:"count,omitempty"`
	Items []vk.MarketItem `json:"items,omitempty"`
}
func (MarketGetResponseNormal) isMarketGet() {}
type MarketGetResponseExtended struct {
	Count int             `json:"count,omitempty"`
	Items []vk.MarketItem `json:"items,omitempty"`
}
func (MarketGetResponseExtended) isMarketGet() {}
func (v Market) Get(params MarketGetParams) (MarketGetResponse, error) {
	r, err := v.API.Request("market.get", params)
	if err != nil {
		return nil, err
	}
	var resp MarketGetResponse
	if params.Extended {
		var tmp MarketGetResponseExtended
		err = json.Unmarshal(r, &tmp)
		resp = &tmp
	} else {
		var tmp MarketGetResponseNormal
		err = json.Unmarshal(r, &tmp)
		resp = &tmp
	}
	if err != nil {
		return nil, err
	}
	return resp, nil
}
type MarketGetByIDParams struct {
	ItemIDs CSVStringSlice `url:"item_ids"`
	Extended bool `url:"extended,omitempty"`
}
type MarketGetByIDResponse interface {
	isMarketGetByID()
}
type MarketGetByIDResponseNormal struct {
	Count int             `json:"count,omitempty"`
	Items []vk.MarketItem `json:"items,omitempty"`
}
func (MarketGetByIDResponseNormal) isMarketGetByID() {}
type MarketGetByIDResponseExtended struct {
	Count int             `json:"count,omitempty"`
	Items []vk.MarketItem `json:"items,omitempty"`
}
func (MarketGetByIDResponseExtended) isMarketGetByID() {}
func (v Market) GetByID(params MarketGetByIDParams) (MarketGetByIDResponse, error) {
	r, err := v.API.Request("market.getById", params)
	if err != nil {
		return nil, err
	}
	var resp MarketGetByIDResponse
	if params.Extended {
		var tmp MarketGetByIDResponseExtended
		err = json.Unmarshal(r, &tmp)
		resp = &tmp
	} else {
		var tmp MarketGetByIDResponseNormal
		err = json.Unmarshal(r, &tmp)
		resp = &tmp
	}
	if err != nil {
		return nil, err
	}
	return resp, nil
}
type MarketSearchParams struct {
	OwnerID int `url:"owner_id"`
	AlbumID int `url:"album_id,omitempty"`
	Q string `url:"q,omitempty"`
	PriceFrom int `url:"price_from,omitempty"`
	PriceTo int `url:"price_to,omitempty"`
	Tags CSVIntSlice `url:"tags,omitempty"`
	Sort int         `url:"sort,omitempty"`
	Rev int `url:"rev,omitempty"`
	Offset int `url:"offset,omitempty"`
	Count int `url:"count,omitempty"`
	Extended bool `url:"extended,omitempty"`
	Status   int  `url:"status,omitempty"`
}
type MarketSearchResponse interface {
	isMarketSearch()
}
type MarketSearchResponseNormal struct {
	Count int             `json:"count,omitempty"`
	Items []vk.MarketItem `json:"items,omitempty"`
}
func (MarketSearchResponseNormal) isMarketSearch() {}
type MarketSearchResponseExtended struct {
	Count int             `json:"count,omitempty"`
	Items []vk.MarketItem `json:"items,omitempty"`
}
func (MarketSearchResponseExtended) isMarketSearch() {}
func (v Market) Search(params MarketSearchParams) (MarketSearchResponse, error) {
	r, err := v.API.Request("market.search", params)
	if err != nil {
		return nil, err
	}
	var resp MarketSearchResponse
	if params.Extended {
		var tmp MarketSearchResponseExtended
		err = json.Unmarshal(r, &tmp)
		resp = &tmp
	} else {
		var tmp MarketSearchResponseNormal
		err = json.Unmarshal(r, &tmp)
		resp = &tmp
	}
	if err != nil {
		return nil, err
	}
	return resp, nil
}
type MarketGetAlbumsParams struct {
	OwnerID int `url:"owner_id"`
	Offset int `url:"offset,omitempty"`
	Count int `url:"count,omitempty"`
}
type MarketGetAlbumsResponse struct {
	Count int              `json:"count,omitempty"`
	Items []vk.MarketAlbum `json:"items,omitempty"`
}
func (v Market) GetAlbums(params MarketGetAlbumsParams) (*MarketGetAlbumsResponse, error) {
	r, err := v.API.Request("market.getAlbums", params)
	if err != nil {
		return nil, err
	}
	var resp MarketGetAlbumsResponse
	err = json.Unmarshal(r, &resp)
	if err != nil {
		return nil, err
	}
	return &resp, nil
}
type MarketGetAlbumByIDParams struct {
	OwnerID int `url:"owner_id"`
	AlbumIDs CSVIntSlice `url:"album_ids"`
}
type MarketGetAlbumByIDResponse struct {
	Count int              `json:"count,omitempty"`
	Items []vk.MarketAlbum `json:"items,omitempty"`
}
func (v Market) GetAlbumByID(params MarketGetAlbumByIDParams) (*MarketGetAlbumByIDResponse, error) {
	r, err := v.API.Request("market.getAlbumById", params)
	if err != nil {
		return nil, err
	}
	var resp MarketGetAlbumByIDResponse
	err = json.Unmarshal(r, &resp)
	if err != nil {
		return nil, err
	}
	return &resp, nil
}
type MarketCreateCommentParams struct {
	OwnerID int `url:"owner_id"`
	ItemID int `url:"item_id"`
	Message string `url:"message,omitempty"`
	Attachments CSVStringSlice `url:"attachments,omitempty"`
	FromGroup bool `url:"from_group,omitempty"`
	ReplyToComment int `url:"reply_to_comment,omitempty"`
	StickerID int `url:"sticker_id,omitempty"`
	GUID string `url:"guid,omitempty"`
}
type MarketCreateCommentResponse int
func (v Market) CreateComment(params MarketCreateCommentParams) (MarketCreateCommentResponse, error) {
	r, err := v.API.Request("market.createComment", params)
	if err != nil {
		return 0, err
	}
	var resp MarketCreateCommentResponse
	var cnv int
	cnv, err = strconv.Atoi(string(r))
	resp = MarketCreateCommentResponse(cnv)
	if err != nil {
		return 0, err
	}
	return resp, nil
}
type MarketGetCommentsParams struct {
	OwnerID int `url:"owner_id"`
	ItemID int `url:"item_id"`
	NeedLikes bool `url:"need_likes,omitempty"`
	StartCommentID int `url:"start_comment_id,omitempty"`
	Offset         int `url:"offset,omitempty"`
	Count int `url:"count,omitempty"`
	Sort string `url:"sort,omitempty"`
	Extended bool `url:"extended,omitempty"`
	Fields CSVStringSlice `url:"fields,omitempty"`
}
type MarketGetCommentsResponse struct {
	Count int          `json:"count,omitempty"`
	Items []vk.Comment `json:"items,omitempty"`
}
func (v Market) GetComments(params MarketGetCommentsParams) (*MarketGetCommentsResponse, error) {
	r, err := v.API.Request("market.getComments", params)
	if err != nil {
		return nil, err
	}
	var resp MarketGetCommentsResponse
	err = json.Unmarshal(r, &resp)
	if err != nil {
		return nil, err
	}
	return &resp, nil
}
type MarketDeleteCommentParams struct {
	OwnerID int `url:"owner_id"`
	CommentID int `url:"comment_id"`
}
func (v Market) DeleteComment(params MarketDeleteCommentParams) (bool, error) {
	r, err := v.API.Request("market.deleteComment", params)
	if err != nil {
		return false, err
	}
	return decodeBoolIntResponse(r)
}
type MarketRestoreCommentParams struct {
	OwnerID int `url:"owner_id"`
	CommentID int `url:"comment_id"`
}
func (v Market) RestoreComment(params MarketRestoreCommentParams) (bool, error) {
	r, err := v.API.Request("market.restoreComment", params)
	if err != nil {
		return false, err
	}
	return decodeBoolIntResponse(r)
}
type MarketEditCommentParams struct {
	OwnerID int `url:"owner_id"`
	CommentID int `url:"comment_id"`
	Message string `url:"message,omitempty"`
	Attachments CSVStringSlice `url:"attachments,omitempty"`
}
func (v Market) EditComment(params MarketEditCommentParams) (bool, error) {
	r, err := v.API.Request("market.editComment", params)
	if err != nil {
		return false, err
	}
	return decodeBoolIntResponse(r)
}
type MarketReportCommentParams struct {
	OwnerID int `url:"owner_id"`
	CommentID int `url:"comment_id"`
	Reason int `url:"reason"`
}
func (v Market) ReportComment(params MarketReportCommentParams) (bool, error) {
	r, err := v.API.Request("market.reportComment", params)
	if err != nil {
		return false, err
	}
	return decodeBoolIntResponse(r)
}
type MarketGetCategoriesParams struct {
	Count int `url:"count,omitempty"`
	Offset int `url:"offset,omitempty"`
}
type MarketGetCategoriesResponse struct {
	Count int                 `json:"count,omitempty"`
	Items []vk.MarketCategory `json:"items,omitempty"`
}
func (v Market) GetCategories(params MarketGetCategoriesParams) (*MarketGetCategoriesResponse, error) {
	r, err := v.API.Request("market.getCategories", params)
	if err != nil {
		return nil, err
	}
	var resp MarketGetCategoriesResponse
	err = json.Unmarshal(r, &resp)
	if err != nil {
		return nil, err
	}
	return &resp, nil
}
type MarketReportParams struct {
	OwnerID int `url:"owner_id"`
	ItemID int `url:"item_id"`
	Reason int `url:"reason,omitempty"`
}
func (v Market) Report(params MarketReportParams) (bool, error) {
	r, err := v.API.Request("market.report", params)
	if err != nil {
		return false, err
	}
	return decodeBoolIntResponse(r)
}
type MarketAddParams struct {
	OwnerID int `url:"owner_id"`
	Name string `url:"name"`
	Description string `url:"description"`
	CategoryID int `url:"category_id"`
	Price float32 `url:"price"`
	Deleted bool `url:"deleted,omitempty"`
	MainPhotoID int `url:"main_photo_id"`
	PhotoIDs CSVIntSlice `url:"photo_ids,omitempty"`
	URL string `url:"url,omitempty"`
}
type MarketAddResponse struct {
	MarketItemID int `json:"market_item_id,omitempty"`
}
func (v Market) Add(params MarketAddParams) (*MarketAddResponse, error) {
	r, err := v.API.Request("market.add", params)
	if err != nil {
		return nil, err
	}
	var resp MarketAddResponse
	err = json.Unmarshal(r, &resp)
	if err != nil {
		return nil, err
	}
	return &resp, nil
}
type MarketEditParams struct {
	OwnerID int `url:"owner_id"`
	ItemID int `url:"item_id"`
	Name string `url:"name"`
	Description string `url:"description"`
	CategoryID int `url:"category_id"`
	Price float32 `url:"price"`
	Deleted bool `url:"deleted,omitempty"`
	MainPhotoID int `url:"main_photo_id"`
	PhotoIDs CSVIntSlice `url:"photo_ids,omitempty"`
	URL string `url:"url,omitempty"`
}
func (v Market) Edit(params MarketEditParams) (bool, error) {
	r, err := v.API.Request("market.edit", params)
	if err != nil {
		return false, err
	}
	return decodeBoolIntResponse(r)
}
type MarketDeleteParams struct {
	OwnerID int `url:"owner_id"`
	ItemID int `url:"item_id"`
}
func (v Market) Delete(params MarketDeleteParams) (bool, error) {
	r, err := v.API.Request("market.delete", params)
	if err != nil {
		return false, err
	}
	return decodeBoolIntResponse(r)
}
type MarketRestoreParams struct {
	OwnerID int `url:"owner_id"`
	ItemID int `url:"item_id"`
}
func (v Market) Restore(params MarketRestoreParams) (bool, error) {
	r, err := v.API.Request("market.restore", params)
	if err != nil {
		return false, err
	}
	return decodeBoolIntResponse(r)
}
type MarketReorderItemsParams struct {
	OwnerID int `url:"owner_id"`
	AlbumID int `url:"album_id,omitempty"`
	ItemID int `url:"item_id"`
	Before int `url:"before,omitempty"`
	After int `url:"after,omitempty"`
}
func (v Market) ReorderItems(params MarketReorderItemsParams) (bool, error) {
	r, err := v.API.Request("market.reorderItems", params)
	if err != nil {
		return false, err
	}
	return decodeBoolIntResponse(r)
}
type MarketReorderAlbumsParams struct {
	OwnerID int `url:"owner_id"`
	AlbumID int `url:"album_id"`
	Before int `url:"before,omitempty"`
	After int `url:"after,omitempty"`
}
func (v Market) ReorderAlbums(params MarketReorderAlbumsParams) (bool, error) {
	r, err := v.API.Request("market.reorderAlbums", params)
	if err != nil {
		return false, err
	}
	return decodeBoolIntResponse(r)
}
type MarketAddAlbumParams struct {
	OwnerID int `url:"owner_id"`
	Title string `url:"title"`
	PhotoID int `url:"photo_id,omitempty"`
	MainAlbum bool `url:"main_album,omitempty"`
}
type MarketAddAlbumResponse struct {
	MarketAlbumID int `json:"market_album_id,omitempty"`
}
func (v Market) AddAlbum(params MarketAddAlbumParams) (*MarketAddAlbumResponse, error) {
	r, err := v.API.Request("market.addAlbum", params)
	if err != nil {
		return nil, err
	}
	var resp MarketAddAlbumResponse
	err = json.Unmarshal(r, &resp)
	if err != nil {
		return nil, err
	}
	return &resp, nil
}
type MarketEditAlbumParams struct {
	OwnerID int `url:"owner_id"`
	AlbumID int `url:"album_id"`
	Title string `url:"title"`
	PhotoID int `url:"photo_id,omitempty"`
	MainAlbum bool `url:"main_album,omitempty"`
}
func (v Market) EditAlbum(params MarketEditAlbumParams) (bool, error) {
	r, err := v.API.Request("market.editAlbum", params)
	if err != nil {
		return false, err
	}
	return decodeBoolIntResponse(r)
}
type MarketDeleteAlbumParams struct {
	OwnerID int `url:"owner_id"`
	AlbumID int `url:"album_id"`
}