@brandazine/solari-sdk 0.2.5 → 0.2.6

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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @brandazine/solari-sdk
2
2
 
3
- TypeScript client for the [SOLARI API](https://solari.sh/api) — creator and brand intelligence across Instagram and TikTok. Zero dependencies; runs on Node 18+, Bun, Deno, Cloudflare Workers, and browsers with `fetch`.
3
+ TypeScript client for the [SOLARI API](https://solari.sh/api) — creator and brand intelligence across Instagram and TikTok, plus Meta Threads profiles and posts. Zero dependencies; runs on Node 18+, Bun, Deno, Cloudflare Workers, and browsers with `fetch`.
4
4
 
5
5
  ```
6
6
  npm install @brandazine/solari-sdk
@@ -15,9 +15,12 @@ const solari = new Solari({ token: process.env.SOLARI_TOKEN });
15
15
 
16
16
  const hits = await solari.tools.catalog.instagram.account.search({ query: "nike", limit: 3 });
17
17
  const brand = await solari.tools.insight.instagram.brand.overview({ username: "nike" });
18
+ const thread = await solari.tools.fetch.threads.post({ url: "https://www.threads.com/@zuck/post/Ddt7cL5EfUG" });
18
19
  const tools = await solari.listTools();
19
20
  ```
20
21
 
22
+ Threads is fetch-only: `solari.tools.fetch.threads.account.search({ query })` finds handles by name and `.post.search({ query })` returns Threads' top posts for a keyword (both live on every call, one page, not cached); `.account({ username })`, `.posts({ username, limit })`, and `.post({ url })` (or `{ code }`) read the profile, its newest posts, or one post with its first replies straight from the response. A first collection takes 5 to 30 seconds; repeat calls within an hour return the stored copy unless `refresh: true`.
23
+
21
24
  Create an API key on your [SOLARI My page](https://solari.brandazine.com/me/api-keys) (long-lived, `solari_sk_…`, shown once), or mint a short-lived token with `solari auth token` on a machine signed in to the [solari CLI](https://solari.sh/docs). With no `token` option the client reads `SOLARI_TOKEN`.
22
25
 
23
26
  ## Typed tools
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { SolariToolMap, SolariToolName, SolariTools, SolariToolsWithoutRequ
2
2
  export * from "./tools.generated.js";
3
3
  export declare const DEFAULT_BASE_URL = "https://solari.sh";
4
4
  export declare const API_PREFIX = "/mcp/api/v1";
5
- export declare const SDK_VERSION = "0.2.5";
5
+ export declare const SDK_VERSION = "0.2.6";
6
6
  export declare const TOKEN_ENV = "SOLARI_TOKEN";
7
7
  export interface SolariTool {
8
8
  name: string;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export * from "./tools.generated.js";
2
2
  export const DEFAULT_BASE_URL = "https://solari.sh";
3
3
  export const API_PREFIX = "/mcp/api/v1";
4
- export const SDK_VERSION = "0.2.5";
4
+ export const SDK_VERSION = "0.2.6";
5
5
  export const TOKEN_ENV = "SOLARI_TOKEN";
6
6
  const DEFAULT_TIMEOUT_MS = 150_000;
7
7
  export class SolariError extends Error {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brandazine/solari-sdk",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "TypeScript client for the SOLARI API — creator and brand intelligence across Instagram and TikTok, plus Meta Threads profiles and posts.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://solari.sh/api",