Returns a list of token items (metadata) which match the contract id and passed filters.
Example:
{% code title="filteredQuery.ts" overflow="wrap" lineNumbers="true" %}
import { tokensByAttributes } from "@mintbase-js/data";
const query = {
filters: {
'eyes': ['blue', 'green'], // blue or green eyes
'face': ['pretty'], // with a pretty face
},
limit: 10,
offset: 0,
};
const props = {
contractId: 'some-nfts.contract.near',
filters: query,
network: 'mainnet',
}
const { data, error } = await tokensByAttributes(props);
if (error) {
console.log("error", error);
}
console.log(data); // => "[{ title: 'Woah betty', ...}]"
{% endcode %}