@agentmc/api 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +197 -0
  3. package/bin/agentmc-api.mjs +8 -0
  4. package/dist/cli.d.ts +3 -0
  5. package/dist/cli.js +6617 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/generated/operations.d.ts +5039 -0
  8. package/dist/generated/operations.js +6366 -0
  9. package/dist/generated/operations.js.map +1 -0
  10. package/dist/index.d.ts +10618 -0
  11. package/dist/index.js +6517 -0
  12. package/dist/index.js.map +1 -0
  13. package/docs/operations/README.md +50 -0
  14. package/docs/operations/agentConnectedInstructions.md +127 -0
  15. package/docs/operations/agentHeartbeat.md +266 -0
  16. package/docs/operations/authenticateAgentRealtimeSocket.md +176 -0
  17. package/docs/operations/claimAgentRealtimeSession.md +168 -0
  18. package/docs/operations/closeAgentRealtimeSession.md +201 -0
  19. package/docs/operations/commentWorkspaceCalendarItem.md +163 -0
  20. package/docs/operations/connectAgent.md +199 -0
  21. package/docs/operations/createAgentBrief.md +215 -0
  22. package/docs/operations/createAgentRealtimeSignal.md +224 -0
  23. package/docs/operations/createBoard.md +160 -0
  24. package/docs/operations/createBoardColumn.md +163 -0
  25. package/docs/operations/createTask.md +195 -0
  26. package/docs/operations/createTaskComment.md +176 -0
  27. package/docs/operations/createWorkspaceCalendarItem.md +234 -0
  28. package/docs/operations/deleteAgentBrief.md +145 -0
  29. package/docs/operations/deleteBoard.md +126 -0
  30. package/docs/operations/deleteBoardColumn.md +155 -0
  31. package/docs/operations/deleteTask.md +126 -0
  32. package/docs/operations/deleteTaskComment.md +128 -0
  33. package/docs/operations/deleteWorkspaceCalendarItem.md +126 -0
  34. package/docs/operations/index.json +6358 -0
  35. package/docs/operations/listAgentBriefs.md +207 -0
  36. package/docs/operations/listAgentRealtimeRequestedSessions.md +166 -0
  37. package/docs/operations/listAgentRealtimeSignals.md +185 -0
  38. package/docs/operations/listAgents.md +162 -0
  39. package/docs/operations/listBoards.md +142 -0
  40. package/docs/operations/listHosts.md +156 -0
  41. package/docs/operations/listLogs.md +140 -0
  42. package/docs/operations/listNotifications.md +179 -0
  43. package/docs/operations/listTaskComments.md +170 -0
  44. package/docs/operations/listTasks.md +158 -0
  45. package/docs/operations/listTeamMembers.md +137 -0
  46. package/docs/operations/markAllNotificationsRead.md +107 -0
  47. package/docs/operations/markNotificationRead.md +160 -0
  48. package/docs/operations/showBoard.md +134 -0
  49. package/docs/operations/showHost.md +172 -0
  50. package/docs/operations/showTask.md +140 -0
  51. package/docs/operations/showWorkspaceCalendarItem.md +165 -0
  52. package/docs/operations/updateAgentBrief.md +257 -0
  53. package/docs/operations/updateBoard.md +169 -0
  54. package/docs/operations/updateBoardColumn.md +165 -0
  55. package/docs/operations/updateTask.md +175 -0
  56. package/docs/operations/updateTaskComment.md +174 -0
  57. package/docs/operations/updateWorkspaceCalendarItem.md +204 -0
  58. package/docs/operations/workspaceCalendar.md +185 -0
  59. package/examples/http/agentConnectedInstructions.ts +19 -0
  60. package/examples/http/agentHeartbeat.ts +67 -0
  61. package/examples/http/authenticateAgentRealtimeSocket.ts +24 -0
  62. package/examples/http/claimAgentRealtimeSession.ts +21 -0
  63. package/examples/http/closeAgentRealtimeSession.ts +28 -0
  64. package/examples/http/commentWorkspaceCalendarItem.ts +24 -0
  65. package/examples/http/connectAgent.ts +47 -0
  66. package/examples/http/createAgentBrief.ts +34 -0
  67. package/examples/http/createAgentRealtimeSignal.ts +33 -0
  68. package/examples/http/createBoard.ts +19 -0
  69. package/examples/http/createBoardColumn.ts +23 -0
  70. package/examples/http/createTask.ts +24 -0
  71. package/examples/http/createTaskComment.ts +24 -0
  72. package/examples/http/createWorkspaceCalendarItem.ts +31 -0
  73. package/examples/http/deleteAgentBrief.ts +19 -0
  74. package/examples/http/deleteBoard.ts +19 -0
  75. package/examples/http/deleteBoardColumn.ts +22 -0
  76. package/examples/http/deleteTask.ts +19 -0
  77. package/examples/http/deleteTaskComment.ts +20 -0
  78. package/examples/http/deleteWorkspaceCalendarItem.ts +19 -0
  79. package/examples/http/listAgentBriefs.ts +22 -0
  80. package/examples/http/listAgentRealtimeRequestedSessions.ts +22 -0
  81. package/examples/http/listAgentRealtimeSignals.ts +25 -0
  82. package/examples/http/listAgents.ts +20 -0
  83. package/examples/http/listBoards.ts +21 -0
  84. package/examples/http/listHosts.ts +21 -0
  85. package/examples/http/listLogs.ts +19 -0
  86. package/examples/http/listNotifications.ts +20 -0
  87. package/examples/http/listTaskComments.ts +22 -0
  88. package/examples/http/listTasks.ts +26 -0
  89. package/examples/http/listTeamMembers.ts +20 -0
  90. package/examples/http/markAllNotificationsRead.ts +15 -0
  91. package/examples/http/markNotificationRead.ts +20 -0
  92. package/examples/http/showBoard.ts +19 -0
  93. package/examples/http/showHost.ts +22 -0
  94. package/examples/http/showTask.ts +19 -0
  95. package/examples/http/showWorkspaceCalendarItem.ts +19 -0
  96. package/examples/http/updateAgentBrief.ts +47 -0
  97. package/examples/http/updateBoard.ts +25 -0
  98. package/examples/http/updateBoardColumn.ts +24 -0
  99. package/examples/http/updateTask.ts +25 -0
  100. package/examples/http/updateTaskComment.ts +23 -0
  101. package/examples/http/updateWorkspaceCalendarItem.ts +27 -0
  102. package/examples/http/workspaceCalendar.ts +27 -0
  103. package/package.json +64 -0
  104. package/spec/openapi.filtered.json +12925 -0
