-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from Nem4/master
🚧Refactor examples
- Loading branch information
Showing
8 changed files
with
21 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import FlibustaAPI from '../src/index'; | ||
import FlibustaAPI from '@src/index'; | ||
|
||
(async () => { | ||
// eslint-disable-next-line unicorn/no-unreadable-array-destructuring | ||
const [/* original value */, /* path to the file */, authorName] = process.argv; | ||
const flibustaApi = new FlibustaAPI('http://flibusta.is/'); | ||
const [/* original value */, /* path to the file */, bookName] = process.argv; | ||
const flibustaApi = new FlibustaAPI(); | ||
|
||
const searchBooksByNameResult = await flibustaApi.getBooksByName(authorName); | ||
const searchBooksByNameResult = await flibustaApi.getBooksByName(bookName); | ||
|
||
console.log(JSON.stringify(searchBooksByNameResult, undefined, 2)); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import FlibustaAPI from '../src/index'; | ||
import FlibustaAPI from '@src/index'; | ||
|
||
(async () => { | ||
// eslint-disable-next-line unicorn/no-unreadable-array-destructuring | ||
const [/* original value */, /* path to the file */, authorName] = process.argv; | ||
const [/* original value */, /* path to the file */, bookName] = process.argv; | ||
const flibustaApi = new FlibustaAPI(); | ||
|
||
const searchBooksByNameResult = await flibustaApi.getBooksByNameFromOpds(authorName); | ||
const searchBooksByNameResult = await flibustaApi.getBooksByNameFromOpds(bookName); | ||
|
||
console.log(JSON.stringify(searchBooksByNameResult, undefined, 2)); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import FlibustaAPI from '../src/index'; | ||
import FlibustaAPI from '@src/index'; | ||
|
||
(async () => { | ||
// eslint-disable-next-line unicorn/no-unreadable-array-destructuring | ||
const [/* original value */, /* path to the file */, authorName] = process.argv; | ||
const flibustaApi = new FlibustaAPI('http://flibusta.is/'); | ||
const [/* original value */, /* path to the file */, seriesName] = process.argv; | ||
const flibustaApi = new FlibustaAPI(); | ||
|
||
const searchBooksBySeriesResult = await flibustaApi.getBooksBySeries(authorName); | ||
const searchBooksBySeriesResult = await flibustaApi.getBooksBySeries(seriesName); | ||
|
||
console.log(JSON.stringify(searchBooksBySeriesResult, undefined, 2)); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters