Method
constructor
({
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
Tested by
no test coverage detected