{"_id":"bugswarm-prt","_rev":"64-b5c3663cd847d976f8ac9a91cb2291f1","name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","dist-tags":{"latest":"0.4.3"},"versions":{"0.1.0":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.1.0","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api.git"},"engines":{"node":">= 0.4.3 < 0.6.2"},"devDependencies":{"mocha":"0.3.6","bugswarm-cfg":"0.1.0"},"main":"bugswarm-prt","_npmUser":{"name":"buglabs","email":"camilo@buglabs.net"},"_id":"bugswarm-prt@0.1.0","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"af8b0c16cea7510bfb2ea0bb4584d079ae581bdd","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.1.0.tgz","integrity":"sha512-FZJwK9ugcW7CU16x97McBbkLhnxWyGGcM083tplj5L2dcQjuJIxno9MgpPMEb0pOPc/4CaF8CFDDNhX59TxaaA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCoifqEmzHRqDrg/iDc4fEoymu51jhmTuPkXC9y1eN+gIgD0i46jmYHWl6jFliWj9p45sZccaoOyu4BfX73+jwna0="}]},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"}],"directories":{}},"0.1.4":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.1.4","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api.git"},"engines":{"node":">= 0.4.3 < 0.6.2"},"devDependencies":{"mocha":"0.3.6","bugswarm-cfg":"0.1.4"},"dependencies":{"superagent":"https://github.com/downloads/c4milo/superagent/7714da.tgz"},"main":"bugswarm-prt","_npmUser":{"name":"buglabs","email":"eng@buglabs.net"},"_id":"bugswarm-prt@0.1.4","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"5e1a3302b6a0f3085c792525bc2907ef314aabb6","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.1.4.tgz","integrity":"sha512-BvjVFjx8Laf1yxI2t7h8beWXndwgh+ocgefUMJhFiGNyv3tjafGuLykhKRpj/fjAnAaStNhuwyfb7jxFCCwjBA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBCXttcD3EdS+a3xdUD27nZXF9Gk/yl88tzQBJaEkizXAiEA//n9GcyQg29VfS2qfLwsO12HXMSzLLcG6JrV14VEb0c="}]},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"}],"directories":{}},"0.1.5":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.1.5","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api.git"},"engines":{"node":">= 0.4.3 < 0.6.2"},"devDependencies":{"mocha":"0.3.6","bugswarm-cfg":"0.1.4"},"dependencies":{"superagent":"https://github.com/downloads/c4milo/superagent/7714da.tgz"},"main":"bugswarm-prt","_npmUser":{"name":"buglabs","email":"eng@buglabs.net"},"_id":"bugswarm-prt@0.1.5","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"e79409c6e41919cdfcc25b50104023eae66cdd14","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.1.5.tgz","integrity":"sha512-6gD+8OKrCLzNK7jZuutu81nsUhPzhQspnW7q/eqH8oHisvtThePOWOJtTNpRxNH3crvuIlwvr0wjLmlaBTFw+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDc43G2Uev6DjjxCJT1nSq83Cd3NW56vaWzLx2ZkSd4mgIhAJ6MGcphF8sEYiwL9J+7alhgIGItHWXSlbzz6jaRJzFI"}]},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"}],"directories":{}},"0.1.6":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.1.6","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api.git"},"engines":{"node":">= 0.4.3 < 0.6.2"},"devDependencies":{"mocha":"0.3.6","bugswarm-cfg":"0.1.4"},"dependencies":{"superagent":"https://github.com/downloads/c4milo/superagent/7714da.tgz"},"main":"bugswarm-prt","_npmUser":{"name":"buglabs","email":"eng@buglabs.net"},"_id":"bugswarm-prt@0.1.6","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"d8617a79b130a769d907c2669b9fb44a5ac8c52a","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.1.6.tgz","integrity":"sha512-SohCqrvZIRQZ18RlipWED1FVKf4sIMJ7AuTKtGjpYjyXLX0id280kMC4+4QXEvzYcqkN3VeF3d8+ePP0GpIWYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuyiRi/DfIF1/B3CWXFvMfC1Mi0rtCaqqPjTsWzEkKHgIgKlJzm+eLQeUWpqxoXYUFxE+DPpCNgC/I5iyH2Q8J9r8="}]},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"}],"directories":{}},"0.1.7":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.1.7","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api.git"},"engines":{"node":">= 0.4.3 < 0.6.2"},"devDependencies":{"mocha":"0.3.6","bugswarm-cfg":"0.1.4"},"dependencies":{"superagent":"https://github.com/downloads/c4milo/superagent/7714da.tgz"},"main":"bugswarm-prt","_npmUser":{"name":"buglabs","email":"eng@buglabs.net"},"_id":"bugswarm-prt@0.1.7","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"b719cf67f5cb5e31b88e18176c1d5557e448a0ed","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.1.7.tgz","integrity":"sha512-qfQGK9xtkAKw9K4r6QZX32RfFT3WaPW7frri1OgFupNHkVIhz8EPBNoXA42xhewQZVB26HofL2TD4WTDWPa88w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvJjErMhCB2aAeJ91MlMCDh4q/toup/JXCD0tUNAni/QIgSECdyS4qaGF4k3L1YtRziCiDMGh9/TwYk+8Mk84jPTg="}]},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"}],"directories":{}},"0.1.8":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.1.8","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api.git"},"engines":{"node":"0.6"},"devDependencies":{"mocha":"0.3.6","bugswarm-cfg":"0.1.5"},"dependencies":{"superagent":"https://github.com/downloads/c4milo/superagent/7714da.tgz"},"main":"bugswarm-prt","_npmUser":{"name":"buglabs","email":"eng@buglabs.net"},"_id":"bugswarm-prt@0.1.8","_engineSupported":true,"_npmVersion":"1.1.0-beta-10","_nodeVersion":"v0.6.7","_defaultsLoaded":true,"dist":{"shasum":"9728b12daee9c3951319f07d418931eebab8c33b","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.1.8.tgz","integrity":"sha512-0UMj5O6dy98V9rNVwyVYWgGy5NtOSbxthjQJ5+0RDpS5m8C2WHnlqGm5pEKsGl0sidIySwZbJBDECBGYcjifmA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSnXo0yFTrqT1E40HCTaIka44WeBhK1OqTlw/pfckzTgIhAOcd1RM+3WLQrYo67GVFTPLJpAsfLJMp1yQWWNrvblTQ"}]},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"}],"directories":{}},"0.1.9":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.1.9","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api.git"},"engines":{"node":"0.6"},"devDependencies":{"mocha":"0.3.6","bugswarm-cfg":"0.1.5"},"dependencies":{"superagent":"https://github.com/c4milo/superagent/tarball/v0.1.5"},"main":"bugswarm-prt","_npmUser":{"name":"buglabs","email":"eng@buglabs.net"},"_id":"bugswarm-prt@0.1.9","_engineSupported":true,"_npmVersion":"1.1.0-beta-10","_nodeVersion":"v0.6.7","_defaultsLoaded":true,"dist":{"shasum":"0ae5a10374b713d2e6fa0f8c264fd07cafb0a310","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.1.9.tgz","integrity":"sha512-ceMfh3rHLxGWz157GVmKblD3tlfOKAX/JAeeUWiqbpvrcXyDmaRlaZYPAo3k0gUo8muTCdj39txsXZOiWLIX8g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAyKo/J2DXuyJ3q52/yu7ohlP5Be3jLPCqvwztrY/FynAiA8hS7ejJnT9FXDQvsowjncwnRC90pVK7TajoM1u4LKXg=="}]},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"}],"directories":{}},"0.2.0":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.2.0","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api.git"},"engines":{"node":"0.6"},"devDependencies":{"should":"0.5.1","mocha":"0.11.0","bugswarm-cfg":"0.2.0"},"dependencies":{"superagent":"https://github.com/c4milo/superagent/tarball/v0.1.5"},"main":"bugswarm-prt","_npmUser":{"name":"buglabs","email":"eng@buglabs.net"},"_id":"bugswarm-prt@0.2.0","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-3","_nodeVersion":"v0.6.10","_defaultsLoaded":true,"dist":{"shasum":"e31e1c55f393f114c5ea67ae706662188a85c4ea","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.2.0.tgz","integrity":"sha512-lA1veQKNeJXHZWUr1ctCbgTR12zr8VrmYZlWhwoCY+j31fkjrX/VZMDr4Gwe9/dR901hKsPXDRxG/fvprctSXw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID7FTXZUQEbewVMDpoVc2XfsBgH6PUAfdJFThmU+yYS/AiAe75mkeOZ9H2lN4v7qr+MrBCNAgxdddMwo6KzHF5NeLw=="}]},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"}],"directories":{}},"0.2.1":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.2.1","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api.git"},"engines":{"node":"0.6"},"devDependencies":{"should":"0.5.1","mocha":"0.11.0","bugswarm-cfg":"0.2.0"},"dependencies":{"superagent":"https://github.com/c4milo/superagent/tarball/v0.1.5"},"main":"bugswarm-prt","_npmUser":{"name":"c4milo","email":"camilo.aguilar@gmail.com"},"_id":"bugswarm-prt@0.2.1","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.4","_nodeVersion":"v0.6.12","_defaultsLoaded":true,"dist":{"shasum":"9bda4df87ed298ef65dc3d89b015ee18cc02100b","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.2.1.tgz","integrity":"sha512-bFv4yVTQkUg64Fb9Iaf5CCAK4DyjIlvQ10uup1SG5lwdvxC2H4o19r+LsM6Nd5yBq9Vp+q+ZKJJ9YWkrBSUpeQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEL2eqXZh53hN+9CG7Zo9mkxD14bbutK8W5VeuUxoPNOAiBIV3GjtQaB8zYz7YoZO9IM0DTh47XYRV3qTUdLa6GMZA=="}]},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"},{"name":"c4milo","email":"camilo.aguilar@gmail.com"}],"directories":{}},"0.2.2":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.2.2","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api.git"},"engines":{"node":"0.6"},"devDependencies":{"should":"0.6.0","mocha":"0.14.1","bugswarm-cfg":"0.2.2"},"dependencies":{"superagent":"https://github.com/c4milo/superagent/tarball/v0.1.5"},"main":"bugswarm-prt","_npmUser":{"name":"c4milo","email":"camilo.aguilar@gmail.com"},"_id":"bugswarm-prt@0.2.2","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.12","_nodeVersion":"v0.6.14","_defaultsLoaded":true,"dist":{"shasum":"665bda7ae705d4f2ec8d027b8603dd34958006ed","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.2.2.tgz","integrity":"sha512-MXnnqdL6UlGZH4kMDB8tisQQce0tX8Wk/atxj6oXITtFlEOEPtY/VG8YQQx3RDO2utYwlvXt18utLs30sBgPJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDn2Su7r9S5Q924DsqWwayj4tHuUK7hOjY3swnNX+Lo0AIgEoGP58FdBz0XldzlXy/7tnO6PxIdr3gCLoUotcnMA4o="}]},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"},{"name":"c4milo","email":"camilo.aguilar@gmail.com"}],"directories":{}},"0.3.2":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.3.2","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api"},"engines":{"node":">=0.6"},"devDependencies":{"should":"1.2.1","mocha":"1.8.1","bugswarm-cfg":"0.3.2"},"dependencies":{"superagent":"https://github.com/c4milo/superagent/tarball/v0.1.5"},"main":"bugswarm-prt","readme":"# BUGswarm participation NodeJS library\n\nThis library allows you to send and receive\nmessages and binary data to BUGswarm in realtime, communicate with resources within one swarm as well \nas resources spread out in different swarms.\n\nThis library is an implementation of \n[BUGswarm Participation API](http://developer.bugswarm.net/participation_api.html).\n\n### Features\n* Sends and receives private and public messages, as well as presence, \n  between swarms and resources.\n* Sends and receives binary files.\n\n### Installation\n`npm install bugswarm-prt`\n\n### Usage example\n\n####Consuming data:\n\n```javascript\nvar SwarmConnection = require('bugswarm-prt');\n\nvar options = {\n    apikey: 'YOUR PARTICIPATION API KEY',\n    resource: 'YOUR RESOURCE ID',\n    //Keep in mind that your resource has to be a participant in all of these swarms.\n    swarms: ['SWARM ID 1', 'SWARM ID 2'] \n};\n\nvar consumer = new SwarmConnection(options);\nconsumer.on('message', function(message) {\n    console.log('message: ' + message);\n});\n\nconsumer.on('error', function(err) {\n    console.log(err);\n});\n\nconsumer.on('connect', function(err) {\n    console.log('Connected to the platform');\n});\n\nconsumer.on('presence', function(presence) {\n    console.log('presence: ' + presence);\n});\n\nconsumer.on('disconnect', function() {\n    console.log('disconnected');\n});\n\n//here is where the magic starts\nconsumer.connect();\n\n```\n\n####Producing data:\n\n```javascript\nvar SwarmConnection = require('bugswarm-prt');\n\nvar options = {\n    apikey: 'YOUR PARTICIPATION API KEY',\n    resource: 'YOUR RESOURCE ID',\n    //Keep in mind that your resource has to be a participant in all of these swarms.\n    swarms: ['SWARM ID 1', 'SWARM ID 2'] \n};\n\nvar producer = new SwarmConnection(options);\nvar interval;\n\nproducer.on('connect', function(err) {\n    /**\n     * Sends a public message every 1 second.\n     **/\n    interval = setInterval(function() {\n        producer.send('yo! in public');\n    }, 1000);  \n});\n\nproducer.on('disconnect', function() {\n    clearInterval(interval);\n});\n\nproducer.connect();\n\n```\n\nTake a look at the [documentation]() for details about the library API and, \nfor more comprehensive usage, at the [specs](https://github.com/buglabs/bugswarm-api/tree/master/nodejs/participation/specs) directory. \n\n### Fork it, improve it and send us pull requests.\n```shell\ngit clone git@github.com:buglabs/bugswarm-api.git && cd bugswarm-api/nodejs/participation\n```\n\n## License\n(The MIT License)\n\nCopyright 2011 BugLabs. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\n\n","readmeFilename":"README.md","_id":"bugswarm-prt@0.3.2","dist":{"shasum":"5be53522216ed14d30bae3b8a8ced5dc1675956d","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.3.2.tgz","integrity":"sha512-rb2nMGo3sMAilm8Q2OjuxgDXsb+EZNp+nCXS89reQA8cJuIPdFZH401eQfHE1i5SBV6jZYiR4Dkb6Ou1FgxKVQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDm8ymFw0km/vEJML48WS5WmEm3zct4i0EuNXn1rBVAqQIgU25KN7/P6zWtZd6UAE01KHKxoaz/FaXkbCdRpWHtfmQ="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"c4milo","email":"camilo.aguilar@gmail.com"},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"},{"name":"c4milo","email":"camilo.aguilar@gmail.com"}],"directories":{}},"0.3.3":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.3.3","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api"},"engines":{"node":">=0.6"},"devDependencies":{"should":"1.2.1","mocha":"1.8.1","bugswarm-cfg":"0.3.3"},"dependencies":{"superagent":"https://github.com/c4milo/superagent/tarball/v0.1.5"},"main":"bugswarm-prt","readme":"# BUGswarm participation NodeJS library\n\nThis library allows you to send and receive\nmessages and binary data to BUGswarm in realtime, communicate with resources within one swarm as well \nas resources spread out in different swarms.\n\nThis library is an implementation of \n[BUGswarm Participation API](http://developer.bugswarm.net/participation_api.html).\n\n### Features\n* Sends and receives private and public messages, as well as presence, \n  between swarms and resources.\n* Sends and receives binary files.\n\n### Installation\n`npm install bugswarm-prt`\n\n### Usage example\n\n####Consuming data:\n\n```javascript\nvar SwarmConnection = require('bugswarm-prt');\n\nvar options = {\n    apikey: 'YOUR PARTICIPATION API KEY',\n    resource: 'YOUR RESOURCE ID',\n    //Keep in mind that your resource has to be a participant in all of these swarms.\n    swarms: ['SWARM ID 1', 'SWARM ID 2'] \n};\n\nvar consumer = new SwarmConnection(options);\nconsumer.on('message', function(message) {\n    console.log('message: ' + message);\n});\n\nconsumer.on('error', function(err) {\n    console.log(err);\n});\n\nconsumer.on('connect', function(err) {\n    console.log('Connected to the platform');\n});\n\nconsumer.on('presence', function(presence) {\n    console.log('presence: ' + presence);\n});\n\nconsumer.on('disconnect', function() {\n    console.log('disconnected');\n});\n\n//here is where the magic starts\nconsumer.connect();\n\n```\n\n####Producing data:\n\n```javascript\nvar SwarmConnection = require('bugswarm-prt');\n\nvar options = {\n    apikey: 'YOUR PARTICIPATION API KEY',\n    resource: 'YOUR RESOURCE ID',\n    //Keep in mind that your resource has to be a participant in all of these swarms.\n    swarms: ['SWARM ID 1', 'SWARM ID 2'] \n};\n\nvar producer = new SwarmConnection(options);\nvar interval;\n\nproducer.on('connect', function(err) {\n    /**\n     * Sends a public message every 1 second.\n     **/\n    interval = setInterval(function() {\n        producer.send('yo! in public');\n    }, 1000);  \n});\n\nproducer.on('disconnect', function() {\n    clearInterval(interval);\n});\n\nproducer.connect();\n\n```\n\nTake a look at the [documentation]() for details about the library API and, \nfor more comprehensive usage, at the [specs](https://github.com/buglabs/bugswarm-api/tree/master/nodejs/participation/specs) directory. \n\n### Fork it, improve it and send us pull requests.\n```shell\ngit clone git@github.com:buglabs/bugswarm-api.git && cd bugswarm-api/nodejs/participation\n```\n\n## License\n(The MIT License)\n\nCopyright 2011 BugLabs. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\n\n","readmeFilename":"README.md","_id":"bugswarm-prt@0.3.3","dist":{"shasum":"35aa39f41d0fa7caf981e867937f0f050f14d33d","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.3.3.tgz","integrity":"sha512-dLtD4eOT7i+x+0F3Pv04TC8YKFRTrpKjwGE0Ryil5WnBQCfdnPuTI5eo9sHwHWmU+CLkVrMjWKstq6pAqPlrgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaGqXiIIGmk/5pYqYle9pUIcH+7WTPmePsKV9aJ0K/fQIhAI0h0jRM5pddH4jPzCkuVNejFWXxBKVOInYAX3OTBvW8"}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"c4milo","email":"camilo.aguilar@gmail.com"},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"},{"name":"c4milo","email":"camilo.aguilar@gmail.com"}],"directories":{}},"0.3.4":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.3.4","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api"},"engines":{"node":">=0.6"},"devDependencies":{"should":"1.2.1","mocha":"1.8.1","bugswarm-cfg":"0.3.4"},"dependencies":{"superagent":"https://github.com/c4milo/superagent/tarball/v0.1.5"},"main":"bugswarm-prt","readme":"# BUGswarm participation NodeJS library\n\nThis library allows you to send and receive\nmessages and binary data to BUGswarm in realtime, communicate with resources within one swarm as well \nas resources spread out in different swarms.\n\nThis library is an implementation of \n[BUGswarm Participation API](http://developer.bugswarm.net/participation_api.html).\n\n### Features\n* Sends and receives private and public messages, as well as presence, \n  between swarms and resources.\n* Sends and receives binary files.\n\n### Installation\n`npm install bugswarm-prt`\n\n### Usage example\n\n####Consuming data:\n\n```javascript\nvar SwarmConnection = require('bugswarm-prt');\n\nvar options = {\n    apikey: 'YOUR PARTICIPATION API KEY',\n    resource: 'YOUR RESOURCE ID',\n    //Keep in mind that your resource has to be a participant in all of these swarms.\n    swarms: ['SWARM ID 1', 'SWARM ID 2'] \n};\n\nvar consumer = new SwarmConnection(options);\nconsumer.on('message', function(message) {\n    console.log('message: ' + message);\n});\n\nconsumer.on('error', function(err) {\n    console.log(err);\n});\n\nconsumer.on('connect', function(err) {\n    console.log('Connected to the platform');\n});\n\nconsumer.on('presence', function(presence) {\n    console.log('presence: ' + presence);\n});\n\nconsumer.on('disconnect', function() {\n    console.log('disconnected');\n});\n\n//here is where the magic starts\nconsumer.connect();\n\n```\n\n####Producing data:\n\n```javascript\nvar SwarmConnection = require('bugswarm-prt');\n\nvar options = {\n    apikey: 'YOUR PARTICIPATION API KEY',\n    resource: 'YOUR RESOURCE ID',\n    //Keep in mind that your resource has to be a participant in all of these swarms.\n    swarms: ['SWARM ID 1', 'SWARM ID 2'] \n};\n\nvar producer = new SwarmConnection(options);\nvar interval;\n\nproducer.on('connect', function(err) {\n    /**\n     * Sends a public message every 1 second.\n     **/\n    interval = setInterval(function() {\n        producer.send('yo! in public');\n    }, 1000);  \n});\n\nproducer.on('disconnect', function() {\n    clearInterval(interval);\n});\n\nproducer.connect();\n\n```\n\nTake a look at the [documentation]() for details about the library API and, \nfor more comprehensive usage, at the [specs](https://github.com/buglabs/bugswarm-api/tree/master/nodejs/participation/specs) directory. \n\n### Fork it, improve it and send us pull requests.\n```shell\ngit clone git@github.com:buglabs/bugswarm-api.git && cd bugswarm-api/nodejs/participation\n```\n\n## License\n(The MIT License)\n\nCopyright 2011 BugLabs. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\n\n","readmeFilename":"README.md","_id":"bugswarm-prt@0.3.4","dist":{"shasum":"306efd4be744beff719b7b23a344f6e96b86160c","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.3.4.tgz","integrity":"sha512-Sch121b9wMPW27nuYQaYlEYQEjX29PVhHjt2IrLS3AkEEqTP9fxc5ZhltYoJ3VmBCLUpwE/l+I5SJ2ozuVNkkA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHsH00q0GrkBMay4GxlBy4jzb8gJllDbvpWtE/dBYhSlAiAvtIVLBe3Mtj8gT+Iue/gcyejBJYumgG04oJg2r8QWzg=="}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"c4milo","email":"camilo.aguilar@gmail.com"},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"},{"name":"c4milo","email":"camilo.aguilar@gmail.com"}],"directories":{}},"0.3.5":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.3.5","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api"},"engines":{"node":">=0.6"},"devDependencies":{"should":"1.2.1","mocha":"1.8.1","bugswarm-cfg":"0.3.5"},"dependencies":{"superagent":"https://github.com/c4milo/superagent/tarball/v0.1.5"},"main":"bugswarm-prt","readme":"# BUGswarm participation NodeJS library\n\nThis library allows you to send and receive\nmessages and binary data to BUGswarm in realtime, communicate with resources within one swarm as well \nas resources spread out in different swarms.\n\nThis library is an implementation of \n[BUGswarm Participation API](http://developer.bugswarm.net/participation_api.html).\n\n### Features\n* Sends and receives private and public messages, as well as presence, \n  between swarms and resources.\n* Sends and receives binary files.\n\n### Installation\n`npm install bugswarm-prt`\n\n### Usage example\n\n####Consuming data:\n\n```javascript\nvar SwarmConnection = require('bugswarm-prt');\n\nvar options = {\n    apikey: 'YOUR PARTICIPATION API KEY',\n    resource: 'YOUR RESOURCE ID',\n    //Keep in mind that your resource has to be a participant in all of these swarms.\n    swarms: ['SWARM ID 1', 'SWARM ID 2'] \n};\n\nvar consumer = new SwarmConnection(options);\nconsumer.on('message', function(message) {\n    console.log('message: ' + message);\n});\n\nconsumer.on('error', function(err) {\n    console.log(err);\n});\n\nconsumer.on('connect', function(err) {\n    console.log('Connected to the platform');\n});\n\nconsumer.on('presence', function(presence) {\n    console.log('presence: ' + presence);\n});\n\nconsumer.on('disconnect', function() {\n    console.log('disconnected');\n});\n\n//here is where the magic starts\nconsumer.connect();\n\n```\n\n####Producing data:\n\n```javascript\nvar SwarmConnection = require('bugswarm-prt');\n\nvar options = {\n    apikey: 'YOUR PARTICIPATION API KEY',\n    resource: 'YOUR RESOURCE ID',\n    //Keep in mind that your resource has to be a participant in all of these swarms.\n    swarms: ['SWARM ID 1', 'SWARM ID 2'] \n};\n\nvar producer = new SwarmConnection(options);\nvar interval;\n\nproducer.on('connect', function(err) {\n    /**\n     * Sends a public message every 1 second.\n     **/\n    interval = setInterval(function() {\n        producer.send('yo! in public');\n    }, 1000);  \n});\n\nproducer.on('disconnect', function() {\n    clearInterval(interval);\n});\n\nproducer.connect();\n\n```\n\nTake a look at the [documentation]() for details about the library API and, \nfor more comprehensive usage, at the [specs](https://github.com/buglabs/bugswarm-api/tree/master/nodejs/participation/specs) directory. \n\n### Fork it, improve it and send us pull requests.\n```shell\ngit clone git@github.com:buglabs/bugswarm-api.git && cd bugswarm-api/nodejs/participation\n```\n\n## License\n(The MIT License)\n\nCopyright 2011 BugLabs. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\n\n","readmeFilename":"README.md","_id":"bugswarm-prt@0.3.5","dist":{"shasum":"6fcc74717cffa936d2b82fa3dcc128b28b890a29","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.3.5.tgz","integrity":"sha512-6DlXr/njqMLV4uGPk752dQOf2DiuIWmRV10ZEWoNe7iscY3uiQfD9v+LS/nTihIOGrI7mOaFIQwQc532nJIyZA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA25+fegEf2dBq1wLsYrIsXlMOR6NsbvhVfxsg9L4F/8AiA2NtK+Ouixu5PM76Mb0ox/Ajg3L/JbR25GhwGl/ss5QA=="}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"c4milo","email":"camilo.aguilar@gmail.com"},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"},{"name":"c4milo","email":"camilo.aguilar@gmail.com"}]},"0.4.0":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.4.0","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api"},"engines":{"node":">=0.6"},"devDependencies":{"should":"1.2.1","mocha":"1.8.1","bugswarm-cfg":"0.4.0"},"dependencies":{"superagent":"https://github.com/c4milo/superagent/tarball/v0.1.5"},"main":"bugswarm-prt","readme":"# BUGswarm participation NodeJS library\n\nThis library allows you to send and receive\nmessages and binary data to BUGswarm in realtime, communicate with resources within one swarm as well \nas resources spread out in different swarms.\n\nThis library is an implementation of \n[BUGswarm Participation API](http://developer.bugswarm.net/participation_api.html).\n\n### Features\n* Sends and receives private and public messages, as well as presence, \n  between swarms and resources.\n* Sends and receives binary files.\n\n### Installation\n`npm install bugswarm-prt`\n\n### Usage example\n\n####Consuming data:\n\n```javascript\nvar SwarmConnection = require('bugswarm-prt');\n\nvar options = {\n    apikey: 'YOUR PARTICIPATION API KEY',\n    resource: 'YOUR RESOURCE ID',\n    //Keep in mind that your resource has to be a participant in all of these swarms.\n    swarms: ['SWARM ID 1', 'SWARM ID 2'] \n};\n\nvar consumer = new SwarmConnection(options);\nconsumer.on('message', function(message) {\n    console.log('message: ' + message);\n});\n\nconsumer.on('error', function(err) {\n    console.log(err);\n});\n\nconsumer.on('connect', function(err) {\n    console.log('Connected to the platform');\n});\n\nconsumer.on('presence', function(presence) {\n    console.log('presence: ' + presence);\n});\n\nconsumer.on('disconnect', function() {\n    console.log('disconnected');\n});\n\n//here is where the magic starts\nconsumer.connect();\n\n```\n\n####Producing data:\n\n```javascript\nvar SwarmConnection = require('bugswarm-prt');\n\nvar options = {\n    apikey: 'YOUR PARTICIPATION API KEY',\n    resource: 'YOUR RESOURCE ID',\n    //Keep in mind that your resource has to be a participant in all of these swarms.\n    swarms: ['SWARM ID 1', 'SWARM ID 2'] \n};\n\nvar producer = new SwarmConnection(options);\nvar interval;\n\nproducer.on('connect', function(err) {\n    /**\n     * Sends a public message every 1 second.\n     **/\n    interval = setInterval(function() {\n        producer.send('yo! in public');\n    }, 1000);  \n});\n\nproducer.on('disconnect', function() {\n    clearInterval(interval);\n});\n\nproducer.connect();\n\n```\n\nTake a look at the [documentation]() for details about the library API and, \nfor more comprehensive usage, at the [specs](https://github.com/buglabs/bugswarm-api/tree/master/nodejs/participation/specs) directory. \n\n### Fork it, improve it and send us pull requests.\n```shell\ngit clone git@github.com:buglabs/bugswarm-api.git && cd bugswarm-api/nodejs/participation\n```\n\n## License\n(The MIT License)\n\nCopyright 2011 BugLabs. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\n\n","readmeFilename":"README.md","_id":"bugswarm-prt@0.4.0","dist":{"shasum":"4214d4e5d392bad42789ddcfdc65f051effc9bdb","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.4.0.tgz","integrity":"sha512-bl/EI0Uwkf3ADItTWzJNzZtt2yAx+EPa0ghqV36ZQEq0qLZMIojm+NlftFcav9goq2btVHhqPUPF1tFJYVfw1A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoentOapgsBV6npdzHRsDIqC/6kyWWhDNKwR+d7AiBsQIgALgagyWZ46MCUhF5KwfgNbrKTl7exTMbdkvMmsc0dZo="}]},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"c4milo","email":"camilo.aguilar@gmail.com"},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"},{"name":"c4milo","email":"camilo.aguilar@gmail.com"}]},"0.4.1":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.4.1","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api"},"engines":{"node":">=0.6"},"devDependencies":{"should":"1.2.1","mocha":"1.8.1","bugswarm-cfg":"0.4.1"},"dependencies":{"superagent":"https://github.com/c4milo/superagent/tarball/v0.1.5"},"main":"bugswarm-prt","readme":"# BUGswarm participation NodeJS library\n\nThis library allows you to send and receive\nmessages and binary data to BUGswarm in realtime, communicate with resources within one swarm as well \nas resources spread out in different swarms.\n\nThis library is an implementation of \n[BUGswarm Participation API](http://developer.bugswarm.net/participation_api.html).\n\n### Features\n* Sends and receives private and public messages, as well as presence, \n  between swarms and resources.\n* Sends and receives binary files.\n\n### Installation\n`npm install bugswarm-prt`\n\n### Usage example\n\n####Consuming data:\n\n```javascript\nvar SwarmConnection = require('bugswarm-prt');\n\nvar options = {\n    apikey: 'YOUR PARTICIPATION API KEY',\n    resource: 'YOUR RESOURCE ID',\n    //Keep in mind that your resource has to be a participant in all of these swarms.\n    swarms: ['SWARM ID 1', 'SWARM ID 2'] \n};\n\nvar consumer = new SwarmConnection(options);\nconsumer.on('message', function(message) {\n    console.log('message: ' + message);\n});\n\nconsumer.on('error', function(err) {\n    console.log(err);\n});\n\nconsumer.on('connect', function(err) {\n    console.log('Connected to the platform');\n});\n\nconsumer.on('presence', function(presence) {\n    console.log('presence: ' + presence);\n});\n\nconsumer.on('disconnect', function() {\n    console.log('disconnected');\n});\n\n//here is where the magic starts\nconsumer.connect();\n\n```\n\n####Producing data:\n\n```javascript\nvar SwarmConnection = require('bugswarm-prt');\n\nvar options = {\n    apikey: 'YOUR PARTICIPATION API KEY',\n    resource: 'YOUR RESOURCE ID',\n    //Keep in mind that your resource has to be a participant in all of these swarms.\n    swarms: ['SWARM ID 1', 'SWARM ID 2'] \n};\n\nvar producer = new SwarmConnection(options);\nvar interval;\n\nproducer.on('connect', function(err) {\n    /**\n     * Sends a public message every 1 second.\n     **/\n    interval = setInterval(function() {\n        producer.send('yo! in public');\n    }, 1000);  \n});\n\nproducer.on('disconnect', function() {\n    clearInterval(interval);\n});\n\nproducer.connect();\n\n```\n\nTake a look at the [documentation]() for details about the library API and, \nfor more comprehensive usage, at the [specs](https://github.com/buglabs/bugswarm-api/tree/master/nodejs/participation/specs) directory. \n\n### Fork it, improve it and send us pull requests.\n```shell\ngit clone git@github.com:buglabs/bugswarm-api.git && cd bugswarm-api/nodejs/participation\n```\n\n## License\n(The MIT License)\n\nCopyright 2011 BugLabs. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\n\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/buglabs/bugswarm-api/issues"},"_id":"bugswarm-prt@0.4.1","dist":{"shasum":"28a9742273522b903c0f16f2a87e1f69528927bc","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.4.1.tgz","integrity":"sha512-lPkJImTG0m8O5xQYnS7vnXoXlLf7dZLniZcIpPQPMeRzR78SEMDviVVkx8XGS9yg2TslbBCw6VG+aFmqIOl1qg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBnddNw6oqPGBVodiAjLdmhwKn6NN1JPYwPa3hUJqfh5AiB6csiy1SQ9gvA947kgE/wzKwi/bUJEwWR3iCI1a3cbAw=="}]},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"c4milo","email":"camilo.aguilar@gmail.com"},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"},{"name":"c4milo","email":"camilo.aguilar@gmail.com"}]},"0.4.2":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.4.2","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api"},"engines":{"node":">=0.6"},"devDependencies":{"should":"1.2.1","mocha":"1.8.1","bugswarm-cfg":"0.4.1"},"dependencies":{"superagent":"https://github.com/c4milo/superagent/tarball/v0.1.5"},"main":"bugswarm-prt","readme":"# BUGswarm participation NodeJS library\n\nThis library allows you to send and receive\nmessages and binary data to BUGswarm in realtime, communicate with resources within one swarm as well \nas resources spread out in different swarms.\n\nThis library is an implementation of \n[BUGswarm Participation API](http://developer.bugswarm.net/participation_api.html).\n\n### Features\n* Sends and receives private and public messages, as well as presence, \n  between swarms and resources.\n* Sends and receives binary files.\n\n### Installation\n`npm install bugswarm-prt`\n\n### Usage example\n\n####Consuming data:\n\n```javascript\nvar SwarmConnection = require('bugswarm-prt');\n\nvar options = {\n    apikey: 'YOUR PARTICIPATION API KEY',\n    resource: 'YOUR RESOURCE ID',\n    //Keep in mind that your resource has to be a participant in all of these swarms.\n    swarms: ['SWARM ID 1', 'SWARM ID 2'] \n};\n\nvar consumer = new SwarmConnection(options);\nconsumer.on('message', function(message) {\n    console.log('message: ' + message);\n});\n\nconsumer.on('error', function(err) {\n    console.log(err);\n});\n\nconsumer.on('connect', function(err) {\n    console.log('Connected to the platform');\n});\n\nconsumer.on('presence', function(presence) {\n    console.log('presence: ' + presence);\n});\n\nconsumer.on('disconnect', function() {\n    console.log('disconnected');\n});\n\n//here is where the magic starts\nconsumer.connect();\n\n```\n\n####Producing data:\n\n```javascript\nvar SwarmConnection = require('bugswarm-prt');\n\nvar options = {\n    apikey: 'YOUR PARTICIPATION API KEY',\n    resource: 'YOUR RESOURCE ID',\n    //Keep in mind that your resource has to be a participant in all of these swarms.\n    swarms: ['SWARM ID 1', 'SWARM ID 2'] \n};\n\nvar producer = new SwarmConnection(options);\nvar interval;\n\nproducer.on('connect', function(err) {\n    /**\n     * Sends a public message every 1 second.\n     **/\n    interval = setInterval(function() {\n        producer.send('yo! in public');\n    }, 1000);  \n});\n\nproducer.on('disconnect', function() {\n    clearInterval(interval);\n});\n\nproducer.connect();\n\n```\n\nTake a look at the [documentation]() for details about the library API and, \nfor more comprehensive usage, at the [specs](https://github.com/buglabs/bugswarm-api/tree/master/nodejs/participation/specs) directory. \n\n### Fork it, improve it and send us pull requests.\n```shell\ngit clone git@github.com:buglabs/bugswarm-api.git && cd bugswarm-api/nodejs/participation\n```\n\n## License\n(The MIT License)\n\nCopyright 2011 BugLabs. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\n\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/buglabs/bugswarm-api/issues"},"_id":"bugswarm-prt@0.4.2","dist":{"shasum":"ee82f27fcc012660ea1402abaabd989b94ca501f","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.4.2.tgz","integrity":"sha512-ZZETKfQ7ug2tl2ow9Aqe0/Nsz3WWuY4JXvoFBcuILH81++ri2vVop7NOcR3g6NxGTGqpXJy6TVWqdsFJmH94aQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFmKRVP48tfxQ0U/js8sScpi4y6Y+QA5vjv9MQxaatlFAiADdoOyhXRmnbZiVgQ2J3cIqB6gkvaBrgjIUeHLYWTZ+g=="}]},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"c4milo","email":"camilo.aguilar@gmail.com"},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"},{"name":"c4milo","email":"camilo.aguilar@gmail.com"}]},"0.4.3":{"name":"bugswarm-prt","description":"[Participation] BUGswarm is platform that allows you to share and access your hardware sensor data easily and effortlessly.","version":"0.4.3","keywords":["m2m","IoT","realtime","messaging","sensor","hardware","socket","configuration"],"homepage":"http://developer.bugswarm.net","author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api"},"engines":{"node":">=0.6"},"devDependencies":{"should":"1.2.1","mocha":"1.8.1","bugswarm-cfg":"0.4.2"},"dependencies":{"superagent":"https://github.com/c4milo/superagent/tarball/v0.1.5"},"main":"bugswarm-prt","readme":"# BUGswarm participation NodeJS library\n\nThis library allows you to send and receive\nmessages and binary data to BUGswarm in realtime, communicate with resources within one swarm as well \nas resources spread out in different swarms.\n\nThis library is an implementation of \n[BUGswarm Participation API](http://developer.bugswarm.net/participation_api.html).\n\n### Features\n* Sends and receives private and public messages, as well as presence, \n  between swarms and resources.\n* Sends and receives binary files.\n\n### Installation\n`npm install bugswarm-prt`\n\n### Usage example\n\n####Producing and consuming data:\n\n```javascript\nvar Swarm = require('bugswarm-prt').Swarm;\n\nvar options = {\n    apikey: 'YOUR PARTICIPATION API KEY',\n    resource: 'YOUR RESOURCE ID WITH PERMISSIONS TO CONSUME AND PRODUCE',\n    swarms: ['YOUR SWARM ID']\n};\n\nvar prosumer = new Swarm(options);\n\nprosumer.on('message', function(message) {\n    console.log('message: ' + JSON.stringify(message));\n});\n\nprosumer.on('error', function(err) {\n    console.log(err);\n});\n\nprosumer.on('connect', function(err) {\n    console.log('Connected!');\n\n    //Let's start sending random temperatures\n    //from Central Park!\n    setInterval(function() {\n        prosumer.send(JSON.stringify({\n            'temperature': Math.floor((Math.random() * 100) + 1)\n        }));\n    }, 2000);\n});\n\nprosumer.on('presence', function(presence) {\n    console.log('presence: ' + JSON.stringify(presence));\n});\n\nprosumer.on('disconnect', function() {\n    console.log('disconnected');\n});\n\n//here is where the execution flow starts\nprosumer.connect();\n\n```\n\nTake a look at the [documentation]() for details about the library API and, \nfor more comprehensive usage, at the [specs](https://github.com/buglabs/bugswarm-nodejs/tree/master/participation/specs) directory. \n\n### Fork it, improve it and send us pull requests.\n```shell\ngit clone git@github.com:buglabs/bugswarm-nodejs.git && cd bugswarm-nodejs/participation\n```\n\n## License\n(The MIT License)\n\nCopyright 2013 BugLabs. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\n\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/buglabs/bugswarm-api/issues"},"_id":"bugswarm-prt@0.4.3","dist":{"shasum":"0c8010babea285e2c78ac2d6000c254cf0745c83","tarball":"https://registry.npmjs.org/bugswarm-prt/-/bugswarm-prt-0.4.3.tgz","integrity":"sha512-wtJglR1RofMVXnnE+Ozd5Vtu0jc9li9UXfbG5qnznTttngRM0AKl0gyZa9OQBi0454EpSyHlnXWYfFnynT1n9Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0g8jfbRYRAhy17bqHIJ5YtzKuuUqiNv7cXs+ja8V74gIhAMAvHtKZrU9Tq6NDlropybXGc4Bc/82A5WUKnE4RihP4"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"c4milo","email":"camilo.aguilar@gmail.com"},"maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"},{"name":"c4milo","email":"camilo.aguilar@gmail.com"}]}},"readme":"# BUGswarm NodeJS library\n\nThis library has two main modules: participation and configuration. Use the\nthe configuration module to set up your swarms, resources as well as to manage \ninvitations and API keys. Use the participation module to send and receive\nmessages and binary data.\n\nThis library is an implementation of \n[BUGswarm API](http://developer.bugswarm.net/).\n\n### Features\n* Manages swarms, resources, invitations and apikeys.\n* Sends and receives private and public messages, as well as presence, \n  between swarms and resources.\n* Sends and receives binary files.\n\n### Installation\n`npm install bugswarm`\n\n### Usage example\n\nProducing data:\n\n```javascript\n//TODO\n```\n\nConsuming:\n\n```javascript\n//TODO\n```\n\nTake a look at the [documentation]() for details about the library API and, \nfor more comprehensive examples, at the [examples]() directory. \n\n### Fork it, improve it and send us pull requests.\n```shell\ngit clone git@github.com:buglabs/bugswarm-api.git && cd bugswarm-api/nodejs\n```\n\n## License\n(The MIT License)\n\nCopyright 2011 BugLabs. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\n\n","maintainers":[{"name":"buglabs","email":"camilo@buglabs.net"},{"name":"c4milo","email":"camilo.aguilar@gmail.com"}],"time":{"modified":"2022-06-13T05:16:01.603Z","created":"2011-12-13T23:02:56.186Z","0.1.0":"2011-12-13T23:02:56.532Z","0.1.4":"2012-01-04T20:39:14.425Z","0.1.5":"2012-01-05T18:04:00.544Z","0.1.6":"2012-01-10T21:12:40.986Z","0.1.7":"2012-01-12T06:01:41.486Z","0.1.8":"2012-01-13T20:28:26.574Z","0.1.9":"2012-01-14T01:34:33.449Z","0.2.0":"2012-02-05T17:55:35.966Z","0.2.1":"2012-03-13T14:49:47.821Z","0.2.2":"2012-03-23T19:06:50.325Z","0.3.2":"2013-02-03T16:46:20.039Z","0.3.3":"2013-02-08T03:12:11.205Z","0.3.4":"2013-02-08T03:22:03.214Z","0.3.5":"2013-02-11T04:36:13.519Z","0.4.0":"2013-02-28T02:08:30.139Z","0.4.1":"2013-06-13T00:47:49.657Z","0.4.2":"2013-06-23T18:42:07.212Z","0.4.3":"2013-11-26T00:21:06.364Z"},"author":{"name":"BugLabs Inc."},"repository":{"type":"git","url":"git://github.com/buglabs/bugswarm-api"}}