@replicode/parallax
Advanced tools
Comparing version 1.1.44 to 1.1.45
@@ -15,3 +15,5 @@ import { ParallaxOptions } from './parallax.options'; | ||
removeAllWallets(userID: string): Promise<Boolean>; | ||
collection(collectionID: string): Promise<Parallax.Collection>; | ||
collectionStats(collectionID: string): Promise<Parallax.CollectionStats>; | ||
} | ||
//# sourceMappingURL=parallax.service.d.ts.map |
@@ -145,2 +145,26 @@ "use strict"; | ||
} | ||
async collection(collectionID) { | ||
let route = `/nft/collection/${collectionID}`; | ||
try { | ||
let response = await this.client.get(route); | ||
let data = response.data; | ||
return data; | ||
} | ||
catch (e) { | ||
console.log(e); | ||
return null; | ||
} | ||
} | ||
async collectionStats(collectionID) { | ||
let route = `/nft/collection/${collectionID}/stats`; | ||
try { | ||
let response = await this.client.get(route); | ||
let data = response.data; | ||
return data; | ||
} | ||
catch (e) { | ||
console.log(e); | ||
return null; | ||
} | ||
} | ||
}; | ||
@@ -147,0 +171,0 @@ ParallaxService = __decorate([ |
{ | ||
"name": "@replicode/parallax", | ||
"version": "1.1.44", | ||
"version": "1.1.45", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index", |
@@ -171,2 +171,32 @@ import { Injectable, Logger } from '@nestjs/common'; | ||
} | ||
async collection(collectionID:string):Promise<Parallax.Collection> { | ||
let route = `/nft/collection/${collectionID}`; | ||
try { | ||
let response:AxiosResponse = await this.client.get(route); | ||
let data: Parallax.Collection = response.data as Parallax.Collection; | ||
return data; | ||
} catch (e) { | ||
console.log(e); | ||
return null; | ||
} | ||
} | ||
async collectionStats(collectionID:string):Promise<Parallax.CollectionStats> { | ||
let route = `/nft/collection/${collectionID}/stats`; | ||
try { | ||
let response:AxiosResponse = await this.client.get(route); | ||
let data: Parallax.CollectionStats = response.data as Parallax.CollectionStats; | ||
return data; | ||
} catch (e) { | ||
console.log(e); | ||
return null; | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33849
724