2.1.3 • Published 3 years ago

apisave v2.1.3

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

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
2.1.3

3 years ago

2.1.2

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.0.0

3 years ago