Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@emergentmethods/asknews-typescript-sdk

Package Overview
Dependencies
Maintainers
0
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emergentmethods/asknews-typescript-sdk

Typescript SDK for AskNews API

  • 0.2.21
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
443
decreased by-34.47%
Maintainers
0
Weekly downloads
 
Created
Source

@emergentmethods/asknews-typescript-sdk@0.2.21

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.21 --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.

Keywords

FAQs

Package last updated on 18 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc