Download the PHP package berskde/coc-api-php without Composer

On this page you can find all versions of the php package berskde/coc-api-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package coc-api-php

Clash of Clans API

Easily query Supercell's API for Clash of Clans data! This package uses official API. For more information, please visit https://developers.clashofclans.com

This package is tested and working on PHP 5.5 and greater, including PHP 7.0!

Do note that the API might change at any given moment, as there are no stable releases yet.

Requirements

For using this package, you need to obtain an API key at https://developer.clashofclans.com

Installation

Using Composer

Usage

When instantiating Client, you have to provide your API key:

Clans

Refers to /clans endpoint from the official docs.

You can use any of the parameters specified in the official docs as keys, and the values as parameter values, likewise

Tip: if you are only searching by clan name, you don't have to specify the array as parameter but just a simple string:

For all available parameters, please browse through the offical docs.

Get specific clan by tag

Refers to /clans/{clanTag} endpoint from the official docs.

It's very easy to use:

For more available methods, visit ClashOfClans\Api\Clan\Clan class.

Getting leader info

For more available methods, visit ClashOfClans\Api\Clan\Player class.

Getting co-leaders and elders

Leagues

Refers to /leagues endpoint from the official docs.

Locations

Refers to /locations endpoint from the official docs.

Getting all available locations is pretty easy:

Get specific location by ID

Refers to /locations/{locationId} endpoint from the official docs.

Get rankings for specific location

Refers to /locations/{locationId}/rankings/{rankingId} endpoint from the official docs.

Instead of 'clans', as the second parameter you can also pass string players which will return array of Player objects.


All versions of coc-api-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
guzzlehttp/guzzle Version ^7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package berskde/coc-api-php contains the following files

Loading the files please wait ...