On Wednesday, June 17, 2015 at 11:43:26 AM UTC+2, Richard Smith wrote: > > Hi Mario - I found the github api and was just reading up on it. I thought > it might be a good way for me to learn a bit more about how api calls work. > I see your point about calling the api repeatedly - what do you think the > best practice would be in this regard? ie; is there a way to limit the > number of times it gets called (once?) - for example only when the wiki is > loaded and store the result? >
You can cache the results in a data tiddler and check it prior to creating new api calls. > Is there anywhere in the existing code that makes api calls? > Yes the tiddlyweb sync adaptor plugin. It's probably not the perfect fit, but it shows how the http utility functions are used. see: https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/utils/dom/http.js and https://github.com/Jermolene/TiddlyWiki5/tree/master/plugins/tiddlywiki/tiddlyweb hope that helps -mario -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7af64665-b6e0-4559-8c3a-bdef0719d090%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

