API class
Core3D API client
Signature:
declare class API
Remarks
Wraps a typed API client available for arbitrary API and provides a few convenience methods for common operations.
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
API constructor. |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
Readonly<{ me: (options?: FetchInit<{}, "json">) => Promise<FetchResult>; }> |
Auth API methods. | |
|
| |||
|
|
Readonly<{ create: (data: any, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.DesignResource>>; read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.DesignResource>>; }> |
Design API methods. | |
|
|
Readonly<{ create: (data: any, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.GenerationResource>>; read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.GenerationResource>>; }> | ||
|
|
Readonly<{ read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.MaterialResource>>; }> | ||
|
|
Readonly<{ links: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.ModelLinkResource[]>>; read: (source: string, target: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.ModelLinkResource>>; }; read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.ModelResource>>; }> | ||
|
|
Readonly<{ materials: { textures: { read: <TParseAs extends "arrayBuffer" | "blob" = "arrayBuffer" | "blob">(identity: string, filename: `${string}.${("jpg" | "png")}`, options: (Omit<FetchInit<{ force?: boolean; quality?: "0.25k" | "0.5k" | "1k" | "2k" | "4k"; [key: string]: any; }, TParseAs>, "parseAs"> & { parseAs: TParseAs; })) => Promise<FetchResult<{}, TParseAs>>; }; }; }> | ||
|
|
Readonly<{ create: (data: { file: string | Blob | File; metafields?: APIv1.MetafieldData[]; team?: string; }, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.UploadResource>>; read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.UploadResource>>; }> |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
A typed fetch handler for API requests. | ||
|
Resolve a URI to a resource. | ||
|
Wait for a resource status to resolve. |