Difference between revisions of "Widget:SpaceAPI"
(created first draft of SpaceAPI widget (used Widget:ImageLoader as template) |
m (made widget visible) |
||
Line 34: | Line 34: | ||
// "src" : "<!--{$url|validate:url}-->" | // "src" : "<!--{$url|validate:url}-->" | ||
// width="<!--{$width|escape:html|default:auto}-->" height="<!--{$height|escape:html|default:auto}-->" | // width="<!--{$width|escape:html|default:auto}-->" height="<!--{$height|escape:html|default:auto}-->" | ||
− | |||
// Use interval timer id as image id | // Use interval timer id as image id | ||
var interval = 1000 * <!--{$interval|validate:int|default:0}-->; | var interval = 1000 * <!--{$interval|validate:int|default:0}-->; | ||
+ | document.write( 'TODO: Widget:SpaceAPI' ); | ||
}( )); | }( )); | ||
</script> | </script> | ||
</includeonly> | </includeonly> |
Revision as of 11:14, 20 July 2015
This widget allows you to display the Space API data (provided as JSON)
Created by Xopr
Using this widget
To insert this widget, use the following code:
{{#widget:SpaceAPI |url=https://ackspace.nl/spaceAPI |width=300 |height=250 |interval=20 }}
This will give the following result:
Note that url is mandatory, the rest is optional (leave out interval to make the data static)
Copy to your site
To use this widget on your site, just install MediaWiki Widgets extension and copy full source code of this page to your wiki as Widget:SpaceAPI article.