diff --git a/README.md b/README.md index 41324073..80b75b6f 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
-# [![icon](https://sv443.net/cdn/jokeapi/icon_150x150.png)](#readme)
JokeAPI +# [![icon](https://sv443.net/cdn/jokeapi/icon_readme.png)](#readme)
JokeAPI ### A REST API that serves uniformly and well formatted jokes and offers a great variety of filtering methods and response customization [![GitHub](https://img.shields.io/github/license/Sv443/JokeAPI)](https://sv443.net/LICENSE) [![Uptime / 7 Days](https://img.shields.io/uptimerobot/ratio/7/m782998549-afcc0d10c27c87df47e73289)](https://status.sv443.net/) diff --git a/changelog.txt b/changelog.txt index 73c5ae59..78b47916 100755 --- a/changelog.txt +++ b/changelog.txt @@ -1,31 +1,42 @@ ==================== JokeAPI Changelog - - Version 2.1.4 - + - Version 2.1.5 - ==================== [PLANNED: 2.2.0] - - Allow definition of max requests per minute per each client (GitHub issue #37) - - Add support for jokes and error messages of different languages (GitHub issue #75) + - Add joke category "Pun" (issue #105) + - Allow definition of max requests per minute per each client (issue #37) + - Add support for jokes and error messages of different languages (issue #75) - /langcode/{LANGUAGE} endpoint - /languages endpoint - "?lang=code" URL parameter - - Fix ID caching (again, sigh) - - Add pm2 custom metrics - - Fix HTTP 403 errors - - Remake the URL parser using a package - - Daemonize the auth token refreshing + - Fix ID caching (again, sigh) (issue #80) + - Add pm2 custom metrics (issue #91) + - Fix HTTP 403 errors (issue #96) + - Remake the URL parser using a "commercial" package (issue #97) + - Daemonize the API token refreshing (issue #102) + - Rate limit joke submissions more harshly (issue #104) + - Fix resources not being served with Brotli even though it is supported by the client (issue #106) -[CURRENT: 2.1.4] - 2020 Q3 general patch #1 +[CURRENT: 2.1.5] - 2020 Q3 general patch #2 + - Ditched my botched rate limiting package for a "commercial" one (issue #113) + - Added API token section to documentation (issue #114) + - Client now receives a "Token-Valid" header with the value 0 or 1 depending on token validity (issue #115) + - Renamed "X-Auth-Token" header to "Authorization" so requests don't get blocked by Cloudflare (issue #117) + - Cleaned up a lot of code + + +[2.1.4] - 2020 Q3 general patch #1 - Fixed the IP getter module for like the 500th time now [2.1.3] - 2020 Q2 general patch #1 - - Added option to disable all console output but error messages (GitHub isse #72) + - Added option to disable all console output but error messages (GitHub issue #72) - The content of jokes in the joke submission form is now correctly escaped and can no longer mess up the page (GitHub issue #68) - Fixed crash when parsing a malformatted URI (GitHub issue #69 (nice)) - Re-flagged some jokes diff --git a/data/lists/ipBlacklist.json b/data/lists/ipBlacklist.json deleted file mode 100644 index f055698d..00000000 --- a/data/lists/ipBlacklist.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - "2001:e68:5427:51d6:d8d2:8c0e:767a:4b6b", - "2001:e68:5427:51d6:2d66:94f6:2f8b:f695", - "2001:e68:5427:c50e:b852:2ee9:c30e:61e7" -] \ No newline at end of file diff --git a/docs/raw/index.css b/docs/raw/index.css index 82cdb2a3..b85a69f0 100755 --- a/docs/raw/index.css +++ b/docs/raw/index.css @@ -22,7 +22,8 @@ --doc-header-font-size: 27px; --doc-sub-header-font-size: 19px; - --sidenav-animation-speed: 0.3s; + --sidenav-animation-speed: 0.15s; + --sidenav-colorblur-speed: 0.5s; --targetblink-animation-delay: 0.5s; --scrollbar-track-color: #222; @@ -54,7 +55,7 @@ body { overflow-y: hidden; - transition: background-color var(--sidenav-animation-speed); + transition: background-color ease-out var(--sidenav-colorblur-speed); /* I had to do this for some unknown reason - don't ask me why: */ -webkit-touch-callout: inherit; @@ -172,7 +173,7 @@ header { background-color: var(--header-bg-color); z-index: 1000; - transition: filter linear var(--sidenav-animation-speed), width linear var(--sidenav-animation-speed); + transition: filter ease-out var(--sidenav-colorblur-speed), width linear var(--sidenav-animation-speed); display: flex; flex-direction: row; @@ -321,7 +322,7 @@ label { } #statusCodeTable tr td.dr, span.col.dr { - color: #df0909; + color: #f52727; } .colB { @@ -351,7 +352,7 @@ mark { padding: 3px; font-family: "Cascadia Code", "Roboto", "Courier New", monospace; color: #ccc; - transition: background-color linear var(--sidenav-animation-speed); + transition: background-color ease-out var(--sidenav-colorblur-speed); } body[data-sidenav="opened"] mark { @@ -421,7 +422,7 @@ body[data-sidenav="closed"] code, body code { filter: grayscale(0%); - transition: filter linear var(--sidenav-animation-speed); + transition: filter ease-out var(--sidenav-colorblur-speed); } body code > .actualCode { @@ -440,7 +441,7 @@ body[data-sidenav="opened"] code { filter: grayscale(50%); - transition: filter linear var(--sidenav-animation-speed); + transition: filter ease-out var(--sidenav-colorblur-speed); } body code .nocode.codeheader { @@ -504,12 +505,12 @@ ul.lispacer li { padding: 3px; padding-left: 10px; padding-right: 40px; - transition: background-color linear var(--sidenav-animation-speed); + transition: background-color ease-out var(--sidenav-colorblur-speed); } body[data-sidenav="opened"] .requestURLwrapper { background-color: var(--bg-accent-color-darker-sidenav-opened); - transition: background-color linear var(--sidenav-animation-speed); + transition: background-color ease-out var(--sidenav-colorblur-speed); } .requestMethodGET, .requestMethodPUT { @@ -950,4 +951,4 @@ input[disabled]+label { #urlBuilderUrl { display: inline-block; padding: 10px 5px 10px 8px; -} \ No newline at end of file +} diff --git a/docs/raw/index.html b/docs/raw/index.html index 8a852288..3fadc056 100755 --- a/docs/raw/index.html +++ b/docs/raw/index.html @@ -250,8 +250,8 @@

