Documentation ¶
Index ¶
- Constants
- type AddWantResponse
- type Artist
- type BasicInformation
- type CollectionRelease
- type CollectionResponse
- type CreateFolderResponse
- type CreateSaleResponse
- type DeleteFolderResponse
- type Discogs
- type DiscogsUser
- type Downloader
- type Field
- type FieldsResponse
- type Folder
- type Format
- type GetFolderResponse
- type GetSaleResponse
- type GetWantsResponse
- type IndividualRelease
- type InventoryResponse
- type Label
- type MasterRelease
- type MasterReleasesResponse
- type NewFolder
- type Note
- type Order
- type OrderItem
- type Pagination
- type Price
- type Rating
- type RatingResponse
- type Release
- type SaleJson
- type SaleParams
- type SetFolderResponse
- type TestDiscogsClient
- func (t *TestDiscogsClient) AddCNonollectionRelease(r *pb.Release)
- func (t *TestDiscogsClient) AddCollectionRelease(r *pb.Release)
- func (t *TestDiscogsClient) AddWant(ctx context.Context, releaseId int64) (*pb.Want, error)
- func (t *TestDiscogsClient) CreateFolder(ctx context.Context, folderName string) (*pb.Folder, error)
- func (t *TestDiscogsClient) CreateSale(ctx context.Context, params SaleParams) (int64, error)
- func (t *TestDiscogsClient) DeleteFolder(ctx context.Context, folderId int32) error
- func (t *TestDiscogsClient) DeleteWant(ctx context.Context, wantId int64) error
- func (t *TestDiscogsClient) ForUser(user *pb.User) Discogs
- func (t *TestDiscogsClient) GetCollection(ctx context.Context, page int32) ([]*pb.Release, *pb.Pagination, error)
- func (t *TestDiscogsClient) GetCollectionRelease(ctx context.Context, id int64, page int32) ([]*pb.Release, *pb.Pagination, error)
- func (t *TestDiscogsClient) GetDiscogsUser(ctx context.Context) (*pb.User, error)
- func (t *TestDiscogsClient) GetFields(_ context.Context) ([]*pb.Field, error)
- func (t *TestDiscogsClient) GetLoginURL() (string, string, string, error)
- func (t *TestDiscogsClient) GetMasterReleases(ctx context.Context, masterId int64, page int32, sort pb.MasterSort) ([]*pb.MasterRelease, error)
- func (t *TestDiscogsClient) GetOrder(ctx context.Context, orderId string) (*pb.Order, error)
- func (t *TestDiscogsClient) GetRelease(ctx context.Context, releaseId int64) (*pb.Release, error)
- func (t *TestDiscogsClient) GetReleaseStats(ctx context.Context, releaseId int64) (*pb.ReleaseStats, error)
- func (t *TestDiscogsClient) GetSale(ctx context.Context, saleId int64) (*pb.SaleItem, error)
- func (t *TestDiscogsClient) GetUserFolders(_ context.Context) ([]*pb.Folder, error)
- func (t *TestDiscogsClient) GetUserId() int32
- func (t *TestDiscogsClient) GetWants(ctx context.Context, page int32) ([]*pb.Want, *pb.Pagination, error)
- func (t *TestDiscogsClient) HandleDiscogsResponse(ctx context.Context, secret, token, verifier string) (string, string, error)
- func (t *TestDiscogsClient) ListSales(ctx context.Context, page int32) ([]*pb.SaleItem, *pb.Pagination, error)
- func (t *TestDiscogsClient) SetDownloader(_ Downloader)
- func (t *TestDiscogsClient) SetField(ctx context.Context, r *pb.Release, fnum int, value string) error
- func (t *TestDiscogsClient) SetFolder(ctx context.Context, instanceId, releaseId int64, folderId, newFolderId int32) error
- func (t *TestDiscogsClient) SetRating(ctx context.Context, releaseId int64, newScore int32) error
- func (t *TestDiscogsClient) Throttle()
- func (t *TestDiscogsClient) UpdateSale(ctx context.Context, saleId int64, releaseId int64, condition string, ...) error
- func (t *TestDiscogsClient) UpdateSaleState(ctx context.Context, saleId int64, releaseId int64, condition string, ...) error
- type Want
Constants ¶
View Source
const ( THROTTLE_REQUESTS = 60 THROTTLE_WINDOW = time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddWantResponse ¶
type AddWantResponse struct { Id int BasicInformation BasicInformation `json:"basic_information"` }
type BasicInformation ¶
type CollectionRelease ¶
type CollectionResponse ¶
type CollectionResponse struct { Pagination Pagination Releases []CollectionRelease Message string }
type CreateFolderResponse ¶
type CreateSaleResponse ¶
type CreateSaleResponse struct {
ListingId int64 `json:"listing_id"`
}
type DeleteFolderResponse ¶
type DeleteFolderResponse struct{}
type Discogs ¶
type Discogs interface { GetLoginURL() (string, string, string, error) HandleDiscogsResponse(ctx context.Context, secret, token, verifier string) (string, string, error) GetDiscogsUser(ctx context.Context) (*pb.User, error) GetCollection(ctx context.Context, page int32) ([]*pb.Release, *pb.Pagination, error) GetCollectionRelease(ctx context.Context, iid int64, page int32) ([]*pb.Release, *pb.Pagination, error) GetUserId() int32 SetDownloader(downloader Downloader) ForUser(user *pb.User) Discogs GetFields(ctx context.Context) ([]*pb.Field, error) SetField(ctx context.Context, r *pb.Release, fnum int, value string) error GetUserFolders(ctx context.Context) ([]*pb.Folder, error) CreateFolder(ctx context.Context, folderName string) (*pb.Folder, error) DeleteFolder(ctx context.Context, folderId int32) error CreateSale(ctx context.Context, params SaleParams) (int64, error) GetSale(ctx context.Context, saleId int64) (*pb.SaleItem, error) UpdateSale(ctx context.Context, saleId int64, releaseId int64, condition string, newPrice int32) error UpdateSaleState(ctx context.Context, saleId, releaseId int64, condition string, saleSate pb.SaleStatus) error ListSales(ctx context.Context, page int32) ([]*pb.SaleItem, *pb.Pagination, error) GetOrder(ctx context.Context, orderId string) (*pb.Order, error) GetReleaseStats(ctx context.Context, releaseId int64) (*pb.ReleaseStats, error) SetFolder(ctx context.Context, instanceId, releaseId int64, folderId, newFolderId int32) error GetRelease(ctx context.Context, releaseId int64) (*pb.Release, error) SetRating(ctx context.Context, releaseId int64, rating int32) error GetWants(ctx context.Context, page int32) ([]*pb.Want, *pb.Pagination, error) AddWant(ctx context.Context, releaseId int64) (*pb.Want, error) DeleteWant(ctx context.Context, wantId int64) error GetMasterReleases(ctx context.Context, masterId int64, page int32, sort pb.MasterSort) ([]*pb.MasterRelease, error) Throttle() }
func DiscogsWithAuth ¶
type DiscogsUser ¶
type Downloader ¶
Option for doing remote downloads
type FieldsResponse ¶
type FieldsResponse struct {
Fields []Field
}
type GetFolderResponse ¶
type GetFolderResponse struct {
Folders []Folder
}
type GetSaleResponse ¶
type GetWantsResponse ¶
type GetWantsResponse struct { Pagination Pagination Wants []Want }
type IndividualRelease ¶
type InventoryResponse ¶
type InventoryResponse struct { Pagination Pagination Listings []GetSaleResponse }
type MasterRelease ¶
type MasterReleasesResponse ¶
type MasterReleasesResponse struct {
Versions []MasterRelease
}
type Pagination ¶
type RatingResponse ¶
type RatingResponse struct{}
type SaleParams ¶
type SetFolderResponse ¶
type SetFolderResponse struct{}
type TestDiscogsClient ¶
type TestDiscogsClient struct { UserId int32 Fields []*pb.Field Folders []*pb.Folder Sales []*pb.SaleItem Rating map[int64]int32 Wants map[int64]*pb.Want Masters map[int64]*pb.Release // contains filtered or unexported fields }
func GetTestClient ¶
func GetTestClient() *TestDiscogsClient
func (*TestDiscogsClient) AddCNonollectionRelease ¶
func (t *TestDiscogsClient) AddCNonollectionRelease(r *pb.Release)
func (*TestDiscogsClient) AddCollectionRelease ¶
func (t *TestDiscogsClient) AddCollectionRelease(r *pb.Release)
func (*TestDiscogsClient) CreateFolder ¶
func (*TestDiscogsClient) CreateSale ¶
func (t *TestDiscogsClient) CreateSale(ctx context.Context, params SaleParams) (int64, error)
func (*TestDiscogsClient) DeleteFolder ¶
func (t *TestDiscogsClient) DeleteFolder(ctx context.Context, folderId int32) error
func (*TestDiscogsClient) DeleteWant ¶
func (t *TestDiscogsClient) DeleteWant(ctx context.Context, wantId int64) error
func (*TestDiscogsClient) GetCollection ¶
func (t *TestDiscogsClient) GetCollection(ctx context.Context, page int32) ([]*pb.Release, *pb.Pagination, error)
func (*TestDiscogsClient) GetCollectionRelease ¶
func (t *TestDiscogsClient) GetCollectionRelease(ctx context.Context, id int64, page int32) ([]*pb.Release, *pb.Pagination, error)
func (*TestDiscogsClient) GetDiscogsUser ¶
func (*TestDiscogsClient) GetLoginURL ¶
func (t *TestDiscogsClient) GetLoginURL() (string, string, string, error)
func (*TestDiscogsClient) GetMasterReleases ¶
func (t *TestDiscogsClient) GetMasterReleases(ctx context.Context, masterId int64, page int32, sort pb.MasterSort) ([]*pb.MasterRelease, error)
func (*TestDiscogsClient) GetRelease ¶
func (*TestDiscogsClient) GetReleaseStats ¶
func (t *TestDiscogsClient) GetReleaseStats(ctx context.Context, releaseId int64) (*pb.ReleaseStats, error)
func (*TestDiscogsClient) GetUserFolders ¶
func (*TestDiscogsClient) GetUserId ¶
func (t *TestDiscogsClient) GetUserId() int32
func (*TestDiscogsClient) GetWants ¶
func (t *TestDiscogsClient) GetWants(ctx context.Context, page int32) ([]*pb.Want, *pb.Pagination, error)
func (*TestDiscogsClient) HandleDiscogsResponse ¶
func (*TestDiscogsClient) ListSales ¶
func (t *TestDiscogsClient) ListSales(ctx context.Context, page int32) ([]*pb.SaleItem, *pb.Pagination, error)
func (*TestDiscogsClient) SetDownloader ¶
func (t *TestDiscogsClient) SetDownloader(_ Downloader)
func (*TestDiscogsClient) Throttle ¶
func (t *TestDiscogsClient) Throttle()
func (*TestDiscogsClient) UpdateSale ¶
func (*TestDiscogsClient) UpdateSaleState ¶
func (t *TestDiscogsClient) UpdateSaleState(ctx context.Context, saleId int64, releaseId int64, condition string, saleState pb.SaleStatus) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.