1.0.10 • Published 3 days ago

justwords-node v1.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
3 days ago

Just Words Node SDK

Typescript library for Just Words (YC W24).

Get Started

Installation

npm install justwords-node

Initialize

import {JustWords} from "justwords-node";

// Initialize client
await JustWords.initialize({apiKey, orgId});

// Get copy variant for a template
const copy = JustWords.getCopy("<template-id>");

// Get copy variant for a template, filtered by language (depends on how the metrics are set up)
const copyJa = JustWords.getCopy("<template-id>", { criteria: { language: "ja" } });

// Print copy ID
console.log(copy.id);        // "<copy-id>"

// Print copy variable
console.log(copy.vars.text); // "just setting up my copy"

Tips:

  • The initialize function must be awaited before calling JustWords.getCopy. JustWords.getCopy will throw if it has not been initialized first.
  • JustWords.getCopy will throw if the template ID is not known. A template must be created in advance before fetching any copy variants.

Changelog

1.0.10 (2024-04-30)

  • Removed lingering console.log

1.0.9 (2024-04-30)

  • Can set host as an initialization param. Preparing for on-prem use-cases.

1.0.8

  • New changelog!

1.0.7 (2024-04-17)

  • Fixed issue where API key was being passed as an Authorization header and not as an 'X-Api-Key' header.
1.0.10

3 days ago

1.0.9

3 days ago

1.0.8

11 days ago

1.0.7

15 days ago

1.0.6

30 days ago

1.0.4

1 month ago

1.0.3

2 months ago

1.0.2

2 months ago

1.0.1

2 months ago

1.0.0

2 months ago