Skip to content
Node.js server to support xkcd apps.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api
crawlers
.gitignore
README.md
notifier.js
package-lock.json
package.json
server.js

README.md

xkcd Latest xkcd

API list


Search xkcd

  • URL

    /xkcd-suggest

  • Method

    GET

  • URL Params

Name Required Type Description
q * String xkcd query
size Integer result size

Get xkcd list

  • URL

    /xkcd-list

  • Method

    GET

  • URL Params

Name Required Type Description
start * Integer start index, starts from 0, 0 means the last item
reversed Integer 0 not reversed, 1 reversed, default 0
size Integer size of xkcd list, default 100

Give a thumb up to xkcd

  • URL

    /xkcd-thumb-up

  • Method

    POST

  • URL Params

Name Required Type Description
comic_id * Integer xkcd id

Get top xkcds

  • URL

    /xkcd-top

  • Method

    GET

  • URL Params

Name Required Type Description
sortby * String "thumb-up"
size Integer result size

Get random xkcd

  • URL

    /xkcd-random

  • Method

    GET

  • URL Params

Name Required Type Description
size Integer result size

Search what if

  • URL

    /what-if-suggest

  • Method

    GET

  • URL Params

Name Required Type Description
q * String what if query
size Integer result size

Get what if list

  • URL

    /what-if-list

  • Method

    GET

  • URL Params

Name Required Type Description
start * Integer start index, starts from 0, 0 means the last item
reversed Integer 0 not reversed, 1 reversed, default 0
size Integer size of what if list, default 100

Give a thumb up to what if

  • URL

    /what-if-thumb-up

  • Method

    POST

  • URL Params

Name Required Type Description
what_if_id * Integer what if id

Get top what ifs

  • URL

    /what-if-top

  • Method

    GET

  • URL Params

Name Required Type Description
sortby * String "thumb-up"
size Integer result size

Get random what if

  • URL

    /what-if-random

  • Method

    GET

  • URL Params

Name Required Type Description
size Integer result size
You can’t perform that action at this time.