Skip to content

Latest commit

 

History

History
68 lines (38 loc) · 2.3 KB

misc.md

File metadata and controls

68 lines (38 loc) · 2.3 KB

Miscellaneous

There are some small, yet useful APIs. You can familiarise yourself with AJAX caling by using these APIs.

Use api.ipify.org for IPv4 and api6.ipify.org for IPv6. There is a param called format with tree values avaiable:

  1. text returns a text file like 127.0.0.1.
  2. json returns a JSON file like {"ip":"127.0.0.1"}.
  3. jsonp returns a JavaScript file like callback({"ip":"127.0.0.1"});.
    1. Additionally, You can specify callback to decide the name of the callback function in your front end. FOr example, callback=cb returns cb({"ip":"127.0.0.1"});.

Use force to force the API returns yes, no, or maybe. Usually the API returns yes or no, but maybe appears every 1/10.000 time.

10,000 requests a month when using without x-api-key.

10,000 requests a month when using without x-api-key.

A playground is avaiable.

Is there an interface for automated systems to access comics and metadata? Yes. You can get comics through the JSON interface, at URLs like https://xkcd.com/info.0.json (current comic) and https://xkcd.com/614/info.0.json (comic #614). ~ From https://xkcd.com/about