{"_id":"@ekliptor/reddit-snooper","_rev":"2-298bbf28d24a46842bc51192d01bb5bd","name":"@ekliptor/reddit-snooper","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"name":"@ekliptor/reddit-snooper","version":"1.0.1","description":"Simple Reddit bot framework for nodejs","main":"reddit-snooper.js","dependencies":{"request":"^2.81.0"},"devDependencies":{"mocha":"^3.3.0","should":"^11.2.1"},"repository":{"type":"git","url":"https://github.com/Ekliptor/reddit-snooper"},"author":{"name":"Ekliptor"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/JuicyPasta/reddit-snooper/issues"},"scripts":{"test":"mocha test"},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright {yyyy} {name of copyright owner}\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","_id":"@ekliptor/reddit-snooper@1.0.1","dist":{"shasum":"c1656d8a8f713cfed70c6930f2013b048b23aa30","tarball":"https://registry.npmjs.org/@ekliptor/reddit-snooper/-/reddit-snooper-1.0.1.tgz","integrity":"sha512-5pXEsXMPRHDlldeSrJq5ZW/XQDRkTIjwbTh/wIN8m29DfPnxVamfjix9f3AUDj31dXFzEfexw1t6hlxiqybn/g==","fileCount":19,"unpackedSize":54072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaS+lCRA9TVsSAnZWagAAZPcQAJFbgvKHCN1VkhNC1Woq\ntG+ITcpiUVIVBT45yijxP0fHH1WmreBM6rSMud172rgT4f6WNIF0Vm0kTwEo\neZPxtWnIOtlyK9BJDK4ro3maaVXZh8EAfXz9jLmY7eIu3lYjKVpHAF6t4Bln\n6ptn/pFMOh6cv/1+lWjK8nRTNre1lbbwNZsCTooRF9AC4n11KM8Dn0/cWReK\nAdXBKcyrasjmb2kL6Q7rkJdTE516YKDfkjPtK/CnyHHZZhJ+SiTfLlMCd1FS\n4DZ2OwGmMgNSt2Q/3pkDCBwPdK66mMuwUXz5mTCDmpvOe/wDWKSa8XEJKM3I\nDE+BKboFw0LIRGsnoMOv1nWnCVaXT5L3eGV5amQITy/sgKkdsGa9frImYhBH\no+QX8rqWDJ3CYU2XCqTFcmDL53EsEy/6GQLFvmsFK+9uh++piYO2TWtUOsHy\nVBbDUq32G+sl1mKwFwI7R9QSnSbEyM0l9qO6pqkYqNWVn5+fgqtgfnQ7A8uY\ns+OD0wkJq9/6WmEmFqWHizLCFX3Ma6vUKJYtUwJnbBNNsv+BTHUVhiKxprP8\nmVa3XwTinUUar3sMNIGX/lt7G8F6vBR9m7mgT5geEyDspXGlUPytMiW1Rv3m\n+N/0Nt7ATy7lMzV12qS1roamwAmHxpCWTpTA9a5mQc50k7221ekcQXsj7Blx\nimnF\r\n=Drr1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGQ5lywwlJftLQ8PZgSNg3s6F1QQAKYxC6bcAbOdAUSgIhAKA6rety1cHRMS4fkugno3a5tNFKEk83geqCS5fkcPin"}]},"maintainers":[{"name":"ekliptor","email":"Ekliptor1@yandex.com"}],"_npmUser":{"name":"ekliptor","email":"Ekliptor1@yandex.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reddit-snooper_1.0.1_1533620132761_0.38130997231890174"},"_hasShrinkwrap":false},"1.0.2":{"name":"@ekliptor/reddit-snooper","version":"1.0.2","description":"Simple Reddit bot framework for nodejs","bundleUpdate":true,"main":"reddit-snooper.js","dependencies":{"request":"^2.79.0"},"devDependencies":{"mocha":"^3.3.0","should":"^11.2.1"},"repository":{"type":"git","url":"https://github.com/Ekliptor/reddit-snooper"},"author":{"name":"Ekliptor"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/JuicyPasta/reddit-snooper/issues"},"scripts":{"test":"mocha test"},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright {yyyy} {name of copyright owner}\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","_id":"@ekliptor/reddit-snooper@1.0.2","dist":{"shasum":"3314dd09b4fb5442f1332b1f5d269effd15687d8","integrity":"sha512-Av/yNaiuFknnvV0mLSs+SQFo6r0fHLxtn3ab5lAGNWPaKaCGkHyCDaXkmruqMnr2MM/W8ZF1OFOvINjzy1QmHA==","tarball":"https://registry.npmjs.org/@ekliptor/reddit-snooper/-/reddit-snooper-1.0.2.tgz","fileCount":19,"unpackedSize":55141,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDVLBCRA9TVsSAnZWagAAqTIP/2yPUETMsGju1rAv7oS6\nd/7nCwlzKiul96MhJPOjENF8vDB9ejir7XANdVZaJWVnosZA9veaiGbrRHOp\nxFKkLKc81k4rltCIpacpYW7aFYztsr7AJLxRRIwtA6tS8DqF9ZfgHA3ySN8W\nrrerB4KSLVHaSH2bCPqJgW29pA2Y2JVBO7cRxjUmn0GDkDE4P0NjwFbUbxue\nI2TdSxDL/bbw6nb64Rj7wjTmwVW1Rlh2DZiWG7CkD71gkX9p1OM/qcwY2/yz\nqBdZmcUGKe2GlTyqd/SNREfTcLHPDoyRANmsC/Nw3CVIT9HzJZKXusxafPFq\nrJBY1ufttUdIC/9xcag5+9H9rxkRHlZNLlgv6QBJOOzAM9Wt03l9y7fvPK8Q\nndx5VPLfV13zWg5lXLLZM115wAabaksvJdCjVxC+pG18JTVN3tnfpfBq1Dfg\nUkF1mkQAlemujMhHTKDZqVKesb4iHsbfMVmaQXDlhL/Ta0XIY8jLEpjAcpkp\ncaKuSb7UUOoZX9kmc6VkkioRh5D88nw4T7BOLWZ7rMFKeWVo5hTLMQUSf7KL\netId/1yRpLTU8lb8OqSt9lWb8YvHDcuQlGs86CwWJQsVVEyNxDCv6K2QNZLS\nkX6vbe96xoJOhp6Vn3RfPIA+UAoPrQee4v8c0eSwS6EvT/NY9knLo0GLAi+G\n/Lt0\r\n=0EYd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFUjX+6DT+0x6LDI/vH+9XkoWoT0Dz7lHUQoQFadyHrFAiEAyFkXIejADQtd5JVrKBr/GGRFl/fSdgf3cJSvjhdMf0M="}]},"maintainers":[{"name":"ekliptor","email":"Ekliptor1@yandex.com"}],"_npmUser":{"name":"ekliptor","email":"Ekliptor1@yandex.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reddit-snooper_1.0.2_1544377024580_0.2821736648649511"},"_hasShrinkwrap":false}},"time":{"created":"2018-08-07T05:35:32.761Z","1.0.1":"2018-08-07T05:35:32.850Z","modified":"2022-04-05T07:02:45.199Z","1.0.2":"2018-12-09T17:37:04.780Z"},"maintainers":[{"name":"ekliptor","email":"Ekliptor1@yandex.com"}],"description":"Simple Reddit bot framework for nodejs","repository":{"type":"git","url":"https://github.com/Ekliptor/reddit-snooper"},"author":{"name":"Ekliptor"},"bugs":{"url":"https://github.com/JuicyPasta/reddit-snooper/issues"},"license":"BSD-2-Clause","readme":"# Reddit-Snooper - Reddit bot framework for Nodejs\n\n[![npm package](https://nodei.co/npm/reddit-snooper.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/reddit-snooper/)\n\n[![Build Status](https://travis-ci.org/JuicyPasta/reddit-snooper.svg?branch=master)](https://travis-ci.org/JuicyPasta/reddit-snooper)\n[![dependencies Status](https://david-dm.org/JuicyPasta/reddit-snooper/status.svg)](https://david-dm.org/JuicyPasta/reddit-snooper)\n[![Gitter](https://badges.gitter.im/reddit-snooper-nodjs/Lobby.svg)](https://gitter.im/reddit-snooper-nodjs/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge)\n\n\n## Simple to use\nReddit-snooper is designed to a simple but powerful interface to talk to Reddit. Reddit represents all of its objects in JSON natively which makes javascipt a good choice for building a bot.\n\n``` js\nsnooper.watcher.getCommentWatcher('all') \n    .on('comment', function(comment) {\n        console.log('/u/' + comment.data.author + ' posted a comment: ' + comment.data.body)\n        snooper.api.post(...) // leave a reply \n    }\n```\n\n\n## Table of Contents\n- [Setup and Configuration](#setup-and-configuration)\n- [Watcher](#reddit-watcher-snooperwatcher)\n- [Api](#reddit-api-snooperapi)\n\n## Setup and Configuration\n### Installing reddit-snooper\n``` bash\nnpm install reddit-snooper --save\n```\n\n### Library usage and configuration\n``` js\nvar Snooper = require('reddit-snooper')\n    snooper = new Snooper(\n        {\n            // credential information is not needed for snooper.watcher\n            username: 'reddit_username',\n            password: 'reddit password',\n            app_id: 'reddit api app id',\n            api_secret: 'reddit api secret',\n            user_agent: 'OPTIONAL user agent for your bot',\n\n            automatic_retries: true, // automatically handles condition when reddit says 'you are doing this too much'\n            api_requests_per_minute: 60 // api requests will be spread out in order to play nicely with Reddit\n        })\n```\n\n### API setup \nAll you need to get up and running is obtain an api_id and an api_secret. Both can be created on the [Reddit app console](https://reddit.com/prefs/apps)\n1. Create (or log into) a reddit account\n2. Navigate to the [authorized applications console](https://reddit.com/prefs/apps)\n3. Select 'create another app...' at the bottom\n4. Fill in the name, description and click on 'script', put in anything for the redirect uri, its not needed and you can change it later if you want to\n5. Copy down the 'secret' that is your api_secret, the 14 character string by the name of your app is your app_id\n6. Use these values and your credentials to configure the snooper\n\n\n## Reddit Watcher (snooper.watcher)\nReddit watchers are event emitters that trigger when new things happen on the website,\nRight now you can watch for:\n- new comments across the website or on a specific subreddit\n- new posts across the website or on a specific subreddit\n- post or comment is gilded (website or subreddit)\n- new posts reaching the first x pages of different listings (hot, top_24, top_day, controversial, rising) across the website or subreddit\n\nnotify when a new comment is posted\n``` js\nsnooper.watcher.getCommentWatcher('subreddit') // blank argument or 'all' looks at the entire website\n    .on('comment', function(comment) {\n        // comment is a object containing all comment data\n        console.log('comment was posted by: ' + comment.data.author)\n        console.log('contents ' + comment.data.body)\n        // or\n        console.log(comment)\n    })\n    .on('error', console.error)\n```\n\nnotify when a new post is posted\n``` js\nsnooper.watcher.getPostWatcher('subreddit') // blank argument or 'all' looks at the entire website\n    .on('post', function(post) {\n        // comment is a object containing all comment data\n        console.log('post was posted by: ' + post.data.author)\n        console.log(post)\n    })\n    .on('error', console.error)\n```\n\nnotify when something is gilded\n``` js\nsnooper.watcher.getGildedWatcher('subreddit') // blank argument or 'all' looks at the entire website\n    .on('item', function(item) {\n        // comment is a object containing all comment data\n        console.log('user: ' + post.data.author + ' has been gilded')\n        console.log(item)\n    })\n    .on('error', console.error)\n```\n\nnotify when a new post reaches a specific listing (eg. the front page)\n``` js\nlet options = {\n    listing: 'hot', // 'hot' OR 'rising' OR 'controversial' OR 'top_day' OR 'top_hour' OR 'top_month' OR 'top_year' OR 'top_all'\n    limit: 50 // how many posts you want to watch? if any of these spots get overtaken by a new post an event will be emitted, 50 is 2 pages\n}\nsnooper.watcher.getListingWatcher('subreddit' or 'all', options) \n    .on('item', function(item) {\n        console.log(\"new item in listing \" + item)\n    })\n    .on('error', console.error)\n```\n\nnotify when a new post is posted (on a user's multi subreddit)\n``` js\nsnooper.watcher.getMultiWatcher('username', 'multi')\n    .on('post', function(post) {\n        // comment is a object containing all comment data\n        console.log('post was posted by: ' + post.data.author)\n        console.log(post)\n    })\n    .on('error', console.error)\n```\n\n### examples (full programs in the examples folder)\n#### unexpected factorial bot\n``` js\nsnooper.watcher.getCommentWatcher(\"all\")\n.on(\"comment\", function (comment) {\n\n    // only reply if the comment contains a factorial\n    let match = comment.data.body.match(\"[0-9]+!\")\n    if (match) {\n\n        // post a reply, if you have automatic_retries set to true this comment will make\n        // it through even if it takes 10+ minutes ('you are doing this too much!') otherwise\n        // an error will be thrown\n        snooper.api.post(\"/api/comment\", {\n            api_type: \"json\",\n            text:     match[0] + \" = \" + factorial(+match[0].substring(0, match[0].length -1)),\n            thing_id: comment.data.name\n        }, function (err, statusCode, data) {\n            if (!err) console.log('just replied to comment: ' + comment.data.name)\n        })\n    }\n})\n.on(\"error\", console.error)\n\n// when you are done \n// commentWatcher.close()\n```\n\n#### repost all gilded comments with over 1000 ups to r/bestof (please dont do this)\n``` js\n\nsnooper.watcher.getGildedWatcher('all')\n.on('item', function(err, data) {\n    \n... coming soon\n})\n\n```\n\n#### RemindMe! bot\n```js\n// also coming soon, this is really easy to implement with setTimeout \n```\n\n#### download all gifs that make it to the front 2 pages of hot on r/gifs\nthis is different than just downloading the front 2 pages since it also triggers an event when the front 2 pages change\n``` js\n\nsnooper.watcher.getListingWatcher('gifs', {\n    listing: 'top_day', // look at the top posts of the day\n    limit: 50 // 2 pages (25 per page)\n})\n.on('item', function(post) { // post will be a json object containing all post information\n    let urlmatch = post.data.url.match('\\.([a-zA-Z]+$)')\n    \n    // filter out stickied posts\n    if (!post.data.stickied && post.kind === 't3') {\n       request(post.data.url).pipe(fs.createWriteStream(\"./gifs/\"+post.data.title.split('\\\"').join('')+urlmatch[0]))\n    }\n\n})\n\n```\n\n#### download all pics that are posted to r/pics\n``` js\n// start watching for new posts to r/pics\nsnooper.watcher.getPostWatcher('pics')\n.on('post', function(post) { // post will be a json object containing all post information\n\n    // check if its a link post (t3, definitions found on reddit api page)\n    // also make sure there is an image link\n    let urlmatch = post.data.url.match('\\.([a-zA-Z]+$)')\n    if (post.kind === 't3' && urlmatch) {\n        request(post.data.url).pipe(fs.createWriteStream(\"gifs/\"+post.data.title+urlmatch[0]))\n    }\n\n})\n.on('error', console.error)\n```\n\n\n## Reddit API (snooper.api)\n\nSnooper's api component is an agnostic wrapper around Reddit's rest API that handles retries, rate limit throttling and Reddit's different response codes.\n\nIn order to use the api head over to the [Reddit API Documentation](https://www.reddit.com/dev/api/). All of the api methods use one of the 5 HTTP methods (GET, POST, PATCH, PUT, DELETE) which map to the 5 different snooper.api methods. \n\n``` js\n// endpoint: api endpoint ex: 'api/v1/me' or '/api/v1/me/karma/' (listed on api documentation)\n// data: JSON data, dependent on the request which is specified in the docs\n// NOTE: the function .get is used for api calls that use HTTP GET, you can find the method each api endpiont uses on (you guessed it) the reddit api docs\n\n// HTTP GET\nsnooper.api.get(endpoint, data, function(err, responseCode, responseData) {\n    if (err) {\n        return console.error(\"api request failed: \" + err)\n    }\n    \n    console.log(\"API reponded\")\n    console.log(\"status: \" + respnoseCode) // http status codes\n    console.log(\"data: \" + responseData)\n})\n    \n// HTTP POST\nsnooper.api.post(endpoint, data, function(err, responseCode, responseData) {\n    //...\n})\n\n// HTTP PATCH\nsnooper.api.patch(endpoint, data, function(err, responseCode, responseData) {\n    //...\n})\n\n// HTTP PUT\nsnooper.api.put(endpoint, data, function(err, responseCode, responseData) {\n    //...\n})\n\n// HTTP DELETE\nsnooper.api.delete(endpoint, data, function(err, responseCode, responseData) {\n    //...\n})\n\n// gets an api token \nsnooper.api.get_token(function(err, token) {\n    console.log(token)\n})\n\n```\n\n*Note: new accounts get little to no posting privileges (1 comment or post per 5 minutes or more) if you dont have any karma. If you just want to play around with the api I recommend using an active account.*\n\n\n### basic api usage\n\ncheck how much karma your bot has\n``` js\nsnooper.api.get('api/v1/me/karma', {}, function(err, statusCode, data) {\n    console.log(\"I have \" + data.karma + \" karma\")\n})\n```\n\npost a comment\n``` js\nsnooper.api.post(\"/api/comment\", {\n    api_type: \"json\",\n    text:     \"Hello World\"\n    thing_id: comment.data.name\n}, function (err, statusCode, data) {\n    if (!err) console.log('just replied to comment: ' + comment.data.name)\n})\n\n```\n\n\nI highly doubt your bot is over 18 years of age\n``` js\nsnooper.api.patch('/api/v1/me/prefs/', {\n    over_18: false\n}, function(err, statusCode, data) {\n\n})\n```\n\nactivate turbo mode doubling performance       (kidding)\n``` js\nsnooper.api.post('api/v1/gold/give', {\n    months: 1,\n    username: 'juicypasta'\n}, function(err, statusCode, data) {\n\n})\n\n```\n\n\n## Coming Soon\n- Support for multiple accounts\n- Convenience methods for commonly used api requests\n- Object model for api items (User, Subreddit, Post, Comment, etc.)\n- Watchers for **everything**\n    - private messages\n    - replies\n    - new post reaching the front page (configurable to different pages/ # of pages)\n\n","readmeFilename":"README.md"}