0.2.19 • Published 9 months ago

@emergentmethods/asknews-typescript-sdk v0.2.19

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@emergentmethods/asknews-typescript-sdk@0.2.19

Typescript SDK for the AskNews API. This SDK utilizes Fetch API. The generated Node module can be used in the following environments:

Environment

  • Node.js
  • Webpack
  • Browserify

Language level

  • ES5 - you must have a Promises/A+ library installed
  • ES6

Module system

  • CommonJS
  • ES6 module system

It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via package.json. (Reference)

Installation

npm install @emergentmethods/asknews-typescript-sdk@0.2.19 --save

Usage

import { AskNewsSDK } from "@emergentmethods/asknews-typescript-sdk";

const ask = new AskNewsSDK({
  clientId: "YOUR-CLIENT-ID",
  clientSecret: "YOUR-CLIENT-SECRET",
  scopes: ["news"],
});

// prompt-optimized string ready to go for any LLM:
const newsContext = (
  await ask.news.searchNews({
    query: "Effect of fed policy on tech sector",
    returnType: "string",
  })
).asString;

console.log(newsContext);

And you will have a prompt-optimized string ready to go for any LLM.

Find full details at the AskNews API documentation.

Support

Join our Discord to see what other people are building, and to get support with your projects.

0.2.19

9 months ago

0.2.18

9 months ago

0.2.17

9 months ago

0.2.16

10 months ago

0.2.15

10 months ago

0.2.14

10 months ago

0.2.13

11 months ago

0.2.12

11 months ago

0.2.11

11 months ago

0.2.10

11 months ago

0.2.9

11 months ago

0.2.8

11 months ago

0.2.7

11 months ago

0.2.6

11 months ago

0.2.5

11 months ago

0.2.4

11 months ago

0.2.3

12 months ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.14

1 year ago

0.1.13

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago