diff --git a/demos/gallery/samples/comms/Connection.js b/demos/gallery/samples/comms/Connection.js new file mode 100644 index 0000000000..8cfc0cb97a --- /dev/null +++ b/demos/gallery/samples/comms/Connection.js @@ -0,0 +1,23 @@ +import { JSONEditor } from "@hpcc-js/codemirror"; +import { Connection } from "@hpcc-js/comms"; + +new Connection({ + baseUrl: "https://api.pushshift.io/", + type: "get" +}) +.send("reddit/search/submission/", { + "subreddit":"askreddit", + "sort":"desc", + "sort_type":"created_utc", + "size":"5", +}).then((json) => { + new JSONEditor() + .target("target") + .json(json) + .render() + ; +}) +.catch((e) => { + console.error(e); +}) +; \ No newline at end of file diff --git a/packages/comms/README.md b/packages/comms/README.md new file mode 100644 index 0000000000..0fb5e52444 --- /dev/null +++ b/packages/comms/README.md @@ -0,0 +1,50 @@ +# @hpcc-js/comms +This package is part of the mono repository "@hpcc-js" (aka Visualization Framework), for more information including [Quick Start](https://github.com/hpcc-systems/Visualization/wiki/Quick-Start), [Gallery](https://raw.githack.com/hpcc-systems/Visualization/master/demos/gallery/gallery.html) and [Tutorials](https://github.com/hpcc-systems/Visualization/wiki/Tutorials), please visit the main page on GitHub: [hpcc-systems/Visualization](https://github.com/hpcc-systems/Visualization). + +## Exported Widgets +* [Connection](https://raw.githack.com/hpcc-systems/Visualization/master/demos/gallery/playground.html?./samples/comms/Connection.js) + +## Stand-alone HTML Example +```html + + + Simple Connection+Codemirror + + + + + + + +
+ + + +``` + +## Getting Started with @hpccjs +* _[Quick Start](https://github.com/hpcc-systems/Visualization/wiki/Quick-Start)_ +* _[Tutorials](https://github.com/hpcc-systems/Visualization/wiki/Tutorials)_ +* _[Gallery](https://raw.githack.com/hpcc-systems/Visualization/master/demos/gallery/gallery.html)_ ([alt](https://rawgit.com/hpcc-systems/Visualization/master/demos/gallery/gallery.html)) +* _[Wiki](https://github.com/hpcc-systems/Visualization/wiki)_