Download the PHP package rgarman/sdk-stats without Composer

On this page you can find all versions of the php package rgarman/sdk-stats. 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 sdk-stats

Stats.com SDK

About

The sdk-stats package is an Software Development Kit for various stats.com API endpoints. The way this SDK works is by the user customising the endpoints to use and assign their own names to them for easier and more efficient experience for the developer

Installation

Require the rgarman/sdk-stats package in your composer.json and update your dependencies:

Creating a Client:

I would recommend that an assoc array containing your login credentials is created, for ease later. This also will aid in creating multiple different instances with different API's simultaniously Create an instance of the ClientCore() class

Adding Resources

To add a Resource to use, simply call the AddResource() method from the ClientCore and pass an instance of either a Route, or Cache


The parameters to which are: the name, and the chosen instance Route parameters:

  1. Endpoint (String)
  2. Parameters (Array)
  3. Config Credentials

Using the Resources

Using the name you assigned the resource, simply use it as a property and use any of the below listed functions

Function List

Route Instance:

get( $Parameters (Array/String) )

makes a call to the current API endpoint selected using the Parameters provided as an array or string
Returns the response from the API as an array

getAndCache ( $Parameters (Array/String) )

Basically the same functionality as get, except for the fact that a cache will be createdin the form of raw JSON
Returns the response from the API as an array (In addition to the cache)

setMethod( $Method (String) )

Sets the type of HTTP protocol to use e.g. GET, POST, PUT etc. Accepts all 7 types

setBase( $Base (String) )

Sets the Base URI of the API to use, so other API's can be used within the same SDK!

Cache Instance:

get( $Cache (String) )

Retreives the given cache, use "*" to get the names of all stored cached data

See the Example for more


All versions of sdk-stats with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ~6.0
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 rgarman/sdk-stats contains the following files

Loading the files please wait ...