{"_id":"@ecoeats/revolut-api","_rev":"1-57a4536fe802810a531a884248645c6d","name":"@ecoeats/revolut-api","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.3":{"name":"@ecoeats/revolut-api","version":"0.0.3","description":"An API client for revolut","main":"index.js","scripts":{"test":"NODE_ENV=test mocha --reporter spec './test/**/*.js'","lint":"eslint .","precommit":"npm run lint","prepush":"npm run test","publish-patch":"node ./bin/publish patch && npm publish","publish-minor":"node ./bin/publish minor && npm publish","publish-major":"node ./bin/publish major && npm publish"},"keywords":["revolut","api","banking","fintech"],"author":{"name":"Stewart McGown","email":"stewart@ecoeats.uk"},"dependencies":{"debug":"^3.1.0","joi":"^13.0.2","ramda":"^0.25.0","request":"^2.83.0","request-promise":"^4.2.2","require-all":"^2.2.0"},"devDependencies":{"commander":"^2.13.0","eslint":"^4.13.1","eslint-config-airbnb":"^16.1.0","eslint-plugin-import":"^2.8.0","eslint-plugin-mocha":"^4.11.0","expect.js":"^0.3.1","http-status-codes":"^1.3.0","husky":"^0.14.3","i":"^0.3.6","inquirer":"^5.0.0","mocha":"^4.0.1","nock":"^9.1.4","npm":"^5.6.0","semver":"^5.5.0"},"bin":{"revolut-api":"publish.js"},"directories":{"lib":"lib","test":"test"},"repository":{"type":"git","url":"git+ssh://git@gitlab.com/ecoeats/revolut.git"},"license":"ISC","bugs":{"url":"https://gitlab.com/ecoeats/revolut/issues"},"homepage":"https://gitlab.com/ecoeats/revolut#readme","gitHead":"fbfe0b2c292ca268843736688933f7b32bd5432b","_id":"@ecoeats/revolut-api@0.0.3","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-eJXUF0IP7N4+Z32FnzjrYrt5bHrB2DgfO/6TN39EbfV395bFq2Hy2WHGt0KQcOec0Y9jnkJ6Z0qszRoMRg6FNw==","shasum":"a714eaebea528e04d1a259b1a8c2d875d2cca7dc","tarball":"https://registry.npmjs.org/@ecoeats/revolut-api/-/revolut-api-0.0.3.tgz","fileCount":53,"unpackedSize":47471,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7SVcCRA9TVsSAnZWagAAu8gP/2zWiPQ80iGoI6ZhpnTM\ntznCiPMvVB3dl7iRUsoBYvGTOrIILC2PWJCdZwitcQYaWXubzZnj/n7wfJjm\nGoI1z6adJH+pjYgNYM43ueo6l9fUus/wHdxTlaYHNEgb9jZblPFUi2qGNwDn\naMUv7Ho6y9pIcfQKYpmFQG/xxm6lYQI113gMXD6dPaEGrw84fze89aJJ7K6P\nZH7UPhSEdQnnrfBSwdoV2/cp5InyoSGH+lggkieW36ouL53Gri9j1wIC7eoN\nHdVdeNAj+lOAKuUSDqcCYeEob898v31R+QQHBLmmS1P04y3J2/FwMU9rauXw\nK/s6vfkgqKx7Yl7WqUUru8Ejq11J42so9YWxx0oFLVMpFsXqe2D6qQgehCNF\nZobLZ5ovrPK/6wrhrxkUW5iPG8oO/L/S2DNWmK/wpMTLWg2js8z42UoPa+oS\n3uemgrgl0+NMY3FJhLI9H0fMCC0zjOgo9HBi8XqikRDaRfZHOtZO6Jda2l/7\n6jys9tYz6+qjqgubtCefoN1vdi2GC0BsizjvMDyyHcVneSbpth/Yb9mAwgnV\ncU7EAQ20/RO8uVJ5AkJBnA29JXzwQzmhHYFF4Wk4ZomIS19H/HRx6ze1t6fa\nfEmT54JxZ0OAOh15vUWCxm44BTx3aq7iVfKTDq4NacYZ36nuoJ0ivNKnXU+h\nf/jh\r\n=1RdT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFGUL1s9ycFBk7JwYtosJ3jUgCpIiWk298VltM7sRmOVAiEA2/jRgRmcuLMXb5MAJBwEjoUrsnGaZ6nsZGm75GmDRr4="}]},"maintainers":[{"name":"ecoeats","email":"stewart@ecoeats.uk"}],"_npmUser":{"name":"ecoeats","email":"stewart@ecoeats.uk"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/revolut-api_0.0.3_1592599899968_0.28696633720425413"},"_hasShrinkwrap":false}},"time":{"created":"2020-06-19T20:51:39.932Z","0.0.3":"2020-06-19T20:51:40.086Z","modified":"2022-04-05T06:37:55.492Z"},"maintainers":[{"name":"ecoeats","email":"stewart@ecoeats.uk"}],"description":"An API client for revolut","homepage":"https://gitlab.com/ecoeats/revolut#readme","keywords":["revolut","api","banking","fintech"],"repository":{"type":"git","url":"git+ssh://git@gitlab.com/ecoeats/revolut.git"},"author":{"name":"Stewart McGown","email":"stewart@ecoeats.uk"},"bugs":{"url":"https://gitlab.com/ecoeats/revolut/issues"},"license":"ISC","readme":"# revolut\nA Revolut API client for Node JS\n\nThis is a wrapper for [the Revolut API](https://revolutdev.github.io/business-api/#introduction). Some use examples of this wrapper could be found [here](https://github.com/feliun/revolut/tree/master/playground);\n\nThis NodeJS APIs is helpful because:\n\n1. it hides revolut urls from you\n2. Configuration is injected on startup and used everywhere in a transparent way\n3. It applies validation on input messages (unless opted out, useful for debugging)\n4. It exposes an API based on promises\n5. It offers underlying information by using `DEBUG=revolut*`\n6. Handles errors appropriately\n\n# how to use it\nTo use the revolut wrapper you just need to initialise it like this:\n\n```\nconst initRevolut = require('revolut');\nconst config = {\n    environment: 'sandbox',\n    token: '7634253428AKHDJAGWD7868',\n    validation: false,\n    timeout: 2000\n};\nconst revolut = initRevolut(config);\n```\n\nAs you can guess, you can pass in configuration `environment` (sandbox|production), `token` and `timeout` for requests (this one is optional). Also, `validation` will be _true_ by default.\n\n## accounts\nAPI for [accounts](https://revolutdev.github.io/business-api/?shell--sandbox#accounts)\n\n### getAll\n```\nreturn revolut.accounts.getAll();\n```\n\n### get\n```\nreturn revolut.accounts.get(\"insert an account ID here\");\n```\n\n## counterparties\nAPI for [counterparties](https://revolutdev.github.io/business-api/?shell--sandbox#counterparties)\n\n### add\n```\nconst revolutAccount = ...;\n// https://revolutdev.github.io/business-api/#add-counterparty\nreturn revolut.counterparties.add(revolut_account);\n```\n\n### remove\n```\nreturn revolut.counterparties.remove(\"insert a counterparty ID here\");\n```\n\n### getAll\n```\nreturn revolut.counterparties.getAll();\n```\n\n### get\n```\nreturn revolut.counterparties.get(\"insert a counterparty ID here\");\n```\n\n## payments\nAPI for [payments](https://revolutdev.github.io/business-api/?shell--sandbox#payments)\n### transfer\n```\nconst payment = ...;\n// https://revolutdev.github.io/business-api/?shell--sandbox#transfer-between-own-accounts-in-the-same-currency\nreturn revolut.payments.transfer(payment);\n```\n\n### pay\n```\nconst payment = ...;\n// https://revolutdev.github.io/business-api/?shell--sandbox#create-payment\nreturn revolut.payments.pay(payment);\n```\n\n### getStatusById\n```\nreturn revolut.payments.getStatusById(\"insert a tx ID here\");\n```\n\n### getStatusByRequestId\n```\nreturn revolut.payments.getStatusByRequestId(\"insert a tx ID here\");\n```\n\n### getByCriteria\n```\n// https://revolutdev.github.io/business-api/?shell--sandbox#get-transactions\nreturn revolut.payments.getByCriteria({ count: 20, from: '2017-10-12' });\n```\n\n### cancel\n```\nreturn revolut.payments.cancel(\"insert a tx ID here\");\n```\n\n## webhooks\n### setup\n```\nreturn revolut.webhooks.setup({ \"url\": \"https://example.com/example/path\" });\n```\n","readmeFilename":"README.md"}