{"_id":"@blastorg/gamecoordinator-dota-communicator","_rev":"5-08a0d72435d7bb51e937fb33345db0ec","name":"@blastorg/gamecoordinator-dota-communicator","dist-tags":{"latest":"1.1.4"},"versions":{"1.1.1":{"name":"@blastorg/gamecoordinator-dota-communicator","version":"1.1.1","author":{"name":"BLAST"},"_id":"@blastorg/gamecoordinator-dota-communicator@1.1.1","maintainers":[{"name":"blast-developer","email":"developer@blast.tv"}],"dist":{"shasum":"3d3672c13757224eeb14aa37d94ea391604be1b9","tarball":"https://registry.npmjs.org/@blastorg/gamecoordinator-dota-communicator/-/gamecoordinator-dota-communicator-1.1.1.tgz","fileCount":122,"integrity":"sha512-gq4pPnog3L4OxNqXASvIDGDapf6aBbTge2ZnSEWCfjDzznYjOamUMcE9EcM8cT5CKgtzyl/+5o2x071IKyHhRw==","signatures":[{"sig":"MEUCIQD1FqGgSieRFrjm2tDmK79XpHbOUTe918kqs4sdsFUFHQIgGaL5SvonvIkdUnms9KE+8TfeVdYhtgyrkIfqNsblnlM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13751307},"main":"lib/src/index.js","_from":"file:blastorg-gamecoordinator-dota-communicator-1.1.1.tgz","types":"lib/src/index.d.ts","config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"release":{"branches":[{"name":"main"}]},"scripts":{"tsc":"tsc --noEmit","lint":"eslint . --ext ts --report-unused-disable-directives --max-warnings 0","test":"jest --passWithNoTests","build":"rm -rf lib && tsc","prettier":"prettier src --check","local:test":"tsx local/index.ts","pack:local":"pnpm build && npm pack --pack-destination ~","preinstall":"npx only-allow pnpm","protos:sync":"git submodule update --init --recursive","prettier:write":"prettier --write ./src","protos:generate":"tsx protobufs/generateProtos.ts","protos:mappings":"tsx protobufs/generateMapping.ts","local:parseMatchMetadata":"tsx local/parseMatchMetadataFile.ts"},"_npmUser":{"name":"blast-developer","email":"developer@blast.tv"},"_resolved":"/tmp/cf04e98867944a3e356498744c3a2157/blastorg-gamecoordinator-dota-communicator-1.1.1.tgz","_integrity":"sha512-gq4pPnog3L4OxNqXASvIDGDapf6aBbTge2ZnSEWCfjDzznYjOamUMcE9EcM8cT5CKgtzyl/+5o2x071IKyHhRw==","_npmVersion":"10.8.2","description":"This Typescript library interacts with the Dota Game Coordinator. It has prebuilt methods that allows you to easily get specific information and it also provides you with a fully typed and comprehensive toolset that you can use to implement your own metho","directories":{},"_nodeVersion":"22.6.0","dependencies":{"long":"^5.2.3","bytebuffer":"^5.0.1","protobufjs":"^7.3.0","steam-user":"^5.0.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.11.2","jest":"^29.7.0","husky":"^8.0.0","dotenv":"^16.4.5","eslint":"^8.52.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","prettier":"^3.0.3","ts-proto":"^1.176.1","tsc-files":"^1.1.4","typescript":"^5.4.5","@types/jest":"^29.5.8","@types/node":"^20.14.0","lint-staged":"^15.0.2","typed-emitter":"^2.1.0","@tsconfig/node18":"^18.2.4","semantic-release":"^22.0.7","@types/bytebuffer":"^5.0.49","@types/steam-user":"^5.0.0","eslint-plugin-import":"^2.28.1","@semantic-release/git":"^10.0.1","@types/unbzip2-stream":"^1.4.3","@semantic-release/github":"^9.2.3","@typescript-eslint/parser":"^6.9.0","cz-conventional-changelog":"^3.3.0","@semantic-release/changelog":"^6.0.3","@typescript-eslint/eslint-plugin":"^6.7.5","@semantic-release/commit-analyzer":"^11.1.0","@semantic-release/release-notes-generator":"^12.1.0"},"_npmOperationalInternal":{"tmp":"tmp/gamecoordinator-dota-communicator_1.1.1_1724243020752_0.4738986202980875","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"@blastorg/gamecoordinator-dota-communicator","version":"1.1.3","author":{"name":"BLAST"},"_id":"@blastorg/gamecoordinator-dota-communicator@1.1.3","maintainers":[{"name":"blast-developer","email":"developer@blast.tv"}],"dist":{"shasum":"8174109d2e7222f43d37ea0b423db9263a46cb92","tarball":"https://registry.npmjs.org/@blastorg/gamecoordinator-dota-communicator/-/gamecoordinator-dota-communicator-1.1.3.tgz","fileCount":122,"integrity":"sha512-tz6gWxQFfC+NzRq7nvfgu5Q9dO0Pp8VlDVxhnEEhFErCLoFbn5pb+r9DnUYuiOKueqSzgQVAWGRZrHAX3kxwjw==","signatures":[{"sig":"MEUCIQDHBYK1E6HWteE2HwqmpnasLVSGFVK4j677GaX+ubkQ9QIgCxlJgrgIkToYRb94cfRvfF2njyIqcIWyZ9pMDkU+0v4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13751332},"main":"lib/src/index.js","_from":"file:blastorg-gamecoordinator-dota-communicator-1.1.3.tgz","types":"lib/src/index.d.ts","config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"engines":{"node":">=20.0.0"},"release":{"branches":[{"name":"main"}]},"scripts":{"tsc":"tsc --noEmit","lint":"eslint . --ext ts --report-unused-disable-directives --max-warnings 0","test":"jest --passWithNoTests","build":"rm -rf lib && tsc","prettier":"prettier src --check","local:test":"tsx local/index.ts","pack:local":"pnpm build && npm pack --pack-destination ~","preinstall":"npx only-allow pnpm","protos:sync":"git submodule update --init --recursive","prettier:write":"prettier --write ./src","protos:generate":"tsx protobufs/generateProtos.ts","protos:mappings":"tsx protobufs/generateMapping.ts","local:parseMatchMetadata":"tsx local/parseMatchMetadataFile.ts"},"_npmUser":{"name":"blast-developer","email":"developer@blast.tv"},"_resolved":"/tmp/552121fa72b7790a99b118ce73d07d7b/blastorg-gamecoordinator-dota-communicator-1.1.3.tgz","_integrity":"sha512-tz6gWxQFfC+NzRq7nvfgu5Q9dO0Pp8VlDVxhnEEhFErCLoFbn5pb+r9DnUYuiOKueqSzgQVAWGRZrHAX3kxwjw==","_npmVersion":"10.9.0","description":"This Typescript library interacts with the Dota Game Coordinator. It has prebuilt methods that allows you to easily get specific information and it also provides you with a fully typed and comprehensive toolset that you can use to implement your own metho","directories":{},"_nodeVersion":"22.11.0","dependencies":{"long":"^5.2.3","bytebuffer":"^5.0.1","protobufjs":"^7.3.0","steam-user":"^5.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.11.2","jest":"^29.7.0","husky":"^8.0.0","dotenv":"^16.4.5","eslint":"^8.52.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","prettier":"^3.0.3","ts-proto":"^1.176.1","tsc-files":"^1.1.4","typescript":"^5.4.5","@types/jest":"^29.5.8","@types/node":"^20.14.0","lint-staged":"^15.0.2","typed-emitter":"^2.1.0","@tsconfig/node20":"^20.1.4","semantic-release":"^22.0.7","@types/bytebuffer":"^5.0.49","@types/steam-user":"^5.0.3","eslint-plugin-import":"^2.28.1","@semantic-release/git":"^10.0.1","@types/unbzip2-stream":"^1.4.3","@semantic-release/github":"^9.2.3","@typescript-eslint/parser":"^6.9.0","cz-conventional-changelog":"^3.3.0","@semantic-release/changelog":"^6.0.3","semantic-release-export-data":"^1.1.0","@typescript-eslint/eslint-plugin":"^6.7.5","@semantic-release/commit-analyzer":"^11.1.0","@semantic-release/release-notes-generator":"^12.1.0"},"_npmOperationalInternal":{"tmp":"tmp/gamecoordinator-dota-communicator_1.1.3_1732119413735_0.5338455880102551","host":"s3://npm-registry-packages"}},"1.1.4":{"name":"@blastorg/gamecoordinator-dota-communicator","description":"This Typescript library interacts with the Dota Game Coordinator. It has prebuilt methods that allows you to easily get specific information and it also provides you with a fully typed and comprehensive toolset that you can use to implement your own metho","version":"1.1.4","main":"lib/src/index.js","types":"lib/src/index.d.ts","author":{"name":"BLAST"},"publishConfig":{"access":"public"},"release":{"branches":[{"name":"main"}]},"devDependencies":{"@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^11.1.0","@semantic-release/git":"^10.0.1","@semantic-release/github":"^9.2.3","@semantic-release/release-notes-generator":"^12.1.0","@tsconfig/node20":"^20.1.4","@types/bytebuffer":"^5.0.49","@types/jest":"^29.5.8","@types/node":"^20.14.0","@types/steam-user":"^5.0.3","@types/unbzip2-stream":"^1.4.3","@typescript-eslint/eslint-plugin":"^6.7.5","@typescript-eslint/parser":"^6.9.0","cz-conventional-changelog":"^3.3.0","dotenv":"^16.4.5","eslint":"^8.52.0","eslint-plugin-import":"^2.28.1","husky":"^8.0.0","jest":"^29.7.0","lint-staged":"^15.0.2","prettier":"^3.0.3","semantic-release":"^22.0.7","semantic-release-export-data":"^1.1.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","ts-proto":"^1.176.1","tsc-files":"^1.1.4","tsx":"^4.11.2","typed-emitter":"^2.1.0","typescript":"^5.4.5"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"dependencies":{"bytebuffer":"^5.0.1","long":"^5.2.3","protobufjs":"^7.3.0","steam-user":"^5.2.0"},"engines":{"node":">=20.0.0"},"scripts":{"build":"rm -rf lib && tsc && cp -r protobufs lib/","lint":"eslint . --ext ts --report-unused-disable-directives --max-warnings 0","test":"jest --passWithNoTests","tsc":"tsc --noEmit","pack:local":"pnpm build && npm pack --pack-destination ~","preinstall":"npx only-allow pnpm","prettier:write":"prettier --write ./src","prettier":"prettier src --check","local:test":"tsx local/index.ts","local:parseMatchMetadata":"tsx local/parseMatchMetadataFile.ts","protos:sync":"git submodule update --init --recursive","protos:generate":"tsx protobufs/generateProtos.ts","protos:mappings":"tsx protobufs/generateMapping.ts"},"_id":"@blastorg/gamecoordinator-dota-communicator@1.1.4","_integrity":"sha512-y0+toG+IOaxgxk6Kg6JxHGtdslS/Jkdj3hQyLZluSStWjtGCa5e9q6mjYbOlU/JCv9YS6j5slkTyA3myYSXFgw==","_resolved":"/tmp/d427e8cc35e59236a5545e3a3fe53afa/blastorg-gamecoordinator-dota-communicator-1.1.4.tgz","_from":"file:blastorg-gamecoordinator-dota-communicator-1.1.4.tgz","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-y0+toG+IOaxgxk6Kg6JxHGtdslS/Jkdj3hQyLZluSStWjtGCa5e9q6mjYbOlU/JCv9YS6j5slkTyA3myYSXFgw==","shasum":"9677f1144eb865e9c2b294183458e94c6b3446b6","tarball":"https://registry.npmjs.org/@blastorg/gamecoordinator-dota-communicator/-/gamecoordinator-dota-communicator-1.1.4.tgz","fileCount":286,"unpackedSize":33710467,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcayRnVYD+enuSFGjwD+or/eJp7L+0IwPvZQixjGrTfwIgIJwFhOxurda9+/Nf/X3GjNKq7HJFy8z2qYmg5E5NAbc="}]},"_npmUser":{"name":"blast-developer","email":"developer@blast.tv"},"directories":{},"maintainers":[{"name":"blast-developer","email":"developer@blast.tv"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gamecoordinator-dota-communicator_1.1.4_1732199125947_0.7013701395322625"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-21T12:23:40.594Z","modified":"2024-11-21T14:25:26.370Z","1.0.0":"2024-08-21T11:08:44.584Z","1.1.1":"2024-08-21T12:23:41.097Z","1.1.3":"2024-11-20T16:16:54.015Z","1.1.4":"2024-11-21T14:25:26.185Z"},"author":{"name":"BLAST"},"description":"This Typescript library interacts with the Dota Game Coordinator. It has prebuilt methods that allows you to easily get specific information and it also provides you with a fully typed and comprehensive toolset that you can use to implement your own metho","maintainers":[{"name":"blast-developer","email":"developer@blast.tv"}],"readme":"# Gamecoordinator Dota Communicator Typescript library\n\nThis Typescript library interacts with the Dota Game Coordinator. It has prebuilt methods that allows you to easily get specific information and it also provides you with a fully typed and comprehensive toolset that you can use to implement your own methods.\n\nIt requires the use of [steam-user](https://github.com/DoctorMcKay/node-steam-user) to interact with the current steam session. You should familiarize yourself with this library.\n\n# Custom methods\n\nThe following functions act as an example of how to implement your own functions, and allows you to interact with the Game Coordinator.\n\n### `getMatchDetails`\n\nInput the match ID and get information about the specific match in return. The return data matches the `CMsgDOTAMatch` protobuf.\n\n### `getProfileCard`\n\nInput the account id of a user and get their profile card back in return. The return data matches the `CMsgDOTAProfileCard` protobuf.\n\n## Install\n\n\n```shell\nnpm install @blastorg/gamecoordinator-dota-communicator\npnpm install @blastorg/gamecoordinator-dota-communicator\n```\n\n**Example**\n\nAlso visible in /local\n\n```\n\n// Define clients\nconst client = new steamUser();\nconst dota = new Dota(client);\n\n// Log on to Steam using the refresh token\nclient.logOn({\n  refreshToken: process.env.STEAM_REFRESH_TOKEN as string,\n});\n\n// On successful logon, set the persona state to online and play Dota 2\nclient.on(\"loggedOn\", () => {\n  console.log(\"Logged on\");\n\n  client.setPersona(steamUser.EPersonaState.Online);\n\n  client.gamesPlayed([570], true);\n});\n\n// When the client is connected to the Game Coordinator, get match details for a match and the profile card for an account\n\ndota.customEvents.on(\"connectedToGc\", async () => {\n  console.log(\"Connected to GC\");\n  const data = await dota.getMatchDetails(\"7735807633\");\n\n  console.log(data);\n\n  const profileCard = await dota.getProfileCard(92307178);\n\n  console.log(profileCard);\n});\n\n```\n\n# Running locally\n\nRun the following commands in the following order. It installs, gets the most recent protobufs and generates types.\n\n1. `pnpm install`\n2. `pnpm run protos:sync`\n3. `pnpm run protos:generate`\n4. `pnpm run protos:mappings`\n\n**ENV**\n\n```\nSTEAM_REFRESH_TOKEN=YOUR_REFRESH_TOKEN\n```\n","readmeFilename":"README.md"}