@metaworklabs/search-sdk
v1.3.2
Published
Search SDK for all identities in the web3
Downloads
8
Readme
Get started with Macha Search SDK
Installing the packages:
To get started with the Macha Search SDK, you can install the package using npm or yarn
yarn add @metaworklabs/search-sdk
npm i @metaworklabs/search-sdk
Initializing the SDK:
import { SearchSDK } from "@metaworklabs/search-sdk/lib";
function App() {
const machaDevClient = new SearchSDK("YOUR_API_KEY");
}
Using the SDK
Query Search
async function performQuerySearch() {
try {
const searchOptions = {
searchQuery: "your search query", //eg. "Show top NFTS's this week"
// category: "",
// slug: "lens_post",
// owner: "",
limit: 10, // number of metas
page: 1,
next: false,
};
const searchResults = await machaDevClient.search(searchOptions);
console.log("Search Results: from MACHA SDK", searchResults);
} catch (error) {
console.error("Error occurred:", error);
}
}
Sample Next App
https://github.com/knight-95/testing-macha-sdk