nmkr-studio-api
Version:
Typesafe API Client to work with the NMKR Studio V2 API
84 lines • 2.81 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuctionsService = void 0;
class AuctionsService {
constructor(httpRequest) {
this.httpRequest = httpRequest;
}
/**
* Creates a new legacy auction in the cardano network
* @returns GetAuctionStateResultClass Returns an array of the GetAuctionStateResultClass
* @throws ApiError
*/
postV2CreateAuction({ customerid, requestBody, }) {
return this.httpRequest.request({
method: 'POST',
url: '/v2/CreateAuction/{customerid}',
path: {
customerid: customerid,
},
body: requestBody,
mediaType: 'application/json',
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
404: `Not Found`,
},
});
}
/**
* Deletes an auction - if the auction is not already started
* @returns any Returns an array of the GetAuctionStateResultClass
* @throws ApiError
*/
getV2DeleteAuction({ auctionuid }) {
return this.httpRequest.request({
method: 'GET',
url: '/v2/DeleteAuction/{auctionuid}',
path: {
auctionuid: auctionuid,
},
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
404: `Not Found`,
},
});
}
/**
* Returns all auctions of the customer
* @returns GetAuctionsClass Returns an array of the GetAuctionStateResultClass
* @throws ApiError
*/
getV2GetAllAuctions({ customerid }) {
return this.httpRequest.request({
method: 'GET',
url: '/v2/GetAllAuctions/{customerid}',
path: {
customerid: customerid,
},
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
404: `Not Found`,
},
});
}
/**
* Returns the state - and the last bids of a auction project
* @returns GetAuctionStateResultClass Returns an array of the GetAuctionStateResultClass
* @throws ApiError
*/
getV2GetAuctionState({ auctionuid }) {
return this.httpRequest.request({
method: 'GET',
url: '/v2/GetAuctionState/{auctionuid}',
path: {
auctionuid: auctionuid,
},
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
404: `Not Found`,
},
});
}
}
exports.AuctionsService = AuctionsService;
//# sourceMappingURL=AuctionsService.js.map