{"id":27160310,"url":"https://github.com/wobow/pubg_api","last_synced_at":"2025-04-08T23:41:09.930Z","repository":{"id":65477391,"uuid":"124929959","full_name":"Wobow/pubg_api","owner":"Wobow","description":"A nodejs wrapper for the official PUBG API","archived":false,"fork":false,"pushed_at":"2018-06-14T23:31:10.000Z","size":48,"stargazers_count":39,"open_issues_count":2,"forks_count":12,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-25T06:21:50.511Z","etag":null,"topics":["api","javascript","nodejs","playerunknown-s","pubg","wrapper"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wobow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-12T18:00:42.000Z","updated_at":"2023-09-08T17:37:49.000Z","dependencies_parsed_at":"2023-01-25T06:35:14.168Z","dependency_job_id":null,"html_url":"https://github.com/Wobow/pubg_api","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wobow%2Fpubg_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wobow%2Fpubg_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wobow%2Fpubg_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wobow%2Fpubg_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wobow","download_url":"https://codeload.github.com/Wobow/pubg_api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247947823,"owners_count":21023058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","javascript","nodejs","playerunknown-s","pubg","wrapper"],"created_at":"2025-04-08T23:41:08.746Z","updated_at":"2025-04-08T23:41:09.920Z","avatar_url":"https://github.com/Wobow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nodejs Wrapper for the official PUBG API\n[![npm 0.0.5](https://img.shields.io/badge/npm-v0.0.5-brightgreen.svg)](https://www.npmjs.com/package/pubg-api)\n## Intro\nThis is a universal wrapper/client for the official [PlayerUnknown's BattleGround's API](https://developer.playbattlegrounds.com/) that runs on Node JS and the browser.\n\nProject owner is [Wobow](https://github.com/Wobow), and is open to contribution.\n\nIt includes helpers to do the following :\n\n**Matches**\n- Load and filter matches\n- Load a specific match\n\n\n## Table of contents\n- [Installation](#installation)\n- [Usage](#usage)\n- [Status](#status)\n- [Contributing](#contributing)\n- [Running tests](#tests)\n- [Roadmap](#roadmap--guidelines)\n\n## Installation\n\n    $ npm install pubg-api@latest -S\n\n## Usage\n\nAfter installation, you can import the module to your project using require. \n```javascript\nconst Pubgapi = require('pubg-api');\n\nconst apiInstance = new Pubgapi('\u003capiKey\u003e');\n```\nThe module exposes a class that represents an instance of the api, given an [official API key](https://developer.playbattlegrounds.com/) that you must provide.\n\nYou can then interract with the instance of the API. All routes use promises by default. \n\nFor example :\n```javascript\napiInstance\n    .loadMatches(options)\n    .then(matches =\u003e {\n        // success\n    }, err =\u003e {\n        // handle error\n    });\n```\n\nYou can force the wrapper to return [rxjs' Observables](https://github.com/reactivex/rxjs) only by specifying with the asyncType options:\n```javascript\nconst apiInstance = new PubgApi('\u003capiKey\u003e', {asyncType: 'observable'});\n```\nor \n```javascript\napiInstance.asyncType = 'observable';\n```\nthen\n```javascript\napiInstance\n    .loadMatches(options) // \u003c-- Now returns an Observable\n    .subscribe(matches =\u003e {\n        // success\n    }, err =\u003e {\n        // handle error\n    });\n```\n\n## Status\n\nThis tab highlight the status of each route and function attached to it.\n\n| Route              | Function                     | Status           | Version     |\n|-------             |----------                    |--------          |---------    |\n| /matches           | `PubgApi.loadMatches`        | Deprecated       | ^0.0.1      |\n| /matches/{id}      | `PubgApi.loadMatchById`      | Up to date       | ^0.0.1      |\n| /players/          | `PubgApi.searchPlayers`      | Up to date       | ^1.0.0      |\n| /players/{id}      | `PubgApi.loadPlayerById`     | Up to date       | ^1.0.0      |\n| telemetry          | `PubgApi.loadTelemetry`      | Up to date       | ^0.6.0      |\n| /status            | `PubgApi.healthStatus`       | Up to date       | ^0.0.1      |\n\n## Contributing\n\nIf you want to contribute, open a pull request. Unless the change you are requesting is a hotfix for the latest stable version, you should always pull from `develop`. \n\n### Branch organisation\n`master` is the branch where we try to have the latest stable version up to date. Every new version shall be tagged properly with its version, followed by a release. One cannot push to this branch without a code review from the code owners. Use develop instead.\n\n`develop` is the branch used to iterate the development versions of the wrapper. It should always be based on `master`. All unstable versions of the wrapper will be tested on this branch. \n\n### Versioning\n\nWe will follow the naming convention of `major`.`minor`.`build`. \n\n### Lint\n\nWe are using `eslint` to check the code syntax, and are using the [AirBnB style guide for Javascript](https://github.com/airbnb/javascript). \nTo run the lint :\n\n    $ npm run lint\n\nBe sure to clean your code before submitting it.\n\n### Building\n\nTo build the wrapper, run \n\n    $ npm run build\n\nIt will generate the file `lib/pubg-api.js` using babel.\n\n### Publishing\n\nRun\n\n    $ npm publish\n\nIt will automatically check lint, unit tests and build the lib properly before publishing. The version must be bumped manually.\n\n## Tests\n\nYou can run the unit tests executing npm test. To execute the tests, you must provide an environnment variable `PUBG_API_KEY_TEST` set with the api key you want to use to run the tests. \n\n    $ export PUBG_API_KEY_TEST=\u003cyour API key\u003e\n    $ npm test\n\n## Roadmap \u0026 Guidelines\n\nThe goal of this wrapper is to simplify access to the API, and give a broader spectrum of functions to help developers use the API to its full potential.\n\nThis includes developping functions that computes multiple API calls and responses.\n\n- [ ] Implement [Telemetry](https://developer.playbattlegrounds.com/docs/en/telemetry.html) \n- [x] Implement [rxjs observable](https://github.com/reactivex/rxjs) alternative to promise\n- [ ] Allow selecting a specific shard for each call, instead of setting a default shard\n- [ ] Wrap multiple shard functions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwobow%2Fpubg_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwobow%2Fpubg_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwobow%2Fpubg_api/lists"}