diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..1d4984b --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +our Discord Server. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..663be7f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,61 @@ +# Contribution Guidelines + +Thank you for considering contributing to our project! We welcome contributions from the community and are grateful for your support. + +## How to Contribute + +### Reporting Bugs + +If you find a bug, please report it by creating an issue on [GitHub](https://github.com/CalumW1/R6StatAPI/issues). Please include as much detail as possible to help us understand and reproduce the issue. + +### Suggesting Enhancements + +If you have an idea for an enhancement or new feature, please open an issue on [GitHub](https://github.com/CalumW1/R6StatAPI/issues) and describe your suggestion in detail. + +### Submitting Pull Requests + +1. **Fork the Repository**: Click the "Fork" button at the top right of the repository page to create a copy of the repository on your GitHub account. + +2. **Clone Your Fork**: Clone your forked repository to your local machine. + ```bash + git clone https://github.com//R6StatAPI.git + cd your-project + ``` + +3. **Create a Branch**: Create a new branch for your work. + ```bash + git checkout -b feature/your-feature-name + ``` + +4. **Make Changes**: Make your changes to the codebase. + +5. **Commit Changes**: Commit your changes with a descriptive commit message. + ```bash + git add . + git commit -m "Add feature: your feature description" + ``` + +6. **Push Changes**: Push your changes to your forked repository. + ```bash + git push origin feature/your-feature-name + ``` + +7. **Create a Pull Request**: Go to the original repository and create a pull request from your forked repository. Please provide a clear and descriptive title and description for your pull request. + +### Code Style + +Please follow the existing code style and conventions used in the project. If you are unsure about any aspect of the code style, feel free to ask for clarification by opening an issue. + +### Testing + +Please ensure that your changes do not break any existing tests and add new tests for any new functionality. Run the tests locally before submitting your pull request. + +### License + +By contributing to this project, you agree that your contributions will be licensed under the MIT License. + +## Code of Conduct + +Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. + +Thank you for your contributions! \ No newline at end of file diff --git a/README.md b/README.md index 3fc46ca..3757154 100644 --- a/README.md +++ b/README.md @@ -9,1953 +9,26 @@ shield4 -## Table of Contents - -- [Installation](#installation) -- [Getting Started](#getting-started) -- Methods - - [Statistics](#statistics) - - [Marketplace](#marketplace-apis) -- [Support](#support) - -## Installation - -`npm i r6statapi` - -## Suported Runtimes - -- Node.js (20.13.0+) -- Bun (1.1.26) - ## Getting Started +you can install the package using npm or bun: -To get started you will need a Ubisoft login, it is best to create a new account and not the account you normally use. Create a new account [here](account.ubisoft.com/login) - -The example below has the email and password variables hardcoded but it would be better to use [dotenv](https://www.npmjs.com/package/dotenv) to manage environment variables. - -```JS -import r6statapi from 'r6statapi'; -const api = new r6statapi(); - -// or CommonJS -const { R6StatAPI } = require("r6statapi"); -const api = new R6StatAPI(); - -// replace with your own information -const email = "test@gmail.com" -const password = "Password123" -const usermame = "CaleyW1" -const platform = "uplay" - -// login and get token -const token = await api.login(email, password) -console.log(token) - -// fetch user by username -const user = await api.getUserByUsername(userName, platform); -console.log(user); - -// example response -{ - profileId: 'afc2afec-b9ed-4988-bffa-58e78eedfa93', - userId: 'afc2afec-b9ed-4988-bffa-58e78eedfa93', - platformType: 'uplay', - idOnPlatform: 'AFC2AFEC-B9ED-4988-BFFA-58E78EEDFA93', - nameOnPlatform: 'CaleyW1' -} -``` - -# Statistics - -### Table of Contents - -- [Login](#Login) -- [GetUserByUsername](#get-user-by-username) -- [GetUserByUserId](#get-user-by-userid) -- [GetUserProgression](#get-user-progression) -- [GetServerStatus](#get-server-status) -- [GetUserRank](#get-user-rank) -- [GetUserStats](#get-user-stats) -- [GetOperators](#get-operator) - -#### Login - -Signs into the Ubisoft a returns a token. - -| Field | Type | Required | -| -------- | ------ | -------- | -| email | string | yes | -| password | string | yes | - -```JS -await api.Login(email, password) -``` - -
- Example Response - -``` -ewogICJ2ZXIiOiAiMSIsCiAgImFpZCI6ICJlM2Q1ZWE5ZS01MGJkLTQzYjctODhiZi0zOTc5NGY0ZTNkNDAiLAogICJlbnYiOiAiUHJvZCIsCiAgInNpZCI6ICI2YzVlY2E4MS1jYWI3LTQ0NjItOWUzOC04YjZkODA5OWQ1ZjEiLAogICJ0eXAiOiAiSldFIiwKICAiZW5jIjogIkExMjhDQkMiLAogICJpdiI6ICJPellRVVNkSkswNzJURTFJTXVpdFhnIiwKICAiaW50IjogIkhTMjU2IiwKICAia2lkIjogImFkNWNjMzFhLWI2ZmQtNGYyZS04N2JmLTNjZjRkOTc1OTY2NSIKfQ.-F6ZqzG9mOze0HRYJh3Ub23dQUR9BLR-VM7hMgbisN3tQZ1XLgZFyVH2sFmmX4VMPEKVG9e_PGLnPgrtyBfVkyyQBrjlppeWJXICTQPqj1-gg-0KCX4V3DkEd_o1VYbUAeuiA2QBtUeYIaxFluqxTZ5fr6fcGZvfB8npqMgahHLdcwyzcykp8klKbhOF5L17lUXMai5VgGT33o5N3xxx6wBZL97lXZ_jK1Yd67jPTsL2guB24meGrdR2HBtrB3N6ZR2cZnrFyfDuQzdotf0HsRlX8kATI2wOiADZ8RQS6pRtfRlFXqk-HZ0bsCAdQrs4wOzwL5ZiijfS63rAif_6t1K-KYffiQ3ExXPX6jG2OVK8evkR8fP-vS_aNF1iXE8j4ctrti8PezaOgJUmlRRBwrq29hxJJs5fIsP_EGkg_5rztX4hZtvDNRM9vRsIfAt3aPci5CpyhZs2oAbjLYqA1mEOaY8PODCm4pv3qS8zFBXlPAerCW-8ccYfsAmxEMCrZCxG210BDpZQ5c4JHk_XBij6TqE7yWjg_SO0qR_6eFhRKo5lpLbHAao7EWnfuh03dr_Q210QbiyYE5lCQ4RNapfEug0i5flhlJ55asjlQq6UOt21iJFEHBKHjJLj1vSy7WR347iUlYG8bRtcKHXvL2jD6WP18knlIZIWK7XQtR90TpiYV-WY4hqy7UMqD4yFe4Ah-jP58H8ADYA0F_wzIMGenfuDV4mQ_PyjSQuEynYmycmJyjFGeSFye8N-VvGJvcxozY5NMsYmHUqFLxZ1I6HlZivB_6znSzIK5mzqkfR24tPKQv_3T2VHbTfmN_E-4e5enq3F9tayTOSGNad6sSvP_dBao50w-5JBx86i7xJyK2IRGdjizfTbmzUyBQg5zeDbrRHTrAqnaV8NglOF8I2kS3rbxKH9qfUk1MrNdgi7ZJA34tFfu7XRMvUQN2asmrYhvBC0XlyABCCnn3mPy4abQgstYS9wX-itoVSru0_YS8QCIrffpRZkWANjAIsmERWiOGMXlwE5j2wB50M4_JI_gWGplgmn_9nZrtIeGJBYRUj4j4zl495lowDfTPBOdt3QOLx8OAGrHTwDKj6TOCZ6Nh8e7DjMmgm8c8i3n1WmQu6tkT0f3kOUbt1m3941q93R9kd9MR5H28wQHDH8ffTeGPTbhitgWy9WpsnOujwIm3Nnq72L1hkB5UeJobb7uJ6x8bwMaUUjlP8S6Qpa816YKoFQlFpI-dFPaf0W4gOlxSOafLyS6oewtKQlcADTZ5uwbEx4CPRhm9kZwKdekdol6lcEBk-07z8ppev0pNJl45gztd8zuqg_tqfVQtdSh53-xYqh_7FzzsdieCHCx-I0e9jv4QqAZ_VqAGb5ENNPsYHl9bMQYHdY-4npOfK5A4QgXwConKc2KD9dzhOTuohcz5mTgnP5yCkBOxmoHOXcNqh-HV6eAtg-ayrVpG63BlFND_uxAhJ-hnK0STCID-2JI3bvBr4p6V4L6_RT8X1EU_cCw4Ohr-cO9EqZT8f8qjiVzOAqZY6uPe8DfkANkSBIfmXL6A-duTGYoetHQXmvFxiM_MB10LP6FL1eVI2ZNwCXgJ0HgZkQ-_Ul5iBPEeuEIx3tCXpk6aoq1nIC6wdj_JJx9kTwICF3tOvPbUXI1jczVu_36HFi2fZxM6inuZ1uzC3ewfY_opccdDRLSZknlHs29ZPsOfiAX_hrm0NCGdE7MJMdC9aeGsGdll2ujxGZ90CKFuayH9pJsHgpW5d8Ly8v0xCJFc2qiTGAF-XJq9XCIroOBussSi4mLsJCr97jB9KjAY12zYIb-Pfhlnlba7YqX6otIO8oWG5koYzaj5ipqixOXCrDrXAHKdHFFeAYYq3Ojk1t96o_oRkQh1WBspTmmdRz1UOlUsBbVr4q4a0mj0cgFjKIjhv54Kj2xBnpf5GxmDLV9YEE3bqfMGrCy-rIR45CLGx6mBdRmf999dmb3wOM3iPlbgloF2TDTvFdaokQ4lYX51x4E0io8aFtJIrQX8EoPeFWvG8lea20h4e7TeEFx3n07rnPY22HxAFw26spFDxwBPAc6iLxEt_NoerdANtPE_-wUnqrZJ3-Oblvk6M6HOh_vsj-yJi4QC88sxqHhWiBRhW2vCePfY1RDJvD2Hq66Xc2Engp4drZhX1Drv4PnTPk8nISNVelUxGx89B-2KZtIsBUZiUxrY7bZj6Px2FmC2Ro5dOKIjQwZA6D-uEkAhBFsibp3tOIzWAjQChCR89hJy9IS2O7PMWs31rxINAKdx43jb6llgTRsUGDXYLL1eKYecUd7orY8frlAYXU1xLmDBzBpn6wzbMRNNoFfiI1KG9rUKR8EDPUv26GcfsBzkuSHeFXSi_Xhg.oMj2gpJl_2eOj-pFuYvFyWr_t1JR48zgb2st82KTKWk -``` - -
- -#### Get user by username - -Gets a user by username - -| Field | Type | Required | options | -| -------- | ------ | -------- | --------------- | -| username | string | yes | | -| platform | string | yes | uplay, xbl, psn | - -```JS -await api.getUserByUsername(userName, platform); -``` - -
- Example Response - -``` -{ - profileId: 'afc2afec-b9ed-4988-bffa-58e78eedfa93', - userId: 'afc2afec-b9ed-4988-bffa-58e78eedfa93', - platformType: 'uplay', - idOnPlatform: 'AFC2AFEC-B9ED-4988-BFFA-58E78EEDFA93', - nameOnPlatform: 'CaleyW1', - avatars: { - '146': 'https://avatars.ubisoft.com/afc2afec-b9ed-4988-bffa-58e78eedfa93/default_146_146.png?appId=3587dcbb-7f81-457c-9781-0e3f29f6f56a', - '256': 'https://avatars.ubisoft.com/afc2afec-b9ed-4988-bffa-58e78eedfa93/default_256_256.png?appId=3587dcbb-7f81-457c-9781-0e3f29f6f56a', - '500': 'https://avatars.ubisoft.com/afc2afec-b9ed-4988-bffa-58e78eedfa93/default_tall.png?appId=3587dcbb-7f81-457c-9781-0e3f29f6f56a' - } -} -``` - -
- -#### Get user by userId - -Gets a user by userId - -| Field | Type | Required | options | -| -------- | ------ | -------- | --------------- | -| userId | string | yes | | -| platform | string | yes | uplay, xbl, psn | - -```JS -await api.getUserById(user.userId, platform); -``` - -
- Example Response - -``` -[ - { - profileId: 'afc2afec-b9ed-4988-bffa-58e78eedfa93', - userId: 'afc2afec-b9ed-4988-bffa-58e78eedfa93', - platformType: 'uplay', - idOnPlatform: 'afc2afec-b9ed-4988-bffa-58e78eedfa93', - nameOnPlatform: 'CaleyW1', - avatars: { - '146': 'https://avatars.ubisoft.com/afc2afec-b9ed-4988-bffa-58e78eedfa93/default_146_146.png?appId=3587dcbb-7f81-457c-9781-0e3f29f6f56a', - '256': 'https://avatars.ubisoft.com/afc2afec-b9ed-4988-bffa-58e78eedfa93/default_256_256.png?appId=3587dcbb-7f81-457c-9781-0e3f29f6f56a', - '500': 'https://avatars.ubisoft.com/afc2afec-b9ed-4988-bffa-58e78eedfa93/default_tall.png?appId=3587dcbb-7f81-457c-9781-0e3f29f6f56a' - } - }, - { - profileId: 'f02cbe10-2411-43d9-b449-5366888201a2', - userId: 'afc2afec-b9ed-4988-bffa-58e78eedfa93', - platformType: 'steam', - idOnPlatform: '76561198172917981', - nameOnPlatform: '76561198172917983', - avatars: { - '146': 'https://avatars.ubisoft.com/afc2afec-b9ed-4988-bffa-58e78eedfa93/default_146_146.png?appId=3587dcbb-7f81-457c-9781-0e3f29f6f56a', - '256': 'https://avatars.ubisoft.com/afc2afec-b9ed-4988-bffa-58e78eedfa93/default_256_256.png?appId=3587dcbb-7f81-457c-9781-0e3f29f6f56a', - '500': 'https://avatars.ubisoft.com/afc2afec-b9ed-4988-bffa-58e78eedfa93/default_tall.png?appId=3587dcbb-7f81-457c-9781-0e3f29f6f56a' - } - }, - { - profileId: '91193155-2b57-48f1-b69b-556f5e4ccfea', - userId: 'afc2afec-b9ed-4988-bffa-58e78eedfa93', - platformType: 'twitch', - idOnPlatform: '469658264', - nameOnPlatform: 'calbob', - avatars: { - '146': 'https://avatars.ubisoft.com/afc2afec-b9ed-4988-bffa-58e78eedfa93/default_146_146.png?appId=3587dcbb-7f81-457c-9781-0e3f29f6f56a', - '256': 'https://avatars.ubisoft.com/afc2afec-b9ed-4988-bffa-58e78eedfa93/default_256_256.png?appId=3587dcbb-7f81-457c-9781-0e3f29f6f56a', - '500': 'https://avatars.ubisoft.com/afc2afec-b9ed-4988-bffa-58e78eedfa93/default_tall.png?appId=3587dcbb-7f81-457c-9781-0e3f29f6f56a' - } - } -] -``` - -
- -#### Get user progression - -gets the progression for a user - -| Field | Type | Required | options | -| -------- | ------ | -------- | --------------- | -| userId | string | yes | | -| platform | string | yes | uplay, xbl, psn | - -```JS -await api.getUserProgression(user.userId, platform); -``` - -
- Example Response - -``` -{ - level: 326, - xp: 129949 -} -``` - -
- -#### Get server status - -Returns the status of a platform - -platforms: pc, xbox, ps4 - -```JS -await api.getServerStatus(platfrom) -``` - -
- Example Response - -``` -{ - MDM: '4075', - SpaceID: '98a601e5-ca91-4440-b1c5-753f601a2c90', - Category: 'Instance', - Name: 'Rainbow Six Siege - XBOXONE - LIVE', - platform: 'XBOXONE', - status: 'Online', - maintenance: null, - impactedFeatures: [] -} -``` - -
- -#### Get user rank - -Returns statistics for different gamemodes - -| Field | Type | Required | options | -| -------- | ------ | -------- | --------------- | -| userId | id | yes | | -| platform | string | yes | uplay, xbl, psn | - -```JS -await api.getUserRank(player.userId, platfrom); -``` - -
- Example Response - -``` -{ - casual: { - profile_board_id: 'casual', - id: 'casual', - max_rank: 0, - max_rank_points: 0, - platform_family: 'pc', - rank: 0, - rank_points: 0, - rank_name: 'Unranked', - season_id: 34, - top_rank_position: 0, - deaths: 69, - kills: 164, - abandons: 0, - losses: 4, - wins: 29, - rankImage: 'https://github.com/CalumW1/R6StatAPI/blob/main/assests/images/ranks/unranked.png' - }, - event: { - profile_board_id: 'event', - id: 'event', - max_rank: 0, - max_rank_points: 0, - platform_family: 'pc', - rank: 0, - rank_points: 0, - rank_name: 'Unranked', - season_id: 34, - top_rank_position: 0, - deaths: 117, - kills: 241, - abandons: 0, - losses: 2, - wins: 17, - rankImage: 'https://github.com/CalumW1/R6StatAPI/blob/main/assests/images/ranks/unranked.png' - }, - warmup: { - profile_board_id: 'warmup', - id: 'warmup', - max_rank: 0, - max_rank_points: 0, - platform_family: 'pc', - rank: 0, - rank_points: 0, - rank_name: 'Unranked', - season_id: 34, - top_rank_position: 0, - deaths: 359, - kills: 1309, - abandons: 3, - losses: 4, - wins: 73, - rankImage: 'https://github.com/CalumW1/R6StatAPI/blob/main/assests/images/ranks/unranked.png' - }, - standard: { - profile_board_id: 'standard', - id: 'standard', - max_rank: 0, - max_rank_points: 0, - platform_family: 'pc', - rank: 0, - rank_points: 0, - rank_name: 'Unranked', - season_id: 34, - top_rank_position: 0, - deaths: 604, - kills: 1588, - abandons: 0, - losses: 20, - wins: 239, - rankImage: 'https://github.com/CalumW1/R6StatAPI/blob/main/assests/images/ranks/unranked.png' - }, - ranked: { - profile_board_id: 'ranked', - id: 'ranked', - max_rank: 36, - max_rank_points: 5934, - platform_family: 'pc', - rank: 36, - rank_points: 5912, - rank_name: 'Champions', - season_id: 34, - top_rank_position: 2, - deaths: 1219, - kills: 2821, - abandons: 0, - losses: 38, - wins: 544, - rankImage: 'https://github.com/CalumW1/R6StatAPI/blob/main/assests/images/ranks/champion.png' - } -} -``` - -
- - - -#### Get Operator - -Gets seasonal operator statistics - -| Field | Type | Required | options | Notes | -| ----------- | ------ | -------- | -------------------------------- | ------------------------------------------------------ | -| userId | Id | Yes | | -| platform | string | Yes | uplay, xbl, psn | -| view | string | Yes | seasonal | -| aggregation | string | Yes | operator | -| gameMode | string | Yes | all, casual, ranked, unranked | -| team role | string | Yes | Attacker, Defender | "Defender" and "Attacker" need to start with capitals. | -| season | string | Yes | format Y(No.)S(No.) Example Y6S3 | - -```JS -await api.getUserOperators( - userId, - platform, - view, - aggregation, - gameMode, - teamRole, - season -); - -// sample -await api.getUserOperators( - user.userId, - "uplay", - "current", - "operators", - "all,ranked,casual,unranked", - "Defender,Attacker", - "Y9S2" -); - -``` - -
- Example Response - -``` -{ - ranked: { - attackers: [ - { - type: 'Generalized', - statsType: 'operators', - statsDetail: 'Montagne', - matchesPlayed: 84, - roundsPlayed: 114, - minutesPlayed: 343, - matchesWon: 81, - matchesLost: 3, - roundsWon: 92, - roundsLost: 22, - kills: 81, - assists: 16, - deaths: 44, - headshots: 4, - meleeKills: 51, - teamKills: 0, - openingKills: 5, - trades: 5, - openingKillTrades: 2, - openingDeathTrades: 0, - revives: 1, - distanceTravelled: 14418, - winLossRatio: 27, - killDeathRatio: 1.8409, - headshotAccuracy: 0.0494, - killsPerRound: 0.7105, - roundsWithAKill: 0.7105, - roundsWithMultiKill: 0.1667, - roundsWithOpeningKill: 0.0439, - roundsWithOpeningDeath: 0.0614, - roundsWithKOST: 0.7544, - roundsSurvived: 0.614, - roundsWithAnAce: 0, - roundsWithClutch: 0.0175, - timeAlivePerMatch: 109.6905, - timeDeadPerMatch: 20.1667, - distancePerRound: 126.4737 - } - ], - defenders: [] - }, - unranked: { attackers: [], defenders: [] }, - all: { attackers: [], defenders: [] }, - casual: { attackers: [], defenders: [] } -} -``` - -
- -# Marketplace APIs - -### Table of Contents - -- [Basic Search](#basic-search) -- [Advanced Search](#advanced-search) -- [Recommended Items](#recommended-items) -- [Get Item Details](#get-item-details) -- [Get Transaction History](#get-transaction-history) -- [Get Pending Transactions](#get-pending-transactions) - -## Basic Search - -Basic marketplace search query. - -| Field | Type | Required | -| ----------- | ------ | -------- | -| searchQuery | string | Yes | -| limit | number | yes | - -```JS -await api.SearchMarketplace(searchQuery, limit); - -// Sample -await api.SearchMarketplace("R4-c", 20); -``` - -
-Example Response - -``` -{ - "items": [ - { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-aee4bdf2-0b54-4c6d-af93-9fe4848e1f76", - "assetUrl": "https://ubiservices.cdn.ubi.com/0d2ae42d-4c27-4cb7-af6c-2099062302bb/DeployerAssetsJune2023/bb74359e_3a55_3d28_b3ad_8291964f65f3.png", - "itemId": "aee4bdf2-0b54-4c6d-af93-9fe4848e1f76", - "name": "BLACK ICE", - "tags": [ - "R4-C", - "Texture", - "W_AR_RemingtonR4C", - "Y1S1", - "sku_china", - "sku_ww", - "type_weapon_skins", - "type_weaponskin", - "rarity_superrare", - "lc_classic-edition-v0" - ], - "type": "WeaponSkin", - "marktetData": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-aee4bdf2-0b54-4c6d-af93-9fe4848e1f76", - "sellStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-aee4bdf2-0b54-4c6d-af93-9fe4848e1f76-9ef71262-515b-46e8-b9a8-b6b6ad456c67-sell", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 3150, - "highestPrice": 1000000, - "activeCount": 2731 - }, - "buyStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-aee4bdf2-0b54-4c6d-af93-9fe4848e1f76-9ef71262-515b-46e8-b9a8-b6b6ad456c67-buy", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 10, - "highestPrice": 3100, - "activeCount": 11646 - }, - "lastSoldAt": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-aee4bdf2-0b54-4c6d-af93-9fe4848e1f76-9ef71262-515b-46e8-b9a8-b6b6ad456c67-last", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "price": 3000, - "performedAt": "2024-10-06T10:27:59.634Z" - } - } - }, - { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-615257b7-9aea-479f-8521-a0054af3a442", - "assetUrl": "https://ubiservices.cdn.ubi.com/0d2ae42d-4c27-4cb7-af6c-2099062302bb/DeployerAssetsJune2023/b4ba3547_77a7_adcc_7cf7_564039670b34.png", - "itemId": "615257b7-9aea-479f-8521-a0054af3a442", - "name": "PIÑA COLADA", - "tags": [ - "R4-C", - "Texture", - "W_AR_RemingtonR4C", - "Y2S1", - "sku_china", - "sku_ww", - "type_weapon_skins", - "type_weaponskin", - "rarity_superrare" - ], - "type": "WeaponSkin", - "marktetData": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-615257b7-9aea-479f-8521-a0054af3a442", - "sellStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-615257b7-9aea-479f-8521-a0054af3a442-9ef71262-515b-46e8-b9a8-b6b6ad456c67-sell", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 770, - "highestPrice": 1000000, - "activeCount": 1254 - }, - "buyStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-615257b7-9aea-479f-8521-a0054af3a442-9ef71262-515b-46e8-b9a8-b6b6ad456c67-buy", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 10, - "highestPrice": 666, - "activeCount": 1198 - }, - "lastSoldAt": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-615257b7-9aea-479f-8521-a0054af3a442-9ef71262-515b-46e8-b9a8-b6b6ad456c67-last", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "price": 750, - "performedAt": "2024-10-06T10:25:36.078Z" - } - } - }, - { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-8d3ffabe-eb44-0e65-2caf-9be17b443207", - "assetUrl": "https://ubiservices.cdn.ubi.com/0d2ae42d-4c27-4cb7-af6c-2099062302bb/DeployerAssetsJune2023/22290723_43b4_53ab_f4af_d7bf1daad548.png", - "itemId": "8d3ffabe-eb44-0e65-2caf-9be17b443207", - "name": "ACID RAIN", - "tags": [ - "Pattern", - "R4-C", - "Y7S1", - "sku_china", - "sku_ww", - "type_weapon_skins", - "type_weaponskin", - "rarity_rare", - "lc_classic-edition-v17", - "lc_classic-edition-v18", - "lc_classic-edition-v19", - "lc_classic-edition-v20", - "lc_platinum-edition-v0", - "lc_classic-edition-v22", - "lc_classic-edition-v21" - ], - "type": "WeaponSkin", - "marktetData": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-8d3ffabe-eb44-0e65-2caf-9be17b443207", - "sellStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-8d3ffabe-eb44-0e65-2caf-9be17b443207-9ef71262-515b-46e8-b9a8-b6b6ad456c67-sell", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 10, - "highestPrice": 250000, - "activeCount": 775 - }, - "buyStats": { - "id": "", - "paymentItemId": "", - "lowestPrice": 0, - "highestPrice": 0, - "activeCount": 0 - }, - "lastSoldAt": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-8d3ffabe-eb44-0e65-2caf-9be17b443207-9ef71262-515b-46e8-b9a8-b6b6ad456c67-last", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "price": 10, - "performedAt": "2024-10-06T09:06:16.624Z" - } - } - } - ] -} - -``` +## Documentation -
+The documentation for the package can be found [here](https://r6stats.esportsapp.gg/). If anything is unclear, please feel free to create an issue on [Github](https://github.com/CalumW1/R6StatAPI) or join our [Discord](https://discord.gg/Hc4rTJme4T) -## Advanced Search +## Contributing -Advanced marketplace search with filters and sorting. - -| Field | Type | Required | options | Notes | -| --------------- | ------ | -------- | ----------------------- | ----------------------------------------------------------------------------------------------------------- | -| searchTerm | string | Yes | | | -| marketPlaceType | string | Yes | 'buy', 'sell' | | -| types | Object | Yes | [See types](#types) | to pass in no options use `{}` | -| tags | Object | Yes | [See tags](#tags) | to pass in no options use `{}` | -| sortBy | string | Yes | [See sort by](#sort-by) | Default for 'buy' is `Sale available: high to low`. Default for 'sell' is `Purchase available: high to low` | -| limit | number | yes | | | - -```JS -await api.advancedMarketplaceSearch( - searchTerm, - marketplaceType, - types, - tags, - sortBy, - limit -); - - -// Sample - -const tags = { - rarity: ["SuperRare"], - seasons: [], - operators: [], - weapon: [], - events: [], - esportsTeams: [], -}; - -const types = { - type: ["WeaponSkin"], -}; - -await api.advancedMarketplaceSearch( - "Black Ice", - "sell", - types, - tags, - "Item names: A-Z", - 20 -); - -``` - -
-Example Response - -``` -{ - "items": [ - { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-f4d787a6-a17d-40a5-9a05-22c924066e81", - "assetUrl": "https://ubiservices.cdn.ubi.com/0d2ae42d-4c27-4cb7-af6c-2099062302bb/DeployerAssetsJune2023/ad2e679b_f8d4_38fc_6f01_1402dbea4ac8.png", - "itemId": "f4d787a6-a17d-40a5-9a05-22c924066e81", - "name": "BLACK ICE", - "tags": [ - "M590A1", - "Texture", - "W_SG_591A1", - "Y1S1", - "sku_china", - "sku_ww", - "type_weapon_skins", - "type_weaponskin", - "rarity_superrare", - "lc_classic-edition-v0", - "lc_yttrium-edition-v0" - ], - "type": "WeaponSkin", - "marktetData": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-f4d787a6-a17d-40a5-9a05-22c924066e81", - "sellStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-f4d787a6-a17d-40a5-9a05-22c924066e81-9ef71262-515b-46e8-b9a8-b6b6ad456c67-sell", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 400, - "highestPrice": 1000000, - "activeCount": 2065 - }, - "buyStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-f4d787a6-a17d-40a5-9a05-22c924066e81-9ef71262-515b-46e8-b9a8-b6b6ad456c67-buy", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 10, - "highestPrice": 330, - "activeCount": 1928 - }, - "lastSoldAt": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-f4d787a6-a17d-40a5-9a05-22c924066e81-9ef71262-515b-46e8-b9a8-b6b6ad456c67-last", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "price": 400, - "performedAt": "2024-10-06T11:06:17.944Z" - } - } - }, - { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-f3fde1b4-329c-4dc7-9e22-987cc6c77b04", - "assetUrl": "https://ubiservices.cdn.ubi.com/0d2ae42d-4c27-4cb7-af6c-2099062302bb/DeployerAssetsJune2023/08f7a0ba_be13_9f01_4ff9_8026b07e5ecd.png", - "itemId": "f3fde1b4-329c-4dc7-9e22-987cc6c77b04", - "name": "BLACK ICE", - "tags": [ - "P226_MK_25", - "Texture", - "W_SA_P226", - "Y1S1", - "sku_china", - "sku_ww", - "type_weapon_skins", - "type_weaponskin", - "rarity_superrare", - "lc_classic-edition-v0" - ], - "type": "WeaponSkin", - "marktetData": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-f3fde1b4-329c-4dc7-9e22-987cc6c77b04", - "sellStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-f3fde1b4-329c-4dc7-9e22-987cc6c77b04-9ef71262-515b-46e8-b9a8-b6b6ad456c67-sell", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 160, - "highestPrice": 803723, - "activeCount": 153 - }, - "buyStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-f3fde1b4-329c-4dc7-9e22-987cc6c77b04-9ef71262-515b-46e8-b9a8-b6b6ad456c67-buy", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 10, - "highestPrice": 110, - "activeCount": 131 - }, - "lastSoldAt": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-f3fde1b4-329c-4dc7-9e22-987cc6c77b04-9ef71262-515b-46e8-b9a8-b6b6ad456c67-last", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "price": 160, - "performedAt": "2024-10-06T11:05:49.128Z" - } - } - }, - { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-b1cdb343-8ca2-4f7e-b489-af66bfe914cd", - "assetUrl": "https://ubiservices.cdn.ubi.com/0d2ae42d-4c27-4cb7-af6c-2099062302bb/DeployerAssetsJune2023/dd1d42bd_53ce_0c52_e256_4808fb7667ac.png", - "itemId": "b1cdb343-8ca2-4f7e-b489-af66bfe914cd", - "name": "BLACK ICE", - "tags": [ - "SMG-11", - "Texture", - "W_MP_MAC11", - "Y1S1", - "sku_china", - "sku_ww", - "type_weapon_skins", - "type_weaponskin", - "rarity_superrare", - "lc_classic-edition-v0", - "lc_platinum-edition-v0" - ], - "type": "WeaponSkin", - "marktetData": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-b1cdb343-8ca2-4f7e-b489-af66bfe914cd", - "sellStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-b1cdb343-8ca2-4f7e-b489-af66bfe914cd-9ef71262-515b-46e8-b9a8-b6b6ad456c67-sell", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 1000, - "highestPrice": 1000000, - "activeCount": 1903 - }, - "buyStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-b1cdb343-8ca2-4f7e-b489-af66bfe914cd-9ef71262-515b-46e8-b9a8-b6b6ad456c67-buy", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 10, - "highestPrice": 890, - "activeCount": 4186 - }, - "lastSoldAt": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-b1cdb343-8ca2-4f7e-b489-af66bfe914cd-9ef71262-515b-46e8-b9a8-b6b6ad456c67-last", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "price": 1000, - "performedAt": "2024-10-06T11:05:41.995Z" - } - } - } - ] -} -``` - -
- -## Recommended Items - -Returns recommended items for a profile - -| Field | Type | Required | options | -| --------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------- | -| profileId | id | yes | profileId is available from either [getUserByUsername](#get-user-by-username) or [getUserByUserId](#get-user-by-userid) | -| limit | number | yes | | - -```JS - await api.getRecommendedItems(profileId, limit); - - // sample - await api.getRecommendedItems(user.profileId, 20); -``` - -
-Example Response - -``` -{ - "items": [ - { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-e3c5f6cf-b6c9-4df0-b14a-a0f8fd72fad0", - "assetUrl": "https://ubiservices.cdn.ubi.com/0d2ae42d-4c27-4cb7-af6c-2099062302bb/DeployerAssetsJune2023/f843c6b1_ba62_dc85_9392_a708bd22815d.png", - "itemId": "e3c5f6cf-b6c9-4df0-b14a-a0f8fd72fad0", - "name": "BLACK ICE", - "tags": [ - "F2", - "Texture", - "W_AR_FAMASG2", - "Y1S1", - "sku_china", - "sku_ww", - "type_weapon_skins", - "type_weaponskin", - "rarity_superrare", - "lc_classic-edition-v0", - "lc_yttrium-edition-v0" - ], - "type": "WeaponSkin", - "marktetData": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-e3c5f6cf-b6c9-4df0-b14a-a0f8fd72fad0", - "sellStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-e3c5f6cf-b6c9-4df0-b14a-a0f8fd72fad0-9ef71262-515b-46e8-b9a8-b6b6ad456c67-sell", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 210, - "highestPrice": 1000000, - "activeCount": 2703 - }, - "buyStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-e3c5f6cf-b6c9-4df0-b14a-a0f8fd72fad0-9ef71262-515b-46e8-b9a8-b6b6ad456c67-buy", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 10, - "highestPrice": 180, - "activeCount": 1174 - }, - "lastSoldAt": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-e3c5f6cf-b6c9-4df0-b14a-a0f8fd72fad0-9ef71262-515b-46e8-b9a8-b6b6ad456c67-last", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "price": 180, - "performedAt": "2024-10-06T11:33:09.881Z" - } - } - }, - { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-452d6796-8176-4af1-858b-7d87dabad8a5", - "assetUrl": "https://ubiservices.cdn.ubi.com/0d2ae42d-4c27-4cb7-af6c-2099062302bb/DeployerAssetsJune2023/02143738_7e78_0d62_f5e3_41458fa33730.png", - "itemId": "452d6796-8176-4af1-858b-7d87dabad8a5", - "name": "BLACK ICE", - "tags": [ - "C8-SFW", - "Texture", - "W_AR_C8SFW", - "Y1S1", - "sku_china", - "sku_ww", - "type_weapon_skins", - "type_weaponskin", - "rarity_superrare", - "lc_classic-edition-v0", - "lc_classic-edition-v17", - "lc_classic-edition-v18", - "lc_classic-edition-v19", - "lc_classic-edition-v20", - "lc_platinum-edition-v0", - "lc_classic-edition-v22", - "lc_classic-edition-v21" - ], - "type": "WeaponSkin", - "marktetData": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-452d6796-8176-4af1-858b-7d87dabad8a5", - "sellStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-452d6796-8176-4af1-858b-7d87dabad8a5-9ef71262-515b-46e8-b9a8-b6b6ad456c67-sell", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 500, - "highestPrice": 1000000, - "activeCount": 3565 - }, - "buyStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-452d6796-8176-4af1-858b-7d87dabad8a5-9ef71262-515b-46e8-b9a8-b6b6ad456c67-buy", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 10, - "highestPrice": 461, - "activeCount": 3560 - }, - "lastSoldAt": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-452d6796-8176-4af1-858b-7d87dabad8a5-9ef71262-515b-46e8-b9a8-b6b6ad456c67-last", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "price": 510, - "performedAt": "2024-10-06T11:32:37.031Z" - } - } - }, - { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-8b9b75a2-4ed6-49aa-a403-a1f4122c75c6", - "assetUrl": "https://ubiservices.cdn.ubi.com/0d2ae42d-4c27-4cb7-af6c-2099062302bb/DeployerAssetsJune2023/42fcb009_21d9_4458_02c6_b8e54e9fd453.png", - "itemId": "8b9b75a2-4ed6-49aa-a403-a1f4122c75c6", - "name": "BLACK ICE", - "tags": [ - "416-C_CARBINE", - "Texture", - "W_AR_HK416", - "Y1S1", - "sku_china", - "sku_ww", - "type_weapon_skins", - "type_weaponskin", - "rarity_superrare", - "lc_classic-edition-v0", - "lc_classic-edition-v17", - "lc_classic-edition-v18", - "lc_classic-edition-v19", - "lc_classic-edition-v20", - "lc_platinum-edition-v0", - "lc_classic-edition-v22", - "lc_classic-edition-v21" - ], - "type": "WeaponSkin", - "marktetData": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-8b9b75a2-4ed6-49aa-a403-a1f4122c75c6", - "sellStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-8b9b75a2-4ed6-49aa-a403-a1f4122c75c6-9ef71262-515b-46e8-b9a8-b6b6ad456c67-sell", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 299, - "highestPrice": 1000000, - "activeCount": 4606 - }, - "buyStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-8b9b75a2-4ed6-49aa-a403-a1f4122c75c6-9ef71262-515b-46e8-b9a8-b6b6ad456c67-buy", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 10, - "highestPrice": 267, - "activeCount": 2642 - }, - "lastSoldAt": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-8b9b75a2-4ed6-49aa-a403-a1f4122c75c6-9ef71262-515b-46e8-b9a8-b6b6ad456c67-last", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "price": 289, - "performedAt": "2024-10-06T11:32:29.498Z" - } - } - } - ] -} -``` - -
- -## Get Item Details - -Returns the details for an item by id. - -| Field | Type | Required | -| ------ | ---- | -------- | -| itemId | id | yes | - -```JS -await api.getItemDetails("aee4bdf2-0b54-4c6d-af93-9fe4848e1f76"); - -// sample -await api.getItemDetails("aee4bdf2-0b54-4c6d-af93-9fe4848e1f76"); -``` - -
-Example Response - -``` -{ - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-aee4bdf2-0b54-4c6d-af93-9fe4848e1f76", - "assetUrl": "https://ubiservices.cdn.ubi.com/0d2ae42d-4c27-4cb7-af6c-2099062302bb/DeployerAssetsJune2023/bb74359e_3a55_3d28_b3ad_8291964f65f3.png", - "itemId": "aee4bdf2-0b54-4c6d-af93-9fe4848e1f76", - "name": "BLACK ICE", - "tags": [ - "R4-C", - "Texture", - "W_AR_RemingtonR4C", - "Y1S1", - "sku_china", - "sku_ww", - "type_weapon_skins", - "type_weaponskin", - "rarity_superrare", - "lc_classic-edition-v0" - ], - "type": "WeaponSkin", - "marktetData": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-aee4bdf2-0b54-4c6d-af93-9fe4848e1f76", - "sellStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-aee4bdf2-0b54-4c6d-af93-9fe4848e1f76-9ef71262-515b-46e8-b9a8-b6b6ad456c67-sell", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 3000, - "highestPrice": 1000000, - "activeCount": 2739 - }, - "buyStats": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-aee4bdf2-0b54-4c6d-af93-9fe4848e1f76-9ef71262-515b-46e8-b9a8-b6b6ad456c67-buy", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "lowestPrice": 10, - "highestPrice": 2800, - "activeCount": 11640 - }, - "lastSoldAt": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-aee4bdf2-0b54-4c6d-af93-9fe4848e1f76-9ef71262-515b-46e8-b9a8-b6b6ad456c67-last", - "paymentItemId": "9ef71262-515b-46e8-b9a8-b6b6ad456c67", - "price": 3000, - "performedAt": "2024-10-06T11:40:28.908Z" - } - } -} -``` - -
- -## Get Transaction History - -Returns a list of of all completed transactions. - -| Field | Type | Required | -| --------- | ------ | -------- | -| profileId | id | yes | -| limit | number | yes | - -```JS -await api.GetTransactionHistory(profileId, limit); - -await api.GetTransactionHistory("91193155-2b57-48f1-b69b-556f5e4ccfea", 20); -``` - -
-Example Response - -``` -{ - "transactions": [ - { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-afc2afec-b9ed-4988-bffa-58e78eedfa9d-41fa7384-309a-4992-be82-36decd65e3ba", - "tradeId": "41fa7384-309a-4992-be82-36decd65e3ba", - "state": "Succeeded", - "category": "Sell", - "createdAt": "2024-10-07T21:07:01.238Z", - "expiresAt": null, - "lastModifiedAt": "2024-10-07T21:07:01.653Z", - "tradeItems": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-02e8b1e8-813a-44d9-8cc3-8d5d484e0b9f", - "itemId": "02e8b1e8-813a-44d9-8cc3-8d5d484e0b9f", - "assetUrl": "https://ubiservices.cdn.ubi.com/0d2ae42d-4c27-4cb7-af6c-2099062302bb/MtxAssetsDeployer/72b07709_8297_34ea_7f19_85dbb975b108.png", - "name": "DOUBLE SUN", - "tags": [ - "Character.Legacy.THATCHER", - "Y5S2", - "sku_china", - "sku_ww", - "type_characterheadgear", - "type_headgears", - "rarity_superrare" - ], - "type": "CharacterHeadgear" - }, - "paymentOptions": { - "quantity": 499, - "price": 90, - "transactionFee": 9 - }, - "payment": { - "price": 90, - "transactionFee": 9 - } - } - ] -} -``` - -
- -## Get Pending Transactions - -Returns a list of pending transactions for a profileId. - -| Field | Type | Required | -| --------- | ------ | -------- | -| profileId | id | yes | -| limit | number | yes | - -```JS -await api.GetPendingtransactions(profileId, limit); - -// sample -await api.GetPendingtransactions("91193155-2b57-48f1-b69b-556f5e4ccfea", 20); -``` - -
-Example Response - -``` -{ - "transactions": [ - { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-afc2afec-b9ed-4988-bffa-58e78eedfa9d-f1b694a9-7984-4f7c-bbb4-f5848931775b", - "tradeId": "f1b694a9-7984-4f7c-bbb4-f5848931775b", - "state": "Created", - "category": "Sell", - "createdAt": "2024-10-07T00:53:16.705Z", - "expiresAt": "2024-11-06T00:53:16.705Z", - "lastModifiedAt": "2024-10-07T00:53:16.831Z", - "tradeItems": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-268cc330-1a65-4a0a-a277-7a9bb7c79cac", - "itemId": "268cc330-1a65-4a0a-a277-7a9bb7c79cac", - "assetUrl": "https://ubiservices.cdn.ubi.com/0d2ae42d-4c27-4cb7-af6c-2099062302bb/DeployerAssetsJune2023/65587a79_e7d6_d62a_279c_ac3f46c4333f.png", - "name": "WIND BASTION", - "tags": [ - "Character.Legacy.MUTE", - "Y3S4", - "sku_china", - "sku_ww", - "type_characterheadgear", - "type_headgears", - "rarity_uncommon" - ], - "type": "CharacterHeadgear" - }, - "paymentOptions": { - "quantity": 418, - "price": 10000, - "transactionFee": 1000 - } - }, - { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-afc2afec-b9ed-4988-bffa-58e78eedfa9d-367b57de-a74a-49b1-af19-79dc3074c0cc", - "tradeId": "367b57de-a74a-49b1-af19-79dc3074c0cc", - "state": "Created", - "category": "Sell", - "createdAt": "2024-10-06T22:20:06.459Z", - "expiresAt": "2024-11-05T22:20:06.459Z", - "lastModifiedAt": "2024-10-06T22:20:06.568Z", - "tradeItems": { - "id": "0d2ae42d-4c27-4cb7-af6c-2099062302bb-ee4ff71e-b8d1-4c68-a5a5-ec0608f8eab9", - "itemId": "ee4ff71e-b8d1-4c68-a5a5-ec0608f8eab9", - "assetUrl": "https://ubiservices.cdn.ubi.com/0d2ae42d-4c27-4cb7-af6c-2099062302bb/DeployerAssetsJune2023/1302cd61_b369_5164_31ba_55cd18a16775.png", - "name": "ACID SCOURGE", - "tags": [ - "T-5_SMG", - "Texture", - "W_SMG_JS9", - "Y4S3", - "doktorcurse", - "sku_china", - "sku_ww", - "type_weapon_skins", - "type_weaponskin", - "rarity_rare", - "lc_barium-edition-v0", - "lc_barium-edition-v1", - "lc_barium-edition-v2", - "lc_barium-edition-v3" - ], - "type": "WeaponSkin" - }, - "paymentOptions": { - "quantity": 418, - "price": 200000, - "transactionFee": 20000 - } - } - ] -} -``` - -
- -# Marketplace options - -## Tags - -### Rarity - -
-Options - -``` -Legendary -SuperRare -Rare -Uncommon -``` - -
- -### Seasons - -Year 1 season 1 to current season. Format Y(Number)S(Number), Example Y7S3 - -### Operators - -
-Options - -``` -'Ace' -'Alibi' -'Amaru' -'Aruni' -'Ash' -'Azami' -'Bandit' -'Blackbeard' -'Blitz' -'Brava' -'Buck' -'Capitao' -'Castle' -'Caveria' -'Clash' -'Deimos' -'Doc' -'Dokkaebi' -'Echo' -'Ela' -'Fenrir' -'Finka' -'Flores' -'Frost' -'Fuze' -'Glaz' -'Goyo' -'Gridlock' -'Grim' -'Hibana' -'Iana' -'IQ' -'Jackal' -'Jager' -'Kaid' -'Kali' -'Kapkan' -'Lesion' -'Lion' -'Maestro' -'Maverick' -'Melusi' -'Mira' -'Montagne' -'Mozzie -'Mute' -'Nokk' -'Nomad' -'Oryx' -'Osa' -'Pulse' -'Ram' -'Rook' -'Sens', -'Sentry' -'Skopos' -'Sledge' -'Smoke' -'Solis' -'Striker' -'Tachanka' -'Thatcher' -'Thermite' -'Thorn' -'Thunderbird' -'Tubarao' -'Twitch' -'Valkrie' -'Vigil' -'Wamai' -'Warden' -'Ying' -'Zero' -'Zofia' -``` - -
- -### Weapons - -
-Options - -``` -'.44 Mag Semi-Auto' -'5.7 USG' -'6P41' -'9mm C1' -'9x19VSN' -'416-C CARBINE' -'FourOneSeven' -'552 COMMANDO' -'556XL' -'1911 TACOPS' -'ACS12' -'AK-12' -'AK-74M' -'ALDA 5.56' -'AR-15.50' -'AR33' -'ARX200' -'AUG A2' -'AUG A3' -'Bailiff 410' -'BEARING 9' -'BOSG.12.2' -'C7E' -'C8-SFW' -'C75 Auto' -'CAMRS -'COMMANDO 9' -'CSRX 300' -'D-50' -'DP27' -'F2' -'F90' -'FMG-9' -'FO-12' -'G8A1' -'G36C' -'GONNE-6' -'GSH-18' -'ITA12L' -'ITA12S' -'K1A' -'KERATOS .357' -'L85A2' -'LFP586' -'LMG-E' -'M4' -'M12' -'M45 MEUSOC' -'M249' -'M249 SAW' -'M590A1' -'M762' -'M870' -'M1014' -'Mk 14 EBR' -'MK1 9mm' -'MK17 CQB' -'MP5' -'MP5K' -'MP5SD' -'MP7' -'MPX' -'Mx4 Strom' -'OTs-03' -'P-10C' -'P9' -'P10 RONI' -'P12' -'P90' -'P226 MK 25' -'P229' -'PARA-308' -'PDW9' -'PMM' -'POF-9' -'PRB92' -'Q-929' -'R4-C' -'RG15' -'SASG-12' -'SC3000K' -'SCORPION EVO 3 A1' -'SDP 9mm' -'SG-CQB' -'SIX12' -'SIX12 SD' -'SMG-11' -'SMG-12' -'SPAS-12' -'SPAS-15' -'SPEAR .308' -'SPSMG9' -'SR-25' -'SUPER 90' -'SUPER SHORTY' -'SUPERNOVA' -'T-5 SMG' -'T-95 LSW' -'TCSG12' -'TYPE-89' -'UMP45' -'USP40' -'UZK50GI' -'V308' -'VECTOR .45 ACP' -``` - -
- -### Events - -
-Options - -``` -'Apocalypse' -'Containment' -'DoktorsCurse' -'FreezeForAll' -'MuteFleshAndMetal' -'Rengoku' -'Showdown' -'SnowBrawl' -'SugarFright' -'TheGrandLarceny' -'TheTeddyConflict' -``` - -
- -### Esports Teams - -
-Options - -``` -'00Nation' -'Astralis' -'Chaos EC' -'Cloud9' -'Fav Gaming' -'Giants Gaming' -'Guts Gaming' -'Heroic' -'Intz' -'Invictus Gaming' -'Mirage' -'MNM Gaming' -'Natus Vincere' -'Nora Rengo' -'Order' -'Parabellum Esports' -'QConfirm' -'Santos' -'Team Empire' -'Team Vitality' -'The Chiefs' -'Xavier Esports' -'XSet' -``` - -
- -### Other types - -
-Options - -``` -'Battlepass' -'Seasonal' -'Universal' -``` - -
- -## Types - -
-Options - -``` -'WeaponSkin' -'CharacterHeadgear' -'CharacterUniform' -'WeaponAttachmentSkinSet' -'Charm' -'OperatorCardPortrait' -'OperatorCardBackground' -'DroneSkin' -'GadgetSkin' -``` - -
- -## Sort by - -
-Options - -``` -'Purchase available: high to low' -'Purchase available: low to high' -'Sale available: high to low' -'Sale available: low to high' -'Last sale price: high to low' -'Last sale price: low to high' -'Item names: A-Z' -'Item names: Z-A' -``` +Contributions are always welcome! Please feel free to create a pull request or an issue on [Github](https://github.com/CalumW1/R6StatAPI) -
## Support diff --git a/package.json b/package.json index 3907d7f..e4c375e 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,8 @@ "bugs": { "url": "https://github.com/CalumW1/R6StatAPI/issues" }, - "homepage": "https://github.com/CalumW1/R6StatAPI#readme", + "documentation": "https://r6stats.esportsapp.gg/", + "homepage": "https://r6stats.esportsapp.gg/", "devDependencies": { "@types/node-fetch": "^2.6.11", "typescript": "^5.5.3"