All Projects → leocabeza → clash-api

leocabeza / clash-api

Licence: MIT, MIT licenses found Licenses found MIT LICENSE MIT LICENSE.txt
Ruby wrapper for the Clash of Clans API

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to clash-api

oxford dictionary
📙 A Ruby wrapper for the Oxford Dictionary API
Stars: ✭ 23 (+64.29%)
Mutual labels:  api-wrapper, ruby-wrapper
nextcloud
Nextcloud OCS and WebDAV API wrapper for Ruby.
Stars: ✭ 16 (+14.29%)
Mutual labels:  api-wrapper, ruby-wrapper
gtmetrix-net
GTmetrix .Net client
Stars: ✭ 16 (+14.29%)
Mutual labels:  api-wrapper
libopenTIDAL
TIDAL API interface written in ANSI C
Stars: ✭ 17 (+21.43%)
Mutual labels:  api-wrapper
DPP
C++ Discord API Bot Library - D++ is Lightweight and scalable for small and huge bots!
Stars: ✭ 560 (+3900%)
Mutual labels:  api-wrapper
roux
Simple and (a)synchronous Reddit API wrapper for Rust.
Stars: ✭ 41 (+192.86%)
Mutual labels:  api-wrapper
node-fred
A Fred2 API wrapper
Stars: ✭ 16 (+14.29%)
Mutual labels:  api-wrapper
pybuildkite
A Python library for the Buildkite API
Stars: ✭ 29 (+107.14%)
Mutual labels:  api-wrapper
PowerSchool-API
A Node.js library for interacting with the PowerSchool SIS API.
Stars: ✭ 21 (+50%)
Mutual labels:  api-wrapper
the-traveler
The Traveler is a small npm package which wraps around the Destiny 2 API.
Stars: ✭ 52 (+271.43%)
Mutual labels:  api-wrapper
nextcord
A Python wrapper for the Discord API forked from discord.py
Stars: ✭ 956 (+6728.57%)
Mutual labels:  api-wrapper
wp-pgp-encrypted-emails
🔐 📧 Encrypts WordPress emails using OpenPGP or S/MIME with a familiar API.
Stars: ✭ 35 (+150%)
Mutual labels:  api-wrapper
scala-weather
High-performance Scala library for looking up the weather
Stars: ✭ 45 (+221.43%)
Mutual labels:  api-wrapper
rdfp
This R package connects the DoubleClick for Publishers API from R
Stars: ✭ 16 (+14.29%)
Mutual labels:  api-wrapper
python-censusbatchgeocoder
A simple Python wrapper for U.S. Census Geocoding Services API batch service
Stars: ✭ 40 (+185.71%)
Mutual labels:  api-wrapper
drip-php
An object-oriented PHP wrapper for Drip's API
Stars: ✭ 22 (+57.14%)
Mutual labels:  api-wrapper
go-ovh
Simple go wrapper for the OVH API
Stars: ✭ 107 (+664.29%)
Mutual labels:  api-wrapper
rust-ipfs-api
Rust language IPFS API implementation
Stars: ✭ 20 (+42.86%)
Mutual labels:  api-wrapper
api
Free Rest Webservices
Stars: ✭ 20 (+42.86%)
Mutual labels:  api-wrapper
autopilot-api
A third-party JavaScript wrapper for Autopilot's REST API.
Stars: ✭ 14 (+0%)
Mutual labels:  api-wrapper

Clashinator

Ruby wrapper for the Clash of Clans API, based on the v1 version

Note: These docs were updated for the new tagged version 1.0

Installation

Add this line to your application's Gemfile:

gem 'clashinator'

And then execute:

$ bundle

Or install it yourself as:

$ gem install clashinator

Usage

You'll need to generate an access token in Clash of Clans developer page at: https://developer.clashofclans.com

With your access token, retrieve a client instance with it.

client = Clashinator::Client.new('YOUR TOKEN')

All query options can be passed as underscored variables instead of camelcased, query options available are at: https://developer.clashofclans.com

There are several types of objects you can retrieve:

clans = client.search_clans(name: 'vzlan warriors', min_members: 25)

clan = client.clan_info('#VQ2QUJG')

players = client.list_clan_members('#VQ2QUJG')

war_log = client.clan_war_log('#VQ2QUJG')

locations = client.list_locations

location = client.location_info(32000254)

clan_rankings = client.location_clan_rankings(32000254)

player_rankings = client.location_player_rankings(32000254)

leagues = client.list_leagues

league = client.league_info(29000022)

seasons = client.league_seasons(29000022)

player_rankings = client.league_season_rankings(29000022, '2015-10')

player = client.player_info('#QOCRLV90')

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.

Create a new file called secrets.yml in the config folder with the contents of config/secrets.sample.yml Then, you'll need to generate an access token in Clash of Clans developer page at: https://developer.clashofclans.com

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/leocabeza/clash-api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct. Remember to add a test for each new feature you add, and before submitting a pull request, check that all tests are passing by running: rake

License

The gem is available as open source under the terms of the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].