Permalink
Browse files

First module - Get Billets

First comment without some verifications
  • Loading branch information...
1 parent 6ef019d commit ae04764bd079a268d8c7a607cbfa148f0fddcf9c @ramorim committed Sep 26, 2012
Showing with 14,471 additions and 0 deletions.
  1. +22 −0 lib/cobregratis.js
  2. +55 −0 node_modules/request/LICENSE
  3. +309 −0 node_modules/request/README.md
  4. +190 −0 node_modules/request/aws.js
  5. +103 −0 node_modules/request/forever.js
  6. +1,096 −0 node_modules/request/main.js
  7. +5 −0 node_modules/request/node_modules/form-data/.npmignore
  8. +7 −0 node_modules/request/node_modules/form-data/Makefile
  9. +86 −0 node_modules/request/node_modules/form-data/Readme.md
  10. +237 −0 node_modules/request/node_modules/form-data/lib/form_data.js
  11. +8 −0 node_modules/request/node_modules/form-data/node-form-data.sublime-project
  12. +508 −0 node_modules/request/node_modules/form-data/node-form-data.sublime-workspace
  13. +9 −0 node_modules/request/node_modules/form-data/node_modules/async/.gitmodules
  14. +19 −0 node_modules/request/node_modules/form-data/node_modules/async/LICENSE
  15. +21 −0 node_modules/request/node_modules/form-data/node_modules/async/Makefile
  16. +970 −0 node_modules/request/node_modules/form-data/node_modules/async/README.md
  17. BIN node_modules/request/node_modules/form-data/node_modules/async/async.min.js.gzip
  18. +70 −0 node_modules/request/node_modules/form-data/node_modules/async/deps/nodeunit.css
  19. +1,966 −0 node_modules/request/node_modules/form-data/node_modules/async/deps/nodeunit.js
  20. +1 −0 node_modules/request/node_modules/form-data/node_modules/async/dist/async.min.js
  21. +3 −0 node_modules/request/node_modules/form-data/node_modules/async/index.js
  22. +632 −0 node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
  23. +4 −0 node_modules/request/node_modules/form-data/node_modules/async/nodelint.cfg
  24. +41 −0 node_modules/request/node_modules/form-data/node_modules/async/package.json
  25. BIN node_modules/request/node_modules/form-data/node_modules/async/test/.swp
  26. +1,367 −0 node_modules/request/node_modules/form-data/node_modules/async/test/test-async.js
  27. +24 −0 node_modules/request/node_modules/form-data/node_modules/async/test/test.html
  28. +3 −0 node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore
  29. +19 −0 node_modules/request/node_modules/form-data/node_modules/combined-stream/License
  30. +7 −0 node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile
  31. +132 −0 node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md
  32. +183 −0 node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js
  33. +2 −0 ...equest/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore
  34. +19 −0 ...s/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License
  35. +7 −0 .../request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile
  36. +154 −0 ...request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md
  37. +99 −0 ..._modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js
  38. +38 −0 ...uest/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json
  39. +6 −0 ...st/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js
  40. +38 −0 ..._modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js
  41. +21 −0 ...es/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js
  42. +14 −0 ...modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js
  43. +48 −0 .../node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js
  44. +15 −0 ...modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js
  45. +18 −0 ...a/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js
  46. +13 −0 ...ta/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js
  47. +13 −0 .../node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js
  48. +7 −0 ...quest/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js
  49. +39 −0 node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json
  50. +12 −0 node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js
  51. +256 −0 node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt
  52. +256 −0 node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt
  53. +27 −0 ...est/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js
  54. +34 −0 ...es/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js
  55. +38 −0 ...ata/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js
  56. +35 −0 ...uest/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js
  57. +24 −0 ...equest/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js
  58. +30 −0 ...est/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js
  59. +7 −0 node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js
  60. +43 −0 node_modules/request/node_modules/form-data/package.json
  61. +14 −0 node_modules/request/node_modules/form-data/test/common.js
  62. +1 −0 node_modules/request/node_modules/form-data/test/fixture/bacon.txt
  63. BIN node_modules/request/node_modules/form-data/test/fixture/unicycle.jpg
  64. +93 −0 node_modules/request/node_modules/form-data/test/integration/test-form-get-length.js
  65. +18 −0 node_modules/request/node_modules/form-data/test/integration/test-get-boundary.js
  66. +121 −0 node_modules/request/node_modules/form-data/test/integration/test-http-response.js
  67. +111 −0 node_modules/request/node_modules/form-data/test/integration/test-pipe.js
  68. +107 −0 node_modules/request/node_modules/form-data/test/integration/test-submit.js
  69. +7 −0 node_modules/request/node_modules/form-data/test/run.js
  70. +19 −0 node_modules/request/node_modules/mime/LICENSE
  71. +63 −0 node_modules/request/node_modules/mime/README.md
  72. +104 −0 node_modules/request/node_modules/mime/mime.js
  73. +42 −0 node_modules/request/node_modules/mime/package.json
  74. +55 −0 node_modules/request/node_modules/mime/test.js
  75. +1,588 −0 node_modules/request/node_modules/mime/types/mime.types
  76. +59 −0 node_modules/request/node_modules/mime/types/node.types
  77. +34 −0 node_modules/request/oauth.js
  78. +17 −0 node_modules/request/package.json
  79. BIN node_modules/request/tests/googledoodle.png
  80. +45 −0 node_modules/request/tests/run.js
  81. +86 −0 node_modules/request/tests/server.js
  82. +77 −0 node_modules/request/tests/squid.conf
  83. +20 −0 node_modules/request/tests/ssl/ca/ca.cnf
  84. 0 node_modules/request/tests/ssl/ca/ca.crl
  85. +17 −0 node_modules/request/tests/ssl/ca/ca.crt
  86. +13 −0 node_modules/request/tests/ssl/ca/ca.csr
  87. +18 −0 node_modules/request/tests/ssl/ca/ca.key
  88. +1 −0 node_modules/request/tests/ssl/ca/ca.srl
  89. +19 −0 node_modules/request/tests/ssl/ca/server.cnf
  90. +16 −0 node_modules/request/tests/ssl/ca/server.crt
  91. +11 −0 node_modules/request/tests/ssl/ca/server.csr
  92. +28 −0 node_modules/request/tests/ssl/ca/server.js
  93. +9 −0 node_modules/request/tests/ssl/ca/server.key
  94. +16 −0 node_modules/request/tests/ssl/npm-ca.crt
  95. +15 −0 node_modules/request/tests/ssl/test.crt
  96. +15 −0 node_modules/request/tests/ssl/test.key
  97. +117 −0 node_modules/request/tests/test-body.js
  98. +29 −0 node_modules/request/tests/test-cookie.js
  99. +90 −0 node_modules/request/tests/test-cookiejar.js
  100. +99 −0 node_modules/request/tests/test-defaults.js
  101. +37 −0 node_modules/request/tests/test-errors.js
  102. +30 −0 node_modules/request/tests/test-follow-all-303.js
  103. +35 −0 node_modules/request/tests/test-follow-all.js
  104. +79 −0 node_modules/request/tests/test-form.js
  105. +52 −0 node_modules/request/tests/test-headers.js
  106. +94 −0 node_modules/request/tests/test-httpModule.js
  107. +97 −0 node_modules/request/tests/test-https-strict.js
  108. +86 −0 node_modules/request/tests/test-https.js
  109. +117 −0 node_modules/request/tests/test-oauth.js
  110. +92 −0 node_modules/request/tests/test-params.js
  111. +52 −0 node_modules/request/tests/test-piped-redirect.js
  112. +202 −0 node_modules/request/tests/test-pipes.js
  113. +16 −0 node_modules/request/tests/test-pool.js
  114. +60 −0 node_modules/request/tests/test-protocol-changing-redirect.js
  115. +39 −0 node_modules/request/tests/test-proxy.js
  116. +28 −0 node_modules/request/tests/test-qs.js
  117. +154 −0 node_modules/request/tests/test-redirect.js
  118. +13 −0 node_modules/request/tests/test-s3.js
  119. +87 −0 node_modules/request/tests/test-timeout.js
  120. +14 −0 node_modules/request/tests/test-toJSON.js
  121. +63 −0 node_modules/request/tests/test-tunnel.js
  122. BIN node_modules/request/tests/unicycle.jpg
  123. +230 −0 node_modules/request/tunnel.js
  124. +19 −0 node_modules/request/uuid.js
  125. +65 −0 node_modules/request/vendor/cookie/index.js
  126. +72 −0 node_modules/request/vendor/cookie/jar.js
  127. +19 −0 package.json
  128. +15 −0 test.js
View
@@ -0,0 +1,22 @@
+var request = require('request')
+
+var token = ''
+exports.set_token = function( _token ) {
+ token = _token;
+}
+
+exports.get_billet = function( id, callback ) {
+
+ request("https://" + token + ":X@app.cobregratis.com.br/bank_billets/"+ id + ".json", function(err, response, body) {
+ callback( JSON.parse(body) )
+ })
+
+}
+
+exports.get_billets = function( callback ) {
+
+ request("https://" + token + ":X@app.cobregratis.com.br/bank_billets.json", function(err, response, body) {
+ callback( JSON.parse(body) )
+ })
+
+}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit ae04764

Please sign in to comment.