Skip to content

Commit 7402f2a

Browse files
committed
readme updated
1 parent 49c450a commit 7402f2a

File tree

3 files changed

+50
-48
lines changed

3 files changed

+50
-48
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,36 @@ The following api returns comic book information from various publishers includi
55
## Example
66
Implementing the library for api calls
77

8+
### Example 1
9+
810
```js
911
const comicsApi = require('comicbooks-api');
1012

1113
app.get('/', async (req, res) => {
12-
const comics = await comicsApi.getLatestComics(1)
13-
res.json(comics)
14+
const comics = await comicsApi.getLatestComics(1)
15+
res.json(comics)
1416
})
1517
```
1618

17-
The following function takes two paramters:
18-
1. Search Query
19-
2. Page Number (default value = 1)
19+
The above function takes one argument:
20+
1. Page Number
21+
22+
### Example 2
23+
24+
```js
25+
const comicsApi = require('comicbooks-api');
26+
27+
app.get('/', async (req, res) => {
28+
const comics = await comicsApi.getComicsThroughSearch('batman', 1)
29+
res.json(comics)
30+
})
31+
```
32+
The above function takes one argument:
33+
1. Search Query
34+
2. Page Number
2035

21-
The function returns an array of objects containing comic book information
22-
example object:
36+
The function returns an array of objects containing comic book information
37+
### example object:
2338
```js
2439
{
2540
title: 'Batman – One Dark Knight #3 (2022)',
@@ -38,5 +53,7 @@ example object:
3853
}
3954
```
4055

56+
**To see full list of available functions take a look at test.js in test folder**
57+
4158
## Report Problems
4259
If you have any problems regarding this project, read the following [disclaimer](https://github.com/yashkathe/download-comicbooks-api/blob/master/DISCLAIMER.md)

package.json

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
{
2-
"name": "comicbooks-api",
3-
"version": "0.1.1",
4-
"description": "",
5-
"main": "index.js",
6-
"scripts": {
7-
"start": "nodemon index.js",
8-
"test": "node ./__test__/test.js"
9-
},
10-
"keywords": [],
11-
"author": "Yash Kathe",
12-
"license": "ISC",
13-
"dependencies": {
14-
"axios": "^0.27.2",
15-
"cheerio": "^1.0.0-rc.12"
16-
},
17-
"devDependencies": {
18-
"nodemon": "^2.0.20"
19-
}
20-
}
2+
"name": "comicbooks-api",
3+
"version": "0.1.1",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"start": "nodemon index.js",
8+
"test": "node ./__test__/test.js"
9+
},
10+
"keywords": [
11+
"comics",
12+
"comicbooks",
13+
"comicbooks-download-links",
14+
"marvel",
15+
"DC",
16+
"archie"
17+
],
18+
"author": "Yash Kathe",
19+
"license": "GPL-3.0",
20+
"dependencies": {
21+
"axios": "^0.27.2",
22+
"cheerio": "^1.0.0-rc.12"
23+
},
24+
"devDependencies": {
25+
"nodemon": "^2.0.20"
26+
}
27+
}

0 commit comments

Comments
 (0)