{"_id":"@2bttns/sdk","_rev":"21-35823ac4c85cb896228417e486ee8d72","time":{"created":"2023-07-05T19:14:57.214Z","1.0.0":"2023-05-18T16:33:35.288Z","modified":"2024-02-24T10:06:48.411Z","0.0.1":"2023-05-18T16:41:35.054Z","0.0.2":"2023-05-18T17:08:30.045Z","0.0.3":"2023-05-18T17:11:14.044Z","0.0.4":"2023-05-18T17:12:05.535Z","0.0.5":"2023-05-18T17:13:14.565Z","0.0.6":"2023-05-18T18:08:38.087Z","1.0.0-alpha":"2023-07-05T18:59:03.960Z","1.0.1-alpha":"2023-07-05T19:14:57.457Z","1.0.2-alpha":"2023-07-06T21:13:10.570Z","1.0.3-alpha":"2023-07-06T22:05:53.090Z","1.1.0-alpha":"2023-07-17T18:33:12.657Z","1.0.0-beta":"2024-02-23T02:53:26.264Z","1.0.1-beta":"2024-02-24T08:44:58.156Z","1.0.2-beta":"2024-02-24T08:45:55.360Z","1.0.3-beta":"2024-02-24T09:21:02.587Z","1.0.4-beta":"2024-02-24T10:06:47.929Z"},"name":"@2bttns/sdk","dist-tags":{"latest":"1.0.4-beta"},"versions":{"1.0.1-alpha":{"name":"@2bttns/sdk","version":"1.0.1-alpha","description":"The official 2bttns Node.js SDK","main":"dist/index.js","types":"types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/2bttns/2bttns.git"},"scripts":{"prebuild":"npm run generate-openapi-types","build":"rm -rf dist && rm -rf types && tsc","test":"echo \"Error: no test specified\" && exit 1","generate-openapi-types":"npx openapi-typescript http://localhost:3001/api/openapi.json --output 2bttns-api.d.ts"},"license":"MIT","devDependencies":{"@types/jsonwebtoken":"^9.0.1","openapi-typescript":"^6.1.0","typescript":"^4.9.5"},"dependencies":{"jsonwebtoken":"^9.0.0","openapi-typescript-fetch":"^1.1.3"},"gitHead":"5f834c5b735124c41f3fbad2301be9fc907ea611","bugs":{"url":"https://github.com/2bttns/2bttns/issues"},"homepage":"https://github.com/2bttns/2bttns#readme","_id":"@2bttns/sdk@1.0.1-alpha","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-WMx+oVNW7TG7tUAWhpLu5mQhCDSBT0JB0wikg8atfpOWiih4FMhhyD+GNo1lZS69IEJZVJOh+bLfiTJ5XLj3HQ==","shasum":"3580ab144264516e05b15ce7a373d482a0aa9ccc","tarball":"https://registry.npmjs.org/@2bttns/sdk/-/sdk-1.0.1-alpha.tgz","fileCount":8,"unpackedSize":71166,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBHgfMd0bgbnDGqyv2QdbAjH/LcQQAqYJeV2tHbMOR59AiEA2eYvDcVnpZEqn9tVb7tFE1EC0qASKLzfMqPWwP8E04U="}]},"_npmUser":{"name":"mat-2bttns","email":"mat@2bttns.com"},"directories":{},"maintainers":[{"name":"mriziq","email":"amer@2bttns.com"},{"name":"mat-2bttns","email":"mat@2bttns.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk_1.0.1-alpha_1688584497270_0.052567359938617386"},"_hasShrinkwrap":false},"1.0.2-alpha":{"name":"@2bttns/sdk","version":"1.0.2-alpha","description":"The official 2bttns Node.js SDK","main":"dist/index.js","types":"types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/2bttns/2bttns.git"},"scripts":{"prebuild":"npm run generate-openapi-types","build":"rm -rf dist && rm -rf types && tsc","test":"echo \"Error: no test specified\" && exit 1","generate-openapi-types":"npx openapi-typescript http://localhost:3001/api/openapi.json --output 2bttns-api.d.ts"},"license":"MIT","devDependencies":{"@types/jsonwebtoken":"^9.0.1","openapi-typescript":"^6.1.0","typescript":"^4.9.5"},"dependencies":{"@types/node-fetch":"^2.6.4","jsonwebtoken":"^9.0.0","node-fetch":"^2.6.12","openapi-typescript-fetch":"^1.1.3"},"gitHead":"dc657585b894f2cf974becbe27997ccb17429b67","bugs":{"url":"https://github.com/2bttns/2bttns/issues"},"homepage":"https://github.com/2bttns/2bttns#readme","_id":"@2bttns/sdk@1.0.2-alpha","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-7l5/qLs4wyUT9w2if8LnBj8MRDbSEB54Myl6mxNAQPwF5LZPTgAKJAVdGq+BHSCjPgzG9WSbhOxsM1OC5aAzmA==","shasum":"31510d126be2c0aefbf514709319bb8e1db1dad8","tarball":"https://registry.npmjs.org/@2bttns/sdk/-/sdk-1.0.2-alpha.tgz","fileCount":10,"unpackedSize":66502,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBudL0AkyB6exayjgaE+Fy+xToSrS53NNV4h6iAm7H2qAiAR4H9FeINPD9fqx8Gk0s78yskLNBtoi5LslcpustEaFg=="}]},"_npmUser":{"name":"mat-2bttns","email":"mat@2bttns.com"},"directories":{},"maintainers":[{"name":"mriziq","email":"amer@2bttns.com"},{"name":"mat-2bttns","email":"mat@2bttns.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk_1.0.2-alpha_1688677990378_0.8405994417355287"},"_hasShrinkwrap":false},"1.0.3-alpha":{"name":"@2bttns/sdk","version":"1.0.3-alpha","description":"The official 2bttns Node.js SDK","main":"dist/index.js","types":"types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/2bttns/2bttns.git"},"scripts":{"prebuild":"npm run generate-openapi-types","build":"rm -rf dist && rm -rf types && tsc","test":"echo \"Error: no test specified\" && exit 1","generate-openapi-types":"npx openapi-typescript http://localhost:3001/api/openapi.json --output 2bttns-api.d.ts"},"license":"MIT","devDependencies":{"@types/jsonwebtoken":"^9.0.1","openapi-typescript":"^6.1.0","typescript":"^4.9.5"},"dependencies":{"@types/node-fetch":"^2.6.4","jsonwebtoken":"^9.0.0","node-fetch":"^2.6.12","openapi-typescript-fetch":"^1.1.3"},"gitHead":"4f36d104ee92818fb01eb53154a5320c469b9f61","bugs":{"url":"https://github.com/2bttns/2bttns/issues"},"homepage":"https://github.com/2bttns/2bttns#readme","_id":"@2bttns/sdk@1.0.3-alpha","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-bxwH+7yV4vLPEh5Q+4V0x13um/zB49bA1jDXzEDcpaIP8JJoy47pU+PzUkx4xLRPtPH7EBW7z/zrjbRprjP5Yg==","shasum":"844574c299008b103d90c3f09ed62d12340d4cf7","tarball":"https://registry.npmjs.org/@2bttns/sdk/-/sdk-1.0.3-alpha.tgz","fileCount":10,"unpackedSize":67115,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGf5pOdFsuHiyvuYWgSFWiImXA5qd3E5T3CGYkIHAuvlAiEAgnCpsmInwSN2BmOTmm3jFSFuO2G81VBjk73sY2TQabc="}]},"_npmUser":{"name":"mat-2bttns","email":"mat@2bttns.com"},"directories":{},"maintainers":[{"name":"mriziq","email":"amer@2bttns.com"},{"name":"mat-2bttns","email":"mat@2bttns.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk_1.0.3-alpha_1688681152902_0.17369393833163005"},"_hasShrinkwrap":false},"1.1.0-alpha":{"name":"@2bttns/sdk","version":"1.1.0-alpha","description":"The official 2bttns Node.js SDK","main":"dist/index.js","types":"types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/2bttns/2bttns.git"},"scripts":{"prebuild":"npm run generate-openapi-types","build":"rm -rf dist && rm -rf types && tsc","test":"echo \"Error: no test specified\" && exit 1","generate-openapi-types":"npx openapi-typescript http://localhost:3001/api/openapi.json --output 2bttns-api.d.ts"},"license":"MIT","devDependencies":{"@types/jsonwebtoken":"^9.0.1","openapi-typescript":"^6.1.0","typescript":"^4.9.5"},"dependencies":{"@types/node-fetch":"^2.6.4","jsonwebtoken":"^9.0.0","node-fetch":"^2.6.12","openapi-typescript-fetch":"^1.1.3"},"gitHead":"8703e52a897136a0807f865332f6d81c400cef98","bugs":{"url":"https://github.com/2bttns/2bttns/issues"},"homepage":"https://github.com/2bttns/2bttns#readme","_id":"@2bttns/sdk@1.1.0-alpha","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-ew26FEVrOYBeiEUHTcSsOgLBUaeAmqY/kEhNHAcBHJ4roVKQ4I7gSMW4DV+lnytG2Gtgc4uqSe7XYuNEvgrcgw==","shasum":"6038949afdb291ef2d3abcd15866d5e06f79a2ae","tarball":"https://registry.npmjs.org/@2bttns/sdk/-/sdk-1.1.0-alpha.tgz","fileCount":10,"unpackedSize":67239,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChHZEUgroDIQh3Tqnu+apt/qF0yC/UIVaxN43hgLj3vAIhAKYpQeR7dAokx4J5XmVJjXY/PxhH83qs2e6lpa0Gk5Sg"}]},"_npmUser":{"name":"mat-2bttns","email":"mat@2bttns.com"},"directories":{},"maintainers":[{"name":"mriziq","email":"amer@2bttns.com"},{"name":"mat-2bttns","email":"mat@2bttns.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk_1.1.0-alpha_1689618792459_0.5402767418428167"},"_hasShrinkwrap":false},"1.0.0-beta":{"name":"@2bttns/sdk","version":"1.0.0-beta","description":"The official 2bttns Node.js SDK","main":"dist/index.js","types":"types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/2bttns/2bttns.git"},"scripts":{"prebuild":"npm run generate-openapi-types","build":"rm -rf dist && rm -rf types && tsc","test":"echo \"Error: no test specified\" && exit 1","generate-openapi-types":"npx openapi-typescript http://localhost:3001/api/openapi.json --output 2bttns-api.d.ts"},"license":"MIT","devDependencies":{"@types/jsonwebtoken":"^9.0.1","openapi-typescript":"^6.1.0","typescript":"^4.9.5"},"dependencies":{"@types/node-fetch":"^2.6.4","jsonwebtoken":"^9.0.0","node-fetch":"^2.6.12","openapi-typescript-fetch":"^1.1.3"},"_id":"@2bttns/sdk@1.0.0-beta","gitHead":"131a04b818c04a4be5f82ad683a0bad6f165e89b","bugs":{"url":"https://github.com/2bttns/2bttns/issues"},"homepage":"https://github.com/2bttns/2bttns#readme","_nodeVersion":"20.11.0","_npmVersion":"10.3.0","dist":{"integrity":"sha512-Ij4dGQ+/YTqiCos/xelHkoqsUEWK0m7gJUXXwBMuf7+4CAcTNPGzuNED8gyu3EE8dzcyqssrESzBTlpAyTqaYg==","shasum":"b71b8f440d89b6a63cc342ec9cf372745b6ed24d","tarball":"https://registry.npmjs.org/@2bttns/sdk/-/sdk-1.0.0-beta.tgz","fileCount":11,"unpackedSize":74966,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFsPwFtWMWHQIVKB6n49589cbalH3dgvcoTiB57ygY45AiAO/2IBwM22oQdd/Un4u4VSGaoOFHxvmNtXYWAmWEGWcQ=="}]},"_npmUser":{"name":"mat-2bttns","email":"mat@2bttns.com"},"directories":{},"maintainers":[{"name":"mriziq","email":"amer@2bttns.com"},{"name":"mat-2bttns","email":"mat@2bttns.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk_1.0.0-beta_1708656806093_0.7307222675903506"},"_hasShrinkwrap":false},"1.0.1-beta":{"name":"@2bttns/sdk","version":"1.0.1-beta","description":"The official 2bttns Node.js SDK","main":"dist/index.js","types":"types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/2bttns/2bttns.git"},"scripts":{"prebuild":"npm run generate-openapi-types","build":"rm -rf dist && rm -rf types && tsc","test":"echo \"Error: no test specified\" && exit 1","generate-openapi-types":"npx openapi-typescript http://localhost:3001/api/openapi.json --output 2bttns-api.d.ts"},"license":"MIT","devDependencies":{"@types/jsonwebtoken":"^9.0.1","openapi-typescript":"^6.1.0","typescript":"^4.9.5"},"dependencies":{"@types/node-fetch":"^2.6.4","jsonwebtoken":"^9.0.0","node-fetch":"^2.6.12","openapi-typescript-fetch":"^1.1.3"},"_id":"@2bttns/sdk@1.0.1-beta","gitHead":"b1daee3b213524c91871f2beb7eb749f1af6980b","bugs":{"url":"https://github.com/2bttns/2bttns/issues"},"homepage":"https://github.com/2bttns/2bttns#readme","_nodeVersion":"20.11.0","_npmVersion":"10.3.0","dist":{"integrity":"sha512-4ETOPXuFmjCnvlGkJYmAma5javvIJnkJw9PdSKbEKyJlci803WoTR9JEoG8Qu9YDRq1HGR1Fk5HHDjzS0SCJiQ==","shasum":"0a2d6d1e71fcb9b36eb04cde704b2a7ee5fbf27d","tarball":"https://registry.npmjs.org/@2bttns/sdk/-/sdk-1.0.1-beta.tgz","fileCount":11,"unpackedSize":79301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgbUeXakz9gQy+7SQgJmkoztR/6Ksd8+5fK4I5xf3BaAIgNy2P172asc5nCV39ryOQv5Kn87i+i5o8oL+qtyrKY5Q="}]},"_npmUser":{"name":"mat-2bttns","email":"mat@2bttns.com"},"directories":{},"maintainers":[{"name":"mriziq","email":"amer@2bttns.com"},{"name":"mat-2bttns","email":"mat@2bttns.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk_1.0.1-beta_1708764297951_0.5639742520575914"},"_hasShrinkwrap":false},"1.0.2-beta":{"name":"@2bttns/sdk","version":"1.0.2-beta","description":"The official 2bttns Node.js SDK","main":"dist/index.js","types":"types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/2bttns/2bttns.git"},"scripts":{"prebuild":"npm run generate-openapi-types","build":"rm -rf dist && rm -rf types && tsc","test":"echo \"Error: no test specified\" && exit 1","generate-openapi-types":"npx openapi-typescript http://localhost:3001/api/openapi.json --output 2bttns-api.d.ts"},"license":"MIT","devDependencies":{"@types/jsonwebtoken":"^9.0.1","openapi-typescript":"^6.1.0","typescript":"^4.9.5"},"dependencies":{"@types/node-fetch":"^2.6.4","jsonwebtoken":"^9.0.0","node-fetch":"^2.6.12","openapi-typescript-fetch":"^1.1.3"},"_id":"@2bttns/sdk@1.0.2-beta","gitHead":"957f973681da0cfa7a8b03197c3905c9fb6df4e0","bugs":{"url":"https://github.com/2bttns/2bttns/issues"},"homepage":"https://github.com/2bttns/2bttns#readme","_nodeVersion":"20.11.0","_npmVersion":"10.3.0","dist":{"integrity":"sha512-Lkh0LYvI64reLJaH4ZXNV904elHYdF86UgwA3ynD/QQgItib1Nl6XFU6ahXmYajBAO84IzJs/wGKBpXVtQIkxw==","shasum":"d1a40d4f9664f286181e8b117a1ef96c4fa2306e","tarball":"https://registry.npmjs.org/@2bttns/sdk/-/sdk-1.0.2-beta.tgz","fileCount":11,"unpackedSize":79301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBULrTeLQTvobvzWqVtXc9v2heuR4lMd4ezRh8/Skct/AiBanWeH4/Lou8s7X/ca5utGAKJws5iAfsZos4s5LiXjwg=="}]},"_npmUser":{"name":"mat-2bttns","email":"mat@2bttns.com"},"directories":{},"maintainers":[{"name":"mriziq","email":"amer@2bttns.com"},{"name":"mat-2bttns","email":"mat@2bttns.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk_1.0.2-beta_1708764355206_0.34534642230197243"},"_hasShrinkwrap":false},"1.0.3-beta":{"name":"@2bttns/sdk","version":"1.0.3-beta","description":"The official 2bttns Node.js SDK","main":"dist/index.js","types":"types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/2bttns/2bttns.git"},"scripts":{"prebuild":"npm run generate-openapi-types","build":"rm -rf dist && rm -rf types && tsc","test":"echo \"Error: no test specified\" && exit 1","generate-openapi-types":"npx openapi-typescript http://localhost:3001/api/openapi.json --output 2bttns-api.d.ts"},"license":"MIT","devDependencies":{"@types/jsonwebtoken":"^9.0.1","openapi-typescript":"^6.1.0","typescript":"^4.9.5"},"dependencies":{"@types/node-fetch":"^2.6.4","jsonwebtoken":"^9.0.0","node-fetch":"^2.6.12","openapi-typescript-fetch":"^1.1.3"},"_id":"@2bttns/sdk@1.0.3-beta","gitHead":"6f75e2b966384408bea8b53a73c05a33e3adb164","bugs":{"url":"https://github.com/2bttns/2bttns/issues"},"homepage":"https://github.com/2bttns/2bttns#readme","_nodeVersion":"20.11.0","_npmVersion":"10.3.0","dist":{"integrity":"sha512-14+Vg3VBR8iDAOe15DWnF0r5N/Mcq/ad9n+7yA2cOwm19nlJMH1HIeI55bbakcp9yUk6UgHx3FPff1RuaSOwDw==","shasum":"19457d00d36bebfd56a80f33a29212c5e0ec3368","tarball":"https://registry.npmjs.org/@2bttns/sdk/-/sdk-1.0.3-beta.tgz","fileCount":11,"unpackedSize":80076,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID8pIZr6hhpW1deyzJpaBkhbl0PHHOWTEDbMfPIgi9PlAiBw1rd6q1y8/Dbcc3/oTBFkMzWvoyXrkBjixRuS3Nqc5w=="}]},"_npmUser":{"name":"mat-2bttns","email":"mat@2bttns.com"},"directories":{},"maintainers":[{"name":"mriziq","email":"amer@2bttns.com"},{"name":"mat-2bttns","email":"mat@2bttns.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk_1.0.3-beta_1708766462354_0.41043443859313133"},"_hasShrinkwrap":false},"1.0.4-beta":{"name":"@2bttns/sdk","version":"1.0.4-beta","description":"The official 2bttns Node.js SDK","main":"dist/index.js","types":"types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/2bttns/2bttns.git"},"scripts":{"prebuild":"npm run generate-openapi-types","build":"rm -rf dist && rm -rf types && tsc","test":"echo \"Error: no test specified\" && exit 1","generate-openapi-types":"npx openapi-typescript http://localhost:3001/api/openapi.json --output 2bttns-api.d.ts"},"license":"MIT","devDependencies":{"@types/jsonwebtoken":"^9.0.1","openapi-typescript":"^6.1.0","typescript":"^4.9.5"},"dependencies":{"@types/node-fetch":"^2.6.4","jsonwebtoken":"^9.0.0","node-fetch":"^2.6.12","openapi-typescript-fetch":"^1.1.3"},"_id":"@2bttns/sdk@1.0.4-beta","gitHead":"cebe087a1127685e3dde062303a1baa02fefe696","bugs":{"url":"https://github.com/2bttns/2bttns/issues"},"homepage":"https://github.com/2bttns/2bttns#readme","_nodeVersion":"20.11.0","_npmVersion":"10.3.0","dist":{"integrity":"sha512-ulKUOPW2E0YvIo7ixlc2y00bXl96D2jFgSyWo0Qhca5BDTqvmHqaJi+ir/MPXNoIcobClJFqTO9touZjXq6+rg==","shasum":"c7cf4ff97264fbd8a626316724e224c386298a74","tarball":"https://registry.npmjs.org/@2bttns/sdk/-/sdk-1.0.4-beta.tgz","fileCount":11,"unpackedSize":81495,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiHjBF1IhaqcazpD+ZCa7QSbOtU/MGAchW37zQSvbGHQIgFSBmoePrGG+OFSZX7EcpC7ZuJJrNjExBbpnvlc4FA6k="}]},"_npmUser":{"name":"mat-2bttns","email":"mat@2bttns.com"},"directories":{},"maintainers":[{"name":"mriziq","email":"amer@2bttns.com"},{"name":"mat-2bttns","email":"mat@2bttns.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk_1.0.4-beta_1708769207779_0.19844258254042169"},"_hasShrinkwrap":false}},"maintainers":[{"name":"mriziq","email":"amer@2bttns.com"},{"name":"mat-2bttns","email":"mat@2bttns.com"}],"description":"The official 2bttns Node.js SDK","homepage":"https://github.com/2bttns/2bttns#readme","repository":{"type":"git","url":"git+https://github.com/2bttns/2bttns.git"},"bugs":{"url":"https://github.com/2bttns/2bttns/issues"},"license":"MIT","readme":"![npm](https://img.shields.io/npm/v/@2bttns/sdk?style=for-the-badge)\n![npm](https://img.shields.io/npm/dw/@2bttns/sdk?style=for-the-badge)\n![npm](https://img.shields.io/npm/l/@2bttns/sdk?style=for-the-badge)\n\nThe official 2bttns Node.js SDK\n\n# Getting Started\n\n## Installation\n\n```\nnpm install @2bttns/sdk\n```\n\n## Configuration\n\nInstantiate the `TwoBttnsApi` class using your 2bttns App ID, App Secret, and the base URL of your 2bttns app.\n\nWe suggest using [dotenv](https://www.npmjs.com/package/dotenv) to configure environment variables.\n\n```sh\n# .env file example\nTWOBTTNS_APP_ID=example-app\nTWOBTTNS_APP_SECRET=example-secret-value\nTWOBTTNS_BASE_URL=http://localhost:3262\n```\n\nTypeScript:\n\n```typescript\n/*  server/some/path/twobttns.ts  */\nimport \"dotenv/config\";\nimport { TwoBttnsApi } from \"@2bttns/sdk\";\n\nexport const twobttns = new TwoBttnsApi({\n  appId: process.env.TWOBTTNS_APP_ID!,\n  secret: process.env.TWOBTTNS_APP_SECRET!,\n  url: process.env.TWOBTTNS_BASE_URL!,\n});\n```\n\nCommonJS:\n\n```javascript\n/*  server/some/path/twobttns.js  */\nrequire(\"dotenv\").config();\nconst { TwoBttnsApi } = require(\"@2bttns/sdk\");\n\nexport const twobttns = new TwoBttnsApi({\n  appId: process.env.TWOBTTNS_APP_ID,\n  secret: process.env.TWOBTTNS_APP_SECRET,\n  url: process.env.TWOBTTNS_BASE_URL,\n});\n```\n\n## Usage\n\n> **Warning**\n>\n> The 2bttns SDK is intended for server-side use only.\n>\n> It should not be used by client-side code, because API requests are made using an access token generated using an API Key secret that should not be exposed.\n>\n> This SDK will throw an error if it detects it is being used in a browser environment.\n\nAfter configuring the SDK, you can use your exported `twobttns` instance to interact with your 2bttns app.\n\n### Making 2bttns API Calls\n\n> Tip 1: For the full list of available API endpoints that the 2bttns SDK can use, see the API documentation page on your 2bttns console (i.e. http://localhost:3262/api-documentation).\n\n> Tip 2: The API client is built on openapi-typescript. It comes with TypeScript types and autocompletion out of the box.\n\nPerform API calls against your 2bttns console API using the `.callApi(...)` method.\n\nThe authentication process is handled automatically via a Bearer JWT generated from your App ID and App Secret.\n\nExamples:\n\n```typescript\n/*  server/path/to/api/example-handler.ts  */\n// ...\nconst { data } = await twobttns.callApi(\"/game-objects\", \"post\", {\n  name: \"caffè macchiato\",\n  tags: [\"coffee\", \"beverages\", \"breakfast-menu\"],\n});\nconsole.log(data.createdGameObject);\n// ...\n```\n\n```typescript\n/*  server/path/to/api/another-example-handler.ts  */\n// ...\nconst { data } = await twobttns.callApi(\"/players\", \"get\");\nconsole.log(data.players);\n// ...\n```\n\n```typescript\n/*  server/path/to/api/yet-another-example-handler.ts  */\n// ...\nconst { data } = await twobttns.callApi(\"/game-objects/ranked\", \"get\", {\n  inputTags: [\"moods\", \"coffee\"],\n  outputTag: \"coffee\",\n  playerId: \"player-1\",\n});\nconsole.log(data.scores);\n// ...\n```\n\n### Generate Play URL\n\nYou can redirect users from your application to a 2bttns game you've created by generating a unique Play URL:\n\n```ts\n/*\n * Example Output: Example 2bttns play URL:  localhost:3262/play?game_id=example-game-0&app_id=example-app&jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoicGxheWVyX3Rva2VuIiwiYXBwSWQiOiJleGFtcGxlLWFwcCIsInBsYXllcklkIjoiZXhhbXBsZS1wbGF5ZXIiLCJpYXQiOjE3MDg3NjY4MzIsImV4cCI6MTcwODc3MDQzMn0.mfSdYMJCYGQfTr0U5y9nQKCayTOvx5FmdJv_IVHe1Rw&callback_url=http%3A%2F%2Flocalhost%3A3262\n */\ndemo2bttnsGeneratePlayURL();\nasync function demo2bttnsGeneratePlayURL() {\n  const { data } = await twobttns.callApi(\n    \"/authentication/generatePlayURL\",\n    \"get\",\n    {\n      app_id: process.env.TWOBTTNS_APP_ID!,\n      secret: process.env.TWOBTTNS_APP_SECRET!,\n      callback_url: process.env.TWOBTTNS_BASE_URL!,\n      game_id: \"example-game-0\",\n      player_id: \"example-player\",\n    }\n  );\n  console.log(\"Example 2bttns play URL: \", data);\n}\n```\n","readmeFilename":"README.md"}