Skip to content

Commit

Permalink
Merge pull request #214 from Sv443/version/2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Fehler authored Jan 12, 2021
2 parents 0ecdf25 + d48caa2 commit 585cc34
Show file tree
Hide file tree
Showing 31 changed files with 1,061 additions and 739 deletions.
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
RESTART_TOKEN=123456789 # A PUT request to "[JokeAPI_URL]/restart" with this token as a payload will restart JokeAPI - alternatively, open the JavaScript console on the documentation page and enter "restart()"
RESTART_TOKEN=123456789 # A POST request to "[JokeAPI_URL]/restart" with this token as a payload will restart JokeAPI - alternatively, open the JavaScript console on the documentation page and enter "restart()"
DB_USERNAME=User123 # A user with access to the analytics database
DB_PASSWORD=password123 # The password of the above user
2 changes: 1 addition & 1 deletion .github/Code_of_Conduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ further defined and clarified by project maintainers.
## Enforcement:

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand Down
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
"outline": "1px solid orange"
}
],
"(<%#INSERT:[a-zA-Z0-9\\-]+#%>|<%#INJECT:[a-zA-Z0-9\\-]+#%>)": [ // <%#INSERT:TEST#%> / <%#INJECT:TEST#%>
{
"color": "orange",
"fontStyle": "italic",
"outline": "1px solid orange"
}
],
},
"npm-scripts.showStartNotification": false,

Expand Down
31 changes: 26 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,29 @@

<br>

