If you are using JavaScript/TypeScript or Python, Install the Airstack SDK:
React
npminstall@airstack/airstack-react
Node
npminstall@airstack/node
React
yarnadd@airstack/airstack-react
Node
yarnadd@airstack/node
React
pnpminstall@airstack/airstack-react
Node
pnpminstall@airstack/node
pipinstallairstackasyncio
Then, add the following snippets to your code:
import { init, useQuery } from"@airstack/airstack-react";init("YOUR_AIRSTACK_API_KEY");constquery="YOUR_QUERY"; // Replace with GraphQL QueryconstComponent= () => {const { data,loading,error } =useQuery(query);if (loading) {return <p>Loading...</p>; }if (error) {return <p>Error: {error.message}</p>; }// Render your component using the data returned by the query};
Airstack provides an AI solution for you to build GraphQL queries to fulfill your use case easily. You can find the AI prompt of each query in the demo's caption or title for yourself to try.
ERC20 Tokens In Common Owned By Lens Profile(s)
You can fetch common ERC20 tokens of multiple Lens profiles:
{"data": {"Poaps": {"Poap": [ {"poapEvent": {"poaps": [ {"poapEvent": {"eventName":"Avara Genesis Fam","eventId":"105708","endDate":"2023-02-24T00:00:00Z","country":"","city":"" } } ] } }, {"token": {"tokenBalances": [] // Owned by bradorbradley.lens, but not owned by christina.lens } } ] } }}
Developer Support
If you have any questions or need help regarding fetching common ERC20 tokens, NFTs, or POAPs of multiple Lens profiles, please join our Airstack's Telegram group.