JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 62
  • Score
    100M100P100Q75100F
  • License MIT

Unofficial Flibusta API based on website search engine. If you like to read books - buy

Package Exports

  • flibusta
  • flibusta/build/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (flibusta) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Flibusta API

Unofficial Flibusta API based on website search engine.


Examples

  1. Clone repository
  2. Use yarn install or npm install
  3. Use commands:
For simple search
yarn example-search-book-by-name [book name]
yarn example-search-authors [author name]
yarn example-search-book-by-series [series name]
For paginated search
yarn example-search-book-by-name-paginated [book name] [page number] [items limit count]
yarn example-search-authors-paginated [author name] [page number] [items limit count]
yarn example-search-book-by-series-paginated [series name] [page number] [items limit count]

API

getBooksByName(name)

  • name - The name of searched books.
Example

getBooksByName('Шерлок')

Response
Response
[
  {
    "book": {
      "id": 402475,
      "name": "Шерлок Холмс и дело о папирусе (сборник) [= Шерлок Холмс против графа Дракулы (сборник)]"
    },
    "authors": [
      {
        "id": 33441,
        "name": "Дэвид Стюарт Дэвис"
      }
    ]
  },
  ...
]


getBooksByNameFromOpds(name)

  • name - The name of searched books.
Example

getBooksByNameFromOpds('Шерлок')

Response
Response
[
  {
    "author": [
      {
        "name": "Талышханов Адиль",
        "uri": "/a/31745"
      }
    ],
    "title": "`Путь бесхвостой птички` или Иероглифика по методу Шерлока Холмса",
    "updated": "2022-02-18T07:21:09+01:00",
    "categories": [
      "Языкознание, иностранные языки"
    ],
    "downloads": [
      {
        "link": "/b/112478/download",
        "type": "application/pdf+rar"
      }
    ],
    "description": "Формат: pdf<br/>Язык: ru<br/>Размер: 564 Kb<br/>Скачиваний: 2632<br/>"
  },
  ...
]

getBooksByNameFromOpdsPaginated(name, page?, limit?)

  • name - The name of searched books.
  • page? - Optional to get books by name for page. By default 0.
  • limit? - Optional. Limit rows count in items. By default 20.
Example

getBooksByNameFromOpdsPaginated('Шерлок', 0, 1)

Response
Response
{
  "items": [
    {
      "author": [
        {
          "name": "Талышханов Адиль",
          "uri": "/a/31745"
        }
      ],
      "title": "`Путь бесхвостой птички` или Иероглифика по методу Шерлока Холмса",
      "updated": "2022-02-18T18:01:50+01:00",
      "categories": [
        "Языкознание, иностранные языки"
      ],
      "downloads": [
        {
          "link": "/b/112478/download",
          "type": "application/pdf+rar"
        }
      ],
      "description": "Формат: pdf<br/>Язык: ru<br/>Размер: 564 Kb<br/>Скачиваний: 2632<br/>"
    }
  ],
  "currentPage": 0,
  "totalCountItems": 228,
  "hasNextPage": true,
  "hasPreviousPage": false,
  "totalPages": 11
}

getBooksByNamePaginated(name, page?, limit?)

  • name - The name of searched books.
  • page? - Optional to get books by name for page. By default 0.
  • limit? - Optional. Limit rows count in items. By default 50.
Example

getBooksByNamePaginated('Шерлок', 0, 1)

Response
Response
{
  "items": [
    {
      "book": {
        "id": 402475,
        "name": "Шерлок Холмс и дело о папирусе (сборник) [= Шерлок Холмс против графа Дракулы (сборник)]"
      },
      "authors": [
        {
          "id": 33441,
          "name": "Дэвид Стюарт Дэвис"
        }
      ]
    }
  ],
  "currentPage": 0,
  "totalCountItems": 228,
  "totalPages": 5,
  "hasNextPage": true,
  "hasPreviousPage": false
}

getBooksBySeries(name, page?, limit?)

  • name - The name of searched books series.
Example

getBooksBySeries('Шерлок')

