How to use trello api client.js using jsfiddle.net

I started learning the trello api and trying the trello api client.js and developing a basic application based on the example provided at trello.com. I pasted the code from the following link http://jsfiddle.net/Ezyw4/2/

it doesn't work. Is there a mistake in my code. Thanks in advance!

+3


source to share


2 answers


This issue is JSFiddle specific. It doesn't load client.js at all because it doesn't know what resource it is.

You specified

https://api.trello.com/1/client.js?key=yourapikey

... and since there is no extension at the very end of the URL , the JSFiddle doesn't know what resource it is.



From the JSFiddle docs :

Warning: jsFiddle recognizes resource type using extension. If you want to use a dynamic resource, add a dummy Variable GET, i.e. http://example.com/download/js/dynamically.js?somevar=somevalue&dummy=.js . This will cause jsFiddle to recognize it as a JavaScript resource.

You can solve this problem by appending &dummy=.js

to the end of the URL of the managed resource, i.e.

https://api.trello.com/1/client.js?key=yourapikey&dummy=.js

      

+8


source


I would just use Google Docs to create a small application. You can build a web app from Google Drive (not Docs). Also Google gives you an actual debugger that you can use; see your variables, functions, etc. In fact, it gives you the ability to go through it all with checkpoints and everything. A word of warning is that it takes forever. I had about 150 lines of script tied to a spreadsheet and it would take 2-4 minutes to debug; since it has to post the code to google server check it and post back. If you make any REST calls for this time to the server and back too. But it beats doing it blindly or using console.log (which doesn't actually work on google scripts ... doesn't warn about either).



-2


source







All Articles