By using this website and API you are agreeing to
- - + +
@@ -538,12 +538,12 @@

By using this website and API you are agreeing to - In all response data, no matter from which endpoint will have an "error" parameter.
+ In all response data, no matter from which endpoint will have a boolean "error" parameter.
Usually, it is set to false, which means there was no error in your request or on the server.
If the "error" parameter is set to true though, there was an error and will add an "internalError", "message", "causedBy", "additionalInfo" and "timestamp" parameter.

The "internalError" parameter will be set to false, if the error was due to a malformed or failed request and it will be true, if the error is 's fault.
- The "message" parameter will contain a short version of the error message and the "timestamp" parameter will contain a 13-character UNIX timestamp in Central European time (GMT+1).
+ The "message" parameter will contain a short version of the error message and the "timestamp" parameter will contain a 13-character Unix timestamp.
The "causedBy" parameter is an array of possible causes of this error and the "addidionalInfo" parameter contains a more descriptive error message.

You can view an example of an error, where an invalid category was used, just below this paragraph.
@@ -615,11 +615,18 @@

By using this website and API you are agreeing to Internal Server Error There was a general internal error within . You can get more info from the properties in the response text + + 523 + Origin Unreachable + My server is temporarily offline due to maintenance or a dynamic IP update. Please be patient in this case. +
- SuccessClient ErrorServer Error + + SuccessClient ErrorServer Error + @@ -671,8 +678,11 @@

By using this website and API you are agreeing to This endpoint provides some information on :
- The version number
- The amount of jokes
+ - All the available categories, flags, types and formats
- A 13-character UNIX timestamp
- - The URL to a joke submission form + - The URL to a joke submission form
+ - The minimum and maximum values of an ID range
+ - A string with some information, like a message of the day

Supported URL parameters:
+ + + + has a way of whitelisting certain clients. This is achieved through an API token.
+ At the moment, you will only receive one of these tokens temporarily if something breaks or if you are a business and need more than requests per minute.
+ If you do end up receiving a token, using it is as easy as adding an Authorization header with the actual token as its value.
+ You will receive a response header called Token-Valid which will contain the number 1 if the token is valid.
+ If the token is invalid, the Token-Valid header will be set to 0 and will treat your request as if you didn't supply a token in the first place. + + + These are some examples in some commonly used languages to show you how you could implement :

@@ -1115,17 +1136,22 @@

By using this website and API you are agreeing to

Dependencies:
- These are the packages depends on (excluding dependencies of dependencies): + These are the packages depends on (excluding dependencies of dependencies and devDependencies):
@@ -1185,6 +1211,7 @@

By using this website and API you are agreeing to Filtering Jokes + API Tokens Examples