0.0.2 • Published 3 years ago

lamernews-api-client v0.0.2

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

Lamer News API Client

npm version

A JavaScript API client for the Lamer News API with included TypeScript definitions.

Note this package is still under development.

Source code is generated from the OpenAPI spec using the typescript-fetch template.

Getting Started

Install:

npm install lamernews-api-client --save

Usage:

import { Configuration, NewsApi, SortType } from 'lamernews-api-client';

const apiConfig = new Configuration({
  basePath: 'https://echojs.com',
});

const newsApi = new NewsApi(apiConfig);

newsApi
  .getNews({
    sort: SortType.Top,
    start: 0,
    count: 30,
  })
  .then((response) => {
    console.log(response);
  });