MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / constructor

Method constructor

packages/sdk/src/index.ts:21–35  ·  view source on GitHub ↗
({
    apiKey,
    type = 'external',
    linenUrl = 'https://www.linen.dev',
  }: {
    apiKey: string;
    type?: 'internal' | 'external';
    linenUrl?: string;
  })

Source from the content-addressed store, hash-verified

19 this.instance.delete(path).then((res) => res.data);
20
21 constructor({
22 apiKey,
23 type = 'external',
24 linenUrl = 'https://www.linen.dev',
25 }: {
26 apiKey: string;
27 type?: 'internal' | 'external';
28 linenUrl?: string;
29 }) {
30 const key = type === 'internal' ? 'x-api-internal' : 'x-api-key';
31 this.instance = axios.create({
32 baseURL: `${linenUrl}`,
33 headers: { [key]: apiKey },
34 });
35 }
36
37 whoAmI(): Promise<{ accountId: string } | null> {
38 return this.get(`/api/integrations/me`);

Callers

nothing calls this directly

Calls 1

createMethod · 0.45

Tested by

no test coverage detected