stashapp-api
Version:
Easy to use adapter for interaction with a Stash server through GraphQL.
16 lines (15 loc) • 631 B
JavaScript
import { StashApp } from "./index";
const stash = StashApp.init({
url: "http://10.0.0.4:6969/graphql",
apiKey:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJwaG9lbml4IiwiaWF0IjoxNjM0MjMwOTQ0LCJzdWIiOiJBUElLZXkifQ.obrT2FJFLWNVA6z7yhnqSg3t1_Ul8Ku7pLKG76clkNc",
});
async function searchFavoriteFemalePerformers() {
const filter = {
gender: { value: "FEMALE", modifier: "EQUALS" },
favorite: { value: true, modifier: "EQUALS" },
};
const result = await stash.findPerformers({ filter });
console.log("Favorite Female Performers:", result.performers);
}
searchFavoriteFemalePerformers().catch(console.error);