Project

pubg-api

0.0
No commit activity in last 3 years
No release in over 3 years
A Ruby wrapper for https://pubgtracker.com/site-api
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
>= 0
~> 10.0
~> 3.0
~> 3.3
 Project Readme

PubgApi

Build Status

This is a simple ruby wrapper for https://pubgtracker.com/site-api

Installation

Add to Gemfile

gem 'pubg-api'

Configuration

The following configuration need to be setup to your code.

Pubg.configure do |c|
  c.trn_api_key = 'trn_api_key'
end

If you are using rails, you can create a file in config/initializers.

Usage Examples

Retrieve a player status by nickname.

Pubg::Player.find('playername')

Open here an example of response for this request.

This will get all the stats for the current season. You may get more data by using filters. season, mode, region

Pubg::Player.find('playername', {
                                  mode: 'solo',
                                  season: '2018-01',
                                  region: 'sa'
                                })

Matches status for a given player account

Pubg::Matches.find('account.9e915505fad245f696944e4b108986fa')

Open here an example of response for this request.

Running the tests

Spec files are located under /spec directory. You can run them using rspec command.

License

This project is licensed under the MIT License - see the LICENSE.md file for details