MCPcopy Index your code
hub / github.com/subquery/subql / fetchExampleProjects

Function fetchExampleProjects

packages/cli/src/controller/init-controller.ts:89–99  ·  view source on GitHub ↗
(
  familyCode: string,
  networkCode: string
)

Source from the content-addressed store, hash-verified

87
88// The family query param must be an exact case-insensitive match otherwise an empty result will be returned
89export async function fetchExampleProjects(
90 familyCode: string,
91 networkCode: string
92): Promise<ExampleProjectInterface[]> {
93 try {
94 const res = await axiosInstance.get<{results: ExampleProjectInterface[]}>(`/networks/${familyCode}/${networkCode}`);
95 return res.data.results;
96 } catch (e) {
97 throw errorHandle(e, `Update to reach endpoint ${familyCode}/${networkCode}`);
98 }
99}
100
101export async function cloneProjectGit(
102 localPath: string,

Callers 4

prepareProjectFunction · 0.90
initAdapterFunction · 0.90

Calls 1

errorHandleFunction · 0.90

Tested by

no test coverage detected