Response
Response
[
  {
    "id": 242,
    "name": "Шерлок Холмс с иллюстрациями",
    "books": 11
  },
  {
    "id": 30097,
    "name": "Шерлок Холмс. Игра продолжается",
    "books": 61
  },
  {
    "id": 4154,
    "name": "Шерлок Холмс. Новые приключения",
    "books": 8
  },
  ...
]

getBooksBySeriesPaginated(name, page?, limit?)

  • name - The name of searched books series.
  • page? - Optional to get books by name for page. By default 0.
  • limit? - Optional. Limit rows count in items. By default 50.
Example

getBooksBySeriesPaginated('Шерлок', 0, 1)

Response
Response
{
  "items": [
    {
      "id": 242,
      "name": "Шерлок Холмс с иллюстрациями",
      "books": 11
    }
  ],
  "currentPage": 0,
  "totalCountItems": 39,
  "totalPages": 1,
  "hasNextPage": false,
  "hasPreviousPage": false
}

getAuthors(name)

  • name - The name of searched author.
Example

getAuthors('конан')

Response
Response
[
  {
    "id": 6116,
    "name": "Артур Конан Дойль",
    "books": 584,
    "translations": -1
  },
  {
    "id": 17933,
    "name": "Адриан Конан Дойл",
    "books": 37,
    "translations": -1
  },
  {
    "id": 147059,
    "name": "Андреас Конанос (архимандрит)",
    "books": 19,
    "translations": -1
  },
  {
    "id": 6118,
    "name": "Сьюзан Конант",
    "books": 4,
    "translations": -1
  },
  {
    "id": 58754,
    "name": "Александр Конаныхин",
    "books": -1,
    "translations": 1
  }
]

getAuthorsPaginated(name, page?, limit?)

  • name - The name of searched author.
  • page? - Optional to get books by name for page. By default 0.
  • limit? - Optional. Limit rows count in items. By default 50.
Example

getAuthorsPaginated('конан', 0, 1)

Response
Response
{
  "items": [
    {
      "id": 6116,
      "name": "Артур Конан Дойль",
      "books": 584,
      "translations": -1
    }
  ],
  "currentPage": 0,
  "totalCountItems": 5,
  "totalPages": 1,
  "hasNextPage": false,
  "hasPreviousPage": false
}

getGenres(name)

  • name - The name of searched genre.
Example

getGenres('роман')

Response
Response
[
  {
    "id": "det_irony",
    "name": "Иронический детектив, дамский детективный роман"
  },
  {
    "id": "love_contemporary",
    "name": "Современные любовные романы"
  },
  {
    "id": "love_history",
    "name": "Исторические любовные романы"
  },
  {
    "id": "love_detective",
    "name": "Остросюжетные любовные романы"
  },
  {
    "id": "love_short",
    "name": "Короткие любовные романы"
  },
  {
    "id": "love",
    "name": "Любовные романы"
  },
  {
    "id": "love_sf",
    "name": "Любовное фэнтези, любовно-фантастические романы "
  },
  {
    "id": "tale_chivalry",
    "name": "Рыцарский роман"
  },
  {
    "id": "adv_story",
    "name": "Авантюрный роман"
  },
  {
    "id": "gothic_novel",
    "name": "Готический роман"
  },
  {
    "id": "great_story",
    "name": "Роман, повесть"
  },
  {
    "id": "astrology",
    "name": "Астрология и хиромантия"
  }
]

getGenresPaginated(name, page?, limit?)

  • name - The name of searched genre.
  • page? - Optional to get books by name for page. By default 0.
  • limit? - Optional. Limit rows count in items. By default 50.
Example

getGenresPaginated('роман', 0, 2)

Response
Response
{
  "items": [
    {
      "id": "det_irony",
      "name": "Иронический детектив, дамский детективный роман"
    },
    {
      "id": "love_contemporary",
      "name": "Современные любовные романы"
    }
  ],
  "currentPage": 0,
  "totalCountItems": 12,
  "totalPages": 1,
  "hasNextPage": false,
  "hasPreviousPage": false
}