Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ultirequiem/xkcd
💬 XKDC API Wraper
https://github.com/ultirequiem/xkcd
deno node nodejs typescript xkcd xkcd-api xkcd-comics xkcd-downloader xkcd-scraper
Last synced: 5 days ago
JSON representation
💬 XKDC API Wraper
- Host: GitHub
- URL: https://github.com/ultirequiem/xkcd
- Owner: UltiRequiem
- License: mit
- Created: 2022-01-03T21:55:43.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-01T00:02:21.000Z (6 months ago)
- Last Synced: 2024-10-24T11:46:51.683Z (14 days ago)
- Topics: deno, node, nodejs, typescript, xkcd, xkcd-api, xkcd-comics, xkcd-downloader, xkcd-scraper
- Language: TypeScript
- Homepage: https://ulti.js.org/xkcd
- Size: 66.4 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# xkcd
[![Code Coverage](https://codecov.io/gh/UltiRequiem/xkcd/branch/main/graph/badge.svg)](https://codecov.io/gh/UltiRequiem/xkcd)
[![Deno Doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/xkcd/mod.ts)Interact with the [XKCD API](https://xkcd.com/json.html).
## Usage
The API is the same on all this platforms ✔️
### [Deno 🦕](https://deno.land/x/xkcd)
```javascript
import { latestXkcd, xkcd } from "https://deno.land/x/xkcd/mod.ts";const myFavoriteXKCD = await xkcd(304);
myFavoriteXKCD.title; //=> Nighttime Stories
await latestXkcd(); // Metadata...
```### [Node.js 🐢🚀](https://npmjs.com/package/@ultirequiem/xkcd)
```javascript
import { latestXkcd, xkcd } from "@ultirequiem/xkcd";
```### [Browser 🌐](https://developer.mozilla.org/en-US/docs/Glossary/Browser)
You can use any [CDN](https://en.wikipedia.org/wiki/Content_delivery_network) 🔥
Eg 👉
[ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) ↔️
[SkyPack](https://cdn.skypack.dev/@ultirequiem/xkcd) 🆚
[Script Tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)
↔️ [JSDelivr](https://cdn.jsdelivr.net/npm/@ultirequiem/xkcd)It includes other helper methods, check the docs.
## Documentation
Is hosted on [Deno Doc](https://doc.deno.land/https://deno.land/x/xkcd/mod.ts) 📄
## CLI
### Install
- **Deno 🎃**
```sh
deno install --allow-net https://deno.land/x/xkcd/xkcd.ts
```- **Node.js 🐼**
```sh
npm install -g @ultirequiem/xkcd
```### Usage
```sh
xkcd --help
```[A binary for multiple platforms is provided too!](https://github.com/UltiRequiem/xkcd/releases/latest)
[Video Showcase](https://youtu.be/REXxeBx03SI)
## Support
Open an Issue, I will check it a soon as possible 👀
If you want to hurry me up a bit
[send me a tweet](https://twitter.com/UltiRequiem) 😆Consider [supporting me on Patreon](https://patreon.com/UltiRequiem) if you like
my work 🙏Don't forget to star the repo ⭐
## Authors
[Eliaz Bobadilla](https://ultirequiem.com) - Creator and Maintainer 💪
See also the full list of
[contributors](https://github.com/UltiRequiem/xkcd/contributors) who
participated in this project ✨## Versioning
We use [Semantic Versioning](http://semver.org). For the versions available, see
the [tags](https://github.com/UltiRequiem/xkcd/tags) 🏷️## Licence
Licensed under the MIT License 📄