Search code examples
apijsfiddletrello

how to use trello api client.js with jsfiddle.net


I have started learning trello api and trying a trello api client.js and developing basic application based on example given on trello.com. I pasted code on following link http://jsfiddle.net/Ezyw4/2/ it is not working. Is there any mistake in my code. Thanks in advance!


Solution

  • This issue is specific to JSFiddle. It isn't loading client.js at all, because it doesn't know what kind of resource it is.

    You've referenced

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

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

    From the JSFiddle docs:

    Warning: jsFiddle is recognizing the type of the resource by the extension. If you want to use a dynamic resource please add a dummy GET variable i.e. http://example.com/download/js/dynamically.js?somevar=somevalue&dummy=.js. This will trick jsFiddle to recognize it as JavaScript resource.

    You can solve this by appending &dummy=.js to the end of your managed resource URL, i.e.

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