apisave

2.1.3 • Public • Published

APISave

A javascript livrary to save API response data in a seperate JSON file which can be stored for later use.


Installation

npm install --save apisave

Documentation

The script has a APISave class which has a request_save() function, the function requires three arguments.

  • The API url.
  • The request method (GET | POST).
  • The filename in which you want to save the response.

For example if you want to make a GET request to the Github API and save the response in a file named res.json, you can do so by the following syntax.

The script can be invoked with the following syntax.

import save from "apisave";
save("https://api.github.com/", "get", "res.json")

The script works with most of the modern Javascript frameworks


Libraries

  • fs : To write response data into a file
  • axios : To make requests to the API
  • circular-json : Convert circular JSON into string

Readme

Keywords

Package Sidebar

Install

npm i apisave

Weekly Downloads

1

Version

2.1.3

License

ISC

Unpacked Size

2.69 kB

Total Files

3

Last publish

Collaborators

  • iamgrady