# Projects (I'm aware of) that use JokeAPI:
# Projects that use JokeAPI:
| Project | Author |
| --- | --- |
| [dozens Advices](https://github.com/ZephyrVentum/dozens-Advices) | [ZephyrVentum](https://github.com/ZephyrVentum) |
| [Shadow-bot](https://github.com/QGIsK/Shadow-bot) | [QGIsK](https://github.com/QGIsK) |
| [Jokepy](https://github.com/aksty/Jokepy) | [aksty](https://github.com/aksty) |
| [Dark1](https://github.com/whiteadi/Dark1) | [whiteadi](https://github.com/whiteadi) |
| [Prejudice Networks](https://github.com/LiamTownsley/Prejudice-Networks) | [Liam Townsley](https://github.com/LiamTownsley) |
| [https://irshad.ml/humour.html](https://irshad.ml/humour.html) | [draco-malfoy](https://github.com/draco-malfoy) |
| [Random Joke Generator with Flutter](https://github.com/variousnabil/Random-Joke-Generator-with-Flutter) | [variousnabil](https://github.com/variousnabil) |
| [comma](https://thatcopy.pw/comma) | [ThatCopy](https://github.com/ThatCopy) |
| [Joke Teller](https://github.com/AlHood77/Joke_Teller) | [AlHood77](https://github.com/AlHood77) |
| [Jokes plugin for Craft CMS 3.x](https://github.com/remcoov/jokes) | [remcoov](https://github.com/remcoov) |
| [PoshBot.Joker](https://github.com/ToastIT-dev/PoshBot.Joker) | [ToastIT-dev](https://github.com/ToastIT-dev) |
| [JokeAPI_ComputerCraft](https://github.com/Sv443/JokeAPI_ComputerCraft) | [Sv443](https://github.com/Sv443) |
| [Dev Dad Jokes](https://github.com/jonathanbossenger/devdadjokes) | [Jonathan Bossenger](https://github.com/jonathanbossenger) |

<br>

[Submit an issue](https://github.com/Sv443/JokeAPI/issues/new/choose) and select `Dependent` to get your project added here

<!--
Old list-style dependents:
- [dozens Advices](https://github.com/ZephyrVentum/dozens-Advices) by [ZephyrVentum](https://github.com/ZephyrVentum)
- [Shadow-bot](https://github.com/QGIsK/Shadow-bot) by [QGIsK](https://github.com/QGIsK)
- [Jokepy](https://github.com/aksty/Jokepy) by [aksty](https://github.com/aksty)
Expand All @@ -47,15 +69,14 @@
- [Joke Teller](https://github.com/AlHood77/Joke_Teller) by [AlHood77](https://github.com/AlHood77)
- [Jokes plugin for Craft CMS 3.x](https://github.com/remcoov/jokes) by [remcoov](https://github.com/remcoov)
- [PoshBot.Joker](https://github.com/ToastIT-dev/PoshBot.Joker) by [ToastIT-dev](https://github.com/ToastIT-dev)


[Submit an issue](https://github.com/Sv443/JokeAPI/issues/new/choose) and select `New Dependent` to get your project added here
- [JokeAPI_ComputerCraft](https://github.com/Sv443/JokeAPI_ComputerCraft) by [Sv443](https://github.com/Sv443)
-->


<br><br>
<div align="center" style="text-align:center">

Made with ❤️ by [Sv443](https://github.com/Sv443)
If you want to, you can support me on [Patreon](https://patreon.com/Sv443_), [Ko-fi](https://ko-fi.com/Sv443_) or [PayPal](https://paypal.me/SvenFehler)
Like JokeAPI? Please consider [supporting me](https://github.com/sponsors/Sv443)

</div>
42 changes: 39 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# JokeAPI Changelog (Version 2.3.0)
# JokeAPI Changelog (Version 2.3.1)

<br><br><br>

## [Planned for future releases]
- Allow definition of max requests per minute per each client ([issue #37](https://github.com/Sv443/JokeAPI/issues/37))
- Add positive flags and a "?whitelistFlags" param ([issue #127](https://github.com/Sv443/JokeAPI/issues/127))
Expand All @@ -9,7 +10,21 @@


<br><br><br>
## [CURRENT: 2.3.0] - The Safe Mode Update

## [CURRENT: 2.3.1] - The Safe Mode Hotfix, because bugs exist for some reason ([pull request #214](https://github.com/Sv443/JokeAPI/pull/214))
- Fixed bug "API Error 500 - Cannot read property 'msBeforeNext' of null" ([issue #212](https://github.com/Sv443/JokeAPI/issues/212))
- Fixed bug where API responded with Error 106 when using format=txt on endpoint /joke ([issue #218](https://github.com/Sv443/JokeAPI/issues/218))
- Re-flagged joke 79 ([issue #220](https://github.com/Sv443/JokeAPI/issues/220))
- API now automatically adds modification date <meta> tag to the docs ([issue #223](https://github.com/Sv443/JokeAPI/issues/223))
- /info endpoint now gives the number of safe jokes per language ([issue #224](https://github.com/Sv443/JokeAPI/issues/224))
- Added dependent jonathanbossenger/devdadjokes ([issue #225](https://github.com/Sv443/JokeAPI/issues/225))
- Added translations to joke submission parser
- Made static content not indexable by web crawlers


<br><br><br>

## [2.3.0] - The Safe Mode Update
- JokeAPI now has its own domain - https://jokeapi.dev/
- Version 2 of the API should be called @ https://v2.jokeapi.dev/ but can also be called with the old domain and https://jokeapi.dev/
- The stage version is @ https://stage.jokeapi.dev/
Expand Down Expand Up @@ -43,6 +58,7 @@


<br><br><br>

## [2.2.2] - The Seasonal Update
- Added some new seasonal categories ([issue #180](https://github.com/Sv443/JokeAPI/issues/180))
- Spooky (Halloween)
Expand All @@ -54,8 +70,9 @@


<br><br><br>

## [2.2.1] - Version 2.2 Hotfix
- Added the Czech translation (PR #137) - provided by @ThatCopy (https://github.com/ThatCopy) - thanks :)
- Added the Czech translation ([pull request #137](https://github.com/Sv443/JokeAPI/pull/137)) - provided by @ThatCopy (https://github.com/ThatCopy) - thanks :)
- Added a missing conversion mapping when using format `txt` and the `amount` parameter on endpoint `/joke` ([issue #138](https://github.com/Sv443/JokeAPI/issues/138))
- Fixed wrong URLs in the documentation's JavaScript
- Fixed crash when a client asks for a translation that doesn't exist
Expand All @@ -64,6 +81,7 @@


<br><br><br>

## [2.2.0] - The Pun Update
- Added joke category "Pun" ([issue #105](https://github.com/Sv443/JokeAPI/issues/105))
- Added "?amount" parameter to joke endpoint so multiple jokes can be fetched at once ([issue #126](https://github.com/Sv443/JokeAPI/issues/126))
Expand All @@ -83,6 +101,7 @@


<br><br><br>

## [2.1.5] - 2020 Q3 general patch #2
- Ditched my botched rate limiting package for a "commercial" one ([issue #113](https://github.com/Sv443/JokeAPI/issues/113))
- Added API token section to documentation ([issue #114](https://github.com/Sv443/JokeAPI/issues/114))
Expand All @@ -92,11 +111,13 @@


<br><br><br>

## [2.1.4] - 2020 Q3 general patch #1
- Fixed the IP getter module for like the 500th time now


<br><br><br>

## [2.1.3] - 2020 Q2 general patch #1
- Added option to disable all console output but error messages ([issue #72](https://github.com/Sv443/JokeAPI/issues/72))
- The content of jokes in the joke submission form is now correctly escaped and can no longer mess up the page ([issue #68](https://github.com/Sv443/JokeAPI/issues/68))
Expand All @@ -106,6 +127,7 @@


<br><br><br>

## [2.1.2] - Plain Text update
- Added file format "txt" to receive data as plain text
- Fixed the joke submission URL in the /info endpoint data
Expand All @@ -115,12 +137,14 @@


<br><br><br>

## [2.1.1] - Auth update hotfix
- Fixed incorrect error cause when using an out-of-range ID range parameter (see [issue #54](https://github.com/Sv443/JokeAPI/issues/54))
- Added submission form (https://v2.jokeapi.dev/#submit)


<br><br><br>

## [2.1.0] - The auth update
- Added an authorization header to make whitelisting possible without needing to have a static IP
- Added the script "npm run add-token [amount]" to add one or more tokens
Expand All @@ -129,6 +153,7 @@


<br><br><br>

## [2.0.1] - A few hotfixes for the big 2.0.0 updates and some very very minor features I wanted to add
- Hotfixed a few bugs from the big 2.0.0 update
- Fixed joke ID caching (to not serve the same jokes multiple times)
Expand All @@ -137,6 +162,7 @@


<br><br><br>

## [2.0.0] - The complete rewrite - JokeAPI was completely rewritten and should now run like 100x better and be more easy to develop and maintain
- Massively improved the "Try it out" section in the docs
- Reformatted the jokes to always contain all flags
Expand Down Expand Up @@ -169,26 +195,30 @@


<br><br><br>

## [1.1.2]
oke categories are now case insensitive
railing slashes now don't produce an "invalid category" error anymore


<br><br><br>

## [1.1.1]
etter IP getter for the rate limiting
pdated dependencies
ery small improvements to the console window


<br><br><br>

## [1.1.0]
- switched to ReadStreams instead of just loading the entire file to RAM to massively improve request performance (more details in [issue #2](https://github.com/Sv443/JokeAPI/issues/2))
- this basically means it transmits the data over time, instead of loading it all to RAM and sending it at once
dded rate limiting to counter DoS attacks (yes I've been getting some of those *sigh*)


<br><br><br>

## [1.0.0]
- turned the single endpoint into multiple endpoints
- "categories" to get all available categories
Expand Down Expand Up @@ -221,6 +251,7 @@ dded rate limiting to counter DoS attacks (yes I've been getting some of those *


<br><br><br>

## [0.1.2]
- added "Dark" category
- added joke submission form
Expand All @@ -229,15 +260,20 @@ dded rate limiting to counter DoS attacks (yes I've been getting some of those *


<br><br><br>

## [0.1.1]
- added interactive example on docs page
- made icon on docs page smaller
- added wrapper script


<br><br><br>

## [0.1.0]
- basic functionality
- 47 jokes
- category filter

<br><br><br>

This file was auto-generated from the source file at [./changelog.txt](./changelog.txt)
15 changes: 13 additions & 2 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=====================
JokeAPI Changelog
- Version 2.3.0 -
- Version 2.3.1 -
=====================


Expand All @@ -11,7 +11,18 @@
- Serve docs with nginx to speed up page load times (issue #118)


[CURRENT: 2.3.0] - The Safe Mode Update
[CURRENT: 2.3.1] - The Safe Mode Hotfix, because bugs exist for some reason (PR #214)
- Fixed bug "API Error 500 - Cannot read property 'msBeforeNext' of null" (issue #212)
- Fixed bug where API responded with Error 106 when using format=txt on endpoint /joke (issue #218)
- Re-flagged joke 79 (issue #220)
- API now automatically adds modification date <meta> tag to the docs (issue #223)
- /info endpoint now gives the number of safe jokes per language (issue #224)
- Added dependent jonathanbossenger/devdadjokes (issue #225)
- Added translations to joke submission parser
- Made static content not indexable by web crawlers


[2.3.0] - The Safe Mode Update
- JokeAPI now has its own domain - https://jokeapi.dev/
- Version 2 of the API should be called @ https://v2.jokeapi.dev/ but can also be called with the old domain and https://jokeapi.dev/
- The stage version is @ https://stage.jokeapi.dev/
Expand Down
22 changes: 19 additions & 3 deletions data/jokes/jokes-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1233,17 +1233,17 @@
"safe": true
},
{
"category": "Pun",
"category": "Dark",
"type": "twopart",
"setup": "What do Japanese cannibals eat?",
"delivery": "Raw men.",
"flags": {
"nsfw": false,
"nsfw": true,
"religious": false,
"political": false,
"racist": false,
"sexist": false,
"explicit": false
"explicit": true
},
"id": 79,
"safe": false
Expand Down Expand Up @@ -4561,6 +4561,22 @@
},
"safe": false,
"id": 289
},
{
"category": "Pun",
"type": "twopart",
"setup": "Why does the size of the snack not matter to a giraffe?",
"delivery": "Because even a little bit goes a long way.",
"flags": {
"nsfw": false,
"religious": false,
"political": false,
"racist": false,
"sexist": false,
"explicit": false
},
"safe": true,
"id": 290
}
]
}
Loading

0 comments on commit 585cc34

Please sign in to comment.