@replicode/parallax
Advanced tools
Comparing version 1.1.40 to 1.1.41
@@ -8,2 +8,3 @@ import { ParallaxOptions } from './parallax.options'; | ||
constructor(options: Partial<ParallaxOptions>); | ||
searchNFT(query: string): Promise<Parallax.NFTRecord[]>; | ||
stats(address: string, collection: string): Promise<Parallax.UserStatsByCollectionResponse>; | ||
@@ -10,0 +11,0 @@ userStatsByCollection(userID: string, collection: string): Promise<Parallax.UserStatsByCollectionResponse>; |
@@ -31,2 +31,14 @@ "use strict"; | ||
} | ||
async searchNFT(query) { | ||
let route = `/search/nft?query=${query}`; | ||
try { | ||
let response = await this.client.get(route); | ||
let data = response.data; | ||
return data; | ||
} | ||
catch (e) { | ||
this.logger.log(e); | ||
return null; | ||
} | ||
} | ||
async stats(address, collection) { | ||
@@ -33,0 +45,0 @@ let route = `/analytics/collection`; |
{ | ||
"name": "@replicode/parallax", | ||
"version": "1.1.40", | ||
"version": "1.1.41", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index", |
@@ -31,2 +31,16 @@ import { Injectable, Logger } from '@nestjs/common'; | ||
async searchNFT(query: string): Promise<Parallax.NFTRecord[]> { | ||
let route = `/search/nft?query=${query}`; | ||
try { | ||
let response:AxiosResponse = await this.client.get(route); | ||
let data:Parallax.NFTRecord[] = response.data as Parallax.NFTRecord[]; | ||
return data; | ||
} catch (e) { | ||
this.logger.log(e); | ||
return null; | ||
} | ||
} | ||
async stats(address:string, collection:string): Promise<Parallax.UserStatsByCollectionResponse> { | ||
@@ -33,0 +47,0 @@ |
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
30014
658