Appearance
App icon
App icon generation.
Endpoints
| Endpoint | Arguments | Returns |
|---|---|---|
v3.app.icon.generate | recipe: { gradientId: string, symbolId: string }, workspaceId?: string | object |
v3.app.icon.options | - | object |
v3.app.icon.random | - | object |
v3.app.icon.generate
Description
Render app icons from the given recipe and upload both variants (glyph and badge). Pass workspaceId for workspace-bound apps, omit for personal apps.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
gradientId | string | yes | |
symbolId | string | yes |
Argument 2 (WorkspaceId, optional): Workspace Id of the app. Required for workspace apps, omit for personal apps
Example
javascript
const { Client } = require('@hailer/cli');
const client = await Client.create({
host: 'https://api.hailer.com',
username: 'you@example.com',
password: '••••••',
});
const result = await client.request('v3.app.icon.generate', [
{
gradientId: 'string',
symbolId: 'string',
},
'507f1f77bcf86cd799439011', // WorkspaceId
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
iconFileId | fileId | yes | fileId |
iconBadgeFileId | fileId | yes | fileId |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.app.icon.options
Description
Return gradient and symbol options plus SVG templates for composing app icons.
Parameters
Undocumented
This endpoint declares no argument schema in the source yet.
Example
javascript
const { Client } = require('@hailer/cli');
const client = await Client.create({
host: 'https://api.hailer.com',
username: 'you@example.com',
password: '••••••',
});
const result = await client.request('v3.app.icon.options', []);
console.log(result);Returns
object
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.app.icon.random
Description
Return a random gradient/symbol combination for use as an app icon recipe.
Parameters
Undocumented
This endpoint declares no argument schema in the source yet.
Example
javascript
const { Client } = require('@hailer/cli');
const client = await Client.create({
host: 'https://api.hailer.com',
username: 'you@example.com',
password: '••••••',
});
const result = await client.request('v3.app.icon.random', []);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
gradientId | string | yes | |
symbolId | string | yes |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.