maartendecat / icndb-api Goto Github PK
View Code? Open in Web Editor NEWThe API behind http://api.icndb.com/
The API behind http://api.icndb.com/
<br />
<b>Notice</b>: Undefined index: in <b>/home/alumni/mdecat/chuck/api-github/classes/ChuckDatabase.inc.php</b> on line <b>124</b><br />
<br />
<b>Fatal error</b>: Uncaught Error: Call to a member function replaceNames() on null in /home/alumni/mdecat/chuck/api-github/classes/ChuckAPI.inc.php:220
Stack trace:
#0 /home/alumni/mdecat/chuck/api-github/api.php(78): ChuckAPI->echoRandomQuoteBelongingTo('Chuck', 'Norris', Array)
#1 {main}
thrown in <b>/home/alumni/mdecat/chuck/api-github/classes/ChuckAPI.inc.php</b> on line <b>220</b><br />
When using some string in limitTo and it's not found maybe?:
http://api.icndb.com/jokes/random?limitTo=[test]
Uncaught Error: Call to undefined method ChuckAPI::echoException()
seems there have been a typo will fix and send the pull request for the same
Sample Url:
http://api.icndb.com/jokes/22222
I can't use the API at http://api.icndb.com/jokes/random
❯ wget http://api.icndb.com/jokes/random
--2016-05-19 15:55:49-- http://api.icndb.com/jokes/random
Resolving api.icndb.com (api.icndb.com)... 104.31.83.58, 104.31.82.58
Connecting to api.icndb.com (api.icndb.com)|104.31.83.58|:80... connected.
HTTP request sent, awaiting response... 522 Origin Connection Time-out
2016-05-19 15:56:05 ERROR 522: Origin Connection Time-out.
Hello,
I was quite saddened to release that ICNDB.com no longer exists! :'(
Especially as I'm one (of many, I'm sure) who has written a library / plugin for my favourite language / platform / app that connects to ICNDB.com for daily humour. ICNDB was a brilliant idea!
But, I know that maintaining such an Internet resource can be time-consuming, so I understand the decision to retire it. But it does beg the question...
I would love to grab a copy of this, if only to resurrect locally. I know there is chucknorris.io
but it's just not the same!
Regards,
Steve.
I had tried to commit the changes but got 403—permission denied.
I recently made use of your fantastic API on a small site built to practice working with APIs. It worked fine on my local development environment but when I pushed it to GitHub pages I ran into the problem that the API doesn't have an ‘Access-Control-Allow-Origin’ CORS header, making it tricky to call from a site via JavaScript. I've tried using crossorigin.me and cors.io with limited success. Would it be possible to add the header to the API in a future build?
Error on Firefox Developer Edition Version 62.0b4 (64-bit):
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://crossorigin.me/https://api.icndb.com/jokes/random/5. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
E.g. http://api.icndb.com/jokes/537?escape=javascript
It escapes '
, which is wrong.
I do not know any PHP, so I can't provide a PR, but I found this http://www.pontikis.net/tip/?id=5
EDIT: For anyone finding this, and using JavaScript
JSON.parse(response.replace(/\\'/g, '\''));
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.