@@ -0,0 +1,19 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.deleteTask({
8
+ "params": {
9
+ "path": {
10
+ "task": 1
11
+ }
12
+ }
13
+ });
14
+
15
+ if (result.error) {
16
+ console.error(result.status, result.error);
17
+ } else {
18
+ console.log(result.data);
19
+ }
@@ -0,0 +1,20 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.deleteTaskComment({
8
+ "params": {
9
+ "path": {
10
+ "task": 1,
11
+ "comment": 1
12
+ }
13
+ }
14
+ });
15
+
16
+ if (result.error) {
17
+ console.error(result.status, result.error);
18
+ } else {
19
+ console.log(result.data);
20
+ }
@@ -0,0 +1,19 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.deleteWorkspaceCalendarItem({
8
+ "params": {
9
+ "path": {
10
+ "item": 1
11
+ }
12
+ }
13
+ });
14
+
15
+ if (result.error) {
16
+ console.error(result.status, result.error);
17
+ } else {
18
+ console.log(result.data);
19
+ }
@@ -0,0 +1,22 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.listAgentBriefs({
8
+ "params": {
9
+ "query": {
10
+ "search": "operations",
11
+ "external_key": "daily-operations",
12
+ "agent_id": 42,
13
+ "per_page": 25
14
+ }
15
+ }
16
+ });
17
+
18
+ if (result.error) {
19
+ console.error(result.status, result.error);
20
+ } else {
21
+ console.log(result.data);
22
+ }
@@ -0,0 +1,22 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.listAgentRealtimeRequestedSessions({
8
+ "params": {
9
+ "path": {
10
+ "agent": 1
11
+ },
12
+ "query": {
13
+ "limit": 20
14
+ }
15
+ }
16
+ });
17
+
18
+ if (result.error) {
19
+ console.error(result.status, result.error);
20
+ } else {
21
+ console.log(result.data);
22
+ }
@@ -0,0 +1,25 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.listAgentRealtimeSignals({
8
+ "params": {
9
+ "path": {
10
+ "agent": 1,
11
+ "session": 1
12
+ },
13
+ "query": {
14
+ "after_id": 120,
15
+ "limit": 20,
16
+ "exclude_sender": "agent"
17
+ }
18
+ }
19
+ });
20
+
21
+ if (result.error) {
22
+ console.error(result.status, result.error);
23
+ } else {
24
+ console.log(result.data);
25
+ }
@@ -0,0 +1,20 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.listAgents({
8
+ "params": {
9
+ "query": {
10
+ "per_page": 25,
11
+ "search": "operations"
12
+ }
13
+ }
14
+ });
15
+
16
+ if (result.error) {
17
+ console.error(result.status, result.error);
18
+ } else {
19
+ console.log(result.data);
20
+ }
@@ -0,0 +1,21 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.listBoards({
8
+ "params": {
9
+ "query": {
10
+ "per_page": 25,
11
+ "scope": "all",
12
+ "personal_owner_user_id": 42
13
+ }
14
+ }
15
+ });
16
+
17
+ if (result.error) {
18
+ console.error(result.status, result.error);
19
+ } else {
20
+ console.log(result.data);
21
+ }
@@ -0,0 +1,21 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.listHosts({
8
+ "params": {
9
+ "query": {
10
+ "per_page": 25,
11
+ "status": "online",
12
+ "search": "operations"
13
+ }
14
+ }
15
+ });
16
+
17
+ if (result.error) {
18
+ console.error(result.status, result.error);
19
+ } else {
20
+ console.log(result.data);
21
+ }
@@ -0,0 +1,19 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.listLogs({
8
+ "params": {
9
+ "query": {
10
+ "per_page": 25
11
+ }
12
+ }
13
+ });
14
+
15
+ if (result.error) {
16
+ console.error(result.status, result.error);
17
+ } else {
18
+ console.log(result.data);
19
+ }
@@ -0,0 +1,20 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.listNotifications({
8
+ "params": {
9
+ "query": {
10
+ "unread": true,
11
+ "per_page": 25
12
+ }
13
+ }
14
+ });
15
+
16
+ if (result.error) {
17
+ console.error(result.status, result.error);
18
+ } else {
19
+ console.log(result.data);
20
+ }
@@ -0,0 +1,22 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.listTaskComments({
8
+ "params": {
9
+ "path": {
10
+ "task": 1
11
+ },
12
+ "query": {
13
+ "per_page": 25
14
+ }
15
+ }
16
+ });
17
+
18
+ if (result.error) {
19
+ console.error(result.status, result.error);
20
+ } else {
21
+ console.log(result.data);
22
+ }
@@ -0,0 +1,26 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.listTasks({
8
+ "params": {
9
+ "query": {
10
+ "board_id": 42,
11
+ "status": "online",
12
+ "assigned_to_user_id": 42,
13
+ "assigned_to_agent": 1,
14
+ "agent_id": 42,
15
+ "due_from": "2026-02-22T17:21:00Z",
16
+ "due_to": "2026-02-22T17:21:00Z",
17
+ "per_page": 25
18
+ }
19
+ }
20
+ });
21
+
22
+ if (result.error) {
23
+ console.error(result.status, result.error);
24
+ } else {
25
+ console.log(result.data);
26
+ }
@@ -0,0 +1,20 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.listTeamMembers({
8
+ "params": {
9
+ "query": {
10
+ "per_page": 25,
11
+ "search": "operations"
12
+ }
13
+ }
14
+ });
15
+
16
+ if (result.error) {
17
+ console.error(result.status, result.error);
18
+ } else {
19
+ console.log(result.data);
20
+ }
@@ -0,0 +1,15 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.markAllNotificationsRead({
8
+ "body": {}
9
+ });
10
+
11
+ if (result.error) {
12
+ console.error(result.status, result.error);
13
+ } else {
14
+ console.log(result.data);
15
+ }
@@ -0,0 +1,20 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.markNotificationRead({
8
+ "params": {
9
+ "path": {
10
+ "notification": "11111111-1111-4111-8111-111111111111"
11
+ }
12
+ },
13
+ "body": {}
14
+ });
15
+
16
+ if (result.error) {
17
+ console.error(result.status, result.error);
18
+ } else {
19
+ console.log(result.data);
20
+ }
@@ -0,0 +1,19 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.showBoard({
8
+ "params": {
9
+ "path": {
10
+ "id": 42
11
+ }
12
+ }
13
+ });
14
+
15
+ if (result.error) {
16
+ console.error(result.status, result.error);
17
+ } else {
18
+ console.log(result.data);
19
+ }
@@ -0,0 +1,22 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.showHost({
8
+ "params": {
9
+ "path": {
10
+ "id": 42
11
+ },
12
+ "query": {
13
+ "agents_per_page": 25
14
+ }
15
+ }
16
+ });
17
+
18
+ if (result.error) {
19
+ console.error(result.status, result.error);
20
+ } else {
21
+ console.log(result.data);
22
+ }
@@ -0,0 +1,19 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.showTask({
8
+ "params": {
9
+ "path": {
10
+ "task": 1
11
+ }
12
+ }
13
+ });
14
+
15
+ if (result.error) {
16
+ console.error(result.status, result.error);
17
+ } else {
18
+ console.log(result.data);
19
+ }
@@ -0,0 +1,19 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.showWorkspaceCalendarItem({
8
+ "params": {
9
+ "path": {
10
+ "item": 1
11
+ }
12
+ }
13
+ });
14
+
15
+ if (result.error) {
16
+ console.error(result.status, result.error);
17
+ } else {
18
+ console.log(result.data);
19
+ }
@@ -0,0 +1,47 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.updateAgentBrief({
8
+ "params": {
9
+ "path": {
10
+ "id": 42
11
+ }
12
+ },
13
+ "body": {
14
+ "brief": {
15
+ "name": "Daily Operations Brief",
16
+ "summary": "Operations handoff digest for the morning window.",
17
+ "timezone": "America/Los_Angeles",
18
+ "sections": [
19
+ {
20
+ "key": "incidents",
21
+ "label": "Incidents"
22
+ },
23
+ {
24
+ "key": "followups",
25
+ "label": "Follow-ups"
26
+ }
27
+ ],
28
+ "content_markdown": "## Updates\n- Incident queue cleared\n- Follow-up tasks assigned",
29
+ "meta": {
30
+ "external_source": "daily-ops-job",
31
+ "schedule": "0 7 * * *"
32
+ }
33
+ },
34
+ "source": {
35
+ "agent_id": 42,
36
+ "meta": {
37
+ "runtime": "codex"
38
+ }
39
+ }
40
+ }
41
+ });
42
+
43
+ if (result.error) {
44
+ console.error(result.status, result.error);
45
+ } else {
46
+ console.log(result.data);
47
+ }
@@ -0,0 +1,25 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.updateBoard({
8
+ "params": {
9
+ "path": {
10
+ "id": 42
11
+ }
12
+ },
13
+ "body": {
14
+ "name": "Incident Response",
15
+ "description": "Updated board description with escalation runbook links.",
16
+ "visibility": "personal",
17
+ "personal_owner_user_id": 8
18
+ }
19
+ });
20
+
21
+ if (result.error) {
22
+ console.error(result.status, result.error);
23
+ } else {
24
+ console.log(result.data);
25
+ }
@@ -0,0 +1,24 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.updateBoardColumn({
8
+ "params": {
9
+ "path": {
10
+ "board": 1
11
+ }
12
+ },
13
+ "body": {
14
+ "column_id": 13,
15
+ "name": "Review",
16
+ "position": 3
17
+ }
18
+ });
19
+
20
+ if (result.error) {
21
+ console.error(result.status, result.error);
22
+ } else {
23
+ console.log(result.data);
24
+ }
@@ -0,0 +1,25 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.updateTask({
8
+ "params": {
9
+ "path": {
10
+ "task": 1
11
+ }
12
+ },
13
+ "body": {
14
+ "title": "Draft post-incident summary",
15
+ "status": "review",
16
+ "due_at": "2026-02-24T19:00:00Z",
17
+ "assigned_to_agent_id": 42
18
+ }
19
+ });
20
+
21
+ if (result.error) {
22
+ console.error(result.status, result.error);
23
+ } else {
24
+ console.log(result.data);
25
+ }
@@ -0,0 +1,23 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.updateTaskComment({
8
+ "params": {
9
+ "path": {
10
+ "task": 1,
11
+ "comment": 1
12
+ }
13
+ },
14
+ "body": {
15
+ "body": "Updated handoff note with the latest timeline and log links."
16
+ }
17
+ });
18
+
19
+ if (result.error) {
20
+ console.error(result.status, result.error);
21
+ } else {
22
+ console.log(result.data);
23
+ }
@@ -0,0 +1,27 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.updateWorkspaceCalendarItem({
8
+ "params": {
9
+ "path": {
10
+ "item": 1
11
+ }
12
+ },
13
+ "body": {
14
+ "title": "Review outage timeline",
15
+ "description": "Add links to root-cause analysis notes.",
16
+ "due_at": "2026-02-24T11:00:00Z",
17
+ "status": "in_progress",
18
+ "priority": "urgent",
19
+ "visibility": "workspace"
20
+ }
21
+ });
22
+
23
+ if (result.error) {
24
+ console.error(result.status, result.error);
25
+ } else {
26
+ console.log(result.data);
27
+ }
@@ -0,0 +1,27 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.workspaceCalendar({
8
+ "params": {
9
+ "query": {
10
+ "view": "month",
11
+ "start": "2026-02-22T17:21:00Z",
12
+ "end": "2026-02-22T17:21:00Z",
13
+ "type": "event",
14
+ "status": "todo",
15
+ "priority": "low",
16
+ "assignee": "example",
17
+ "q": "retro",
18
+ "per_page": 25
19
+ }
20
+ }
21
+ });
22
+
23
+ if (result.error) {
24
+ console.error(result.status, result.error);
25
+ } else {
26
+ console.log(result.data);
27
+ }