Download the PHP package simbiotica/cartodbclient-php without Composer
On this page you can find all versions of the php package simbiotica/cartodbclient-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download simbiotica/cartodbclient-php
More information about simbiotica/cartodbclient-php
Files in simbiotica/cartodbclient-php
Package cartodbclient-php
Short Description CartoDB SQL API v2 client for PHP
License MIT
Homepage https://github.com/simbiotica/cartoDBclient-PHP
Informations about the package cartodbclient-php
CartoDB SQL API v2 Client for PHP by Simbiotica
About
A easy to use PHP client for CartoDB's SQL API v2, using OAuth or API key authentication.
Installation
There are two versions of the library: OAuth or API Key. When installing, you have to choose which to use.
This library requires composer, a package manager for PHP. To use the OAuth version, add the following to your composer.json:
Or, if you prefer the API key version, use the following:
After, install it using the command:
This will install not only this library, but the required dependencies.
Usage - OAuth
Currently two types of connections are supported: PrivateConnection and PublicConnection. Public connections are a subset of Private ones, as they can be established to any public table, with reduced privileges and configuration requirements
Additionally, TokenStorageInterface implementation is required to presist the OAuth Token across requests. We provide SessionStorage and FileStorage, but feel free to implement your own.
For reference, check the Connection class, where you'll find all the handy functions you'll need. There's also a runSql() function for everything that's not covered by existing functions.
All reponses are wrapped as a Payload object, which holds the formated answer, request metadata and a couple of utilities to handle the result.
No actual demo is provided, but you can view a sort-of-example inside the /tests folder. Remember to fill in your data before trying it.
Usage - API Key
Usage with just API key is less secure, but equaly functional and easier to setup.
All connections are supported by the Connection class, which accepts your domain and, optionally, you API key. If you don't provide it, you will have limited access to the tables.
For reference, check the Connection class, where you'll find all the handy functions you'll need. There's also a runSql() function for everything that's not covered by existing functions.
All reponses are wrapped as a Payload object, which holds the formated answer, request metadata and a couple of utilities to handle the result.
No actual demo is provided, but you can view a sort-of-example inside the /tests folder. Remember to fill in your data before trying it.