Skip to content

Commit

Permalink
[factory]: Adding new corrected-version group
Browse files Browse the repository at this point in the history
  • Loading branch information
sismobot committed Oct 17, 2023
1 parent 9f73002 commit cb84bdf
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
38 changes: 38 additions & 0 deletions group-generators/generators/corrected-version/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

import { dataProviders } from "@group-generators/helpers/data-providers";
import { Tags, ValueType, GroupWithData } from "topics/group";
import {
GenerationContext,
GenerationFrequency,
GroupGenerator,
} from "topics/group-generator";

// Generated from factory.sismo.io

const generator: GroupGenerator = {

generationFrequency: GenerationFrequency.Daily,

generate: async (context: GenerationContext): Promise<GroupWithData[]> => {

const restProvider = new dataProviders.RestProvider();

const restProviderData0 = await restProvider.getAccountsFromAPI({
url: "https://front-git-feature-sismo-way2pay.vercel.app/api/sismo/recurring"
});

return [
{
name: "corrected-version",
timestamp: context.timestamp,
description: "All users of the platform",
specs: "It will fetch a list of people who have interacted successfully with our API",
data: restProviderData0,
valueType: ValueType.Score,
tags: [Tags.Factory],
},
];
},
};

export default generator;
2 changes: 2 additions & 0 deletions group-generators/generators/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ import consensysDemoLock from "./consensys-demo-lock";
import contributors from "./contributors";
import contributorsOfDataverseCda from "./contributors-of-dataverse-cda";
import cookingRoom from "./cooking-room";
import correctedVersion from "./corrected-version";
import cowHolders from "./cow-holders";
import cowTraders from "./cow-traders";
import cowTradersAndHolders from "./cow-traders-and-holders";
Expand Down Expand Up @@ -1011,6 +1012,7 @@ export const groupGenerators: GroupGeneratorsLibrary = {
"contributors": contributors,
"contributors-of-dataverse-cda": contributorsOfDataverseCda,
"cooking-room": cookingRoom,
"corrected-version": correctedVersion,
"cow-holders": cowHolders,
"cow-traders": cowTraders,
"cow-traders-and-holders": cowTradersAndHolders,
Expand Down

0 comments on commit cb84bdf

Please sign in to comment.