An open API service indexing awesome lists of open source software.

https://github.com/karthik99999/brawlstarsrb

Ruby wrapper for BrawlAPI
https://github.com/karthik99999/brawlstarsrb

api-wrapper brawlstars ruby ruby-gem supercell

Last synced: about 1 year ago
JSON representation

Ruby wrapper for BrawlAPI

Awesome Lists containing this project

README

          

# brawlstarsrb
[![Gem Version](https://img.shields.io/gem/v/brawlstars.svg?color=red&label=brawlstars&logo=rubygems&style=flat-square)](https://rubygems.org/gems/brawlstars)
[![License](https://img.shields.io/github/license/Karthik99999/brawlstarsrb.svg?style=flat-square)](../master/LICENSE)
[![Discord Server Invite](https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&longCache=true&style=flat-square)](https://discord.gg/vbbHXNf)

brawlstarsrb is a Ruby implementation of [BrawlAPI](https://api-docs.starlist.pro/), the unofficial Brawl Stars API.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'brawlstars'
```

And then execute:

$ bundle

Or install it yourself as:

$ gem install brawlstars

## Usage

Example usage:
```ruby
require 'brawlstars'

client = Brawlstars::Client.new(token: "token") # check below to get token
player = client.getPlayer("LQL")
puts player["name"]
```
More documentation can be found at [rubydoc](https://www.rubydoc.info/github/Karthik99999/brawlstarsrb)

## Getting API Token

1. Join the [Discord server](https://discord.gg/vbbHXNf)
2. Go to the [dashboard](https://api.starlist.pro/dashboard) and generate a token

## Development

After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).