Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xkcd command #104

Open
Enderchief opened this issue Dec 23, 2022 · 1 comment
Open

xkcd command #104

Enderchief opened this issue Dec 23, 2022 · 1 comment

Comments

@Enderchief
Copy link
Member

should fetch the xkcd by number

@Enderchief
Copy link
Member Author

The easiest way is with the xkcd api.
This is the endpoint where {x} is the number: https://xkcd.com/{x}/info.0.json

Here is a sample response from the api

{
  "month": "1",
  "num": 37,
  "link": "",
  "year": "2006",
  "news": "",
  "safe_title": "Hyphen",
  "transcript": "{{Headline: My hobby: whenever calls something an [adjective]-ass [noun], I mentally move the hyphen one word to the right.}}\n[[One man is talking to another about a car that resembles a Volkswagen Beetle]]\nMan: Man, that's a sweet ass-car.\n{{Title text: I do this constantly}}",
  "alt": "I do this constantly",
  "img": "https://imgs.xkcd.com/comics/hyphen.jpg",
  "title": "Hyphen",
  "day": "1"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant