2017 © Pedro Peláez
 

package crystal-hub

A PHP-SDK for MyCrystalHub API

image

oliveris/crystal-hub

A PHP-SDK for MyCrystalHub API

  • Friday, April 27, 2018
  • by oliveris
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

MyCrystalHub SDK

PHP-SDK for MyCrystalHub API

Used to access your companies data., (*1)

Usage

Pull in the composer package by running the command below:, (*2)

composer require oliveris/sdk-mycrystalhub

Import the Crystal namespace into the class (autoloading), (*3)

use Crystal\Crystal;

Examples

Setting your API environment

Below shows an example if you need to access a different environments API, for example, staging. By default it is set on production., (*4)

$crystal = new Crystal();
$crystal->setApiEnvironment('staging');

Retrieving all of the companies clients

Below is a basic example of how to make a request to retrieve your companies clients., (*5)

$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveAllClients();

Retrieving all of the companies quotes

Below is a basic example of how to make a request to retrieve your companies quotes., (*6)

$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveAllQuotes();

Retrieving all of the companies jobs

Below is a basic example of how to make a request to retrieve your companies jobs., (*7)

$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveAllJobs();

Retrieving all of the companies invoices

Below is a basic example of how to make a request to retrieve your companies invoices., (*8)

$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveAllInvoices();

Retrieving all of the companies employees

Below is a basic example of how to make a request to retrieve your companies employees., (*9)

$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveAllEmployees();

Retrieving a single client

Below is a basic example of how to make a request to retrieve a single client., (*10)

The $client_id variable should be an integer type., (*11)

$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveClient($client_id);

Retrieving a single quote

Below is a basic example of how to make a request to retrieve a single quote., (*12)

The $quote_ref variable should be a string type, eg 'QU1/1'., (*13)

$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveQuote($quote_ref);

Retrieving a single job

Below is a basic example of how to make a request to retrieve a single job., (*14)

The $job_ref variable should be a string type, eg 'JO1/1'., (*15)

$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveJob($job_ref);

Retrieving a single invoice

Below is a basic example of how to make a request to retrieve a single invoice., (*16)

The $invoice_ref variable should be a string type, eg 'IN1/1'., (*17)

$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveInvoice($invoice_ref);

Retrieving a single employee

Below is a basic example of how to make a request to retrieve a single employee., (*18)

The $employee_id variable should be an integer type., (*19)

$crystal = new Crystal();
$crystal->setPkToken('{your_company_pk_token}');
$crystal->setSkToken('{your_company_sk_token}');

$crystal->retrieveEmployee($employee_id);

License

MyCrystalHub is open-sourced software licensed under the MIT license., (*20)

The Versions

27/04 2018

dev-master

9999999-dev

A PHP-SDK for MyCrystalHub API

  Sources   Download

MIT

The Requires

 

by Sam Oliveri

crystal mycrystalhub

27/04 2018

v1.0.6

1.0.6.0

A PHP-SDK for MyCrystalHub API

  Sources   Download

MIT

The Requires

 

by Sam Oliveri

crystal mycrystalhub

27/04 2018

dev-feature/staticMethods

dev-feature/staticMethods

A PHP-SDK for MyCrystalHub API

  Sources   Download

MIT

The Requires

 

by Sam Oliveri

crystal mycrystalhub

21/04 2018

v1.0.4

1.0.4.0

A PHP-SDK for MyCrystalHub API

  Sources   Download

MIT

The Requires

 

by Sam Oliveri

crystal mycrystalhub

21/04 2018

v1.0.3

1.0.3.0

A PHP-SDK for MyCrystalHub API

  Sources   Download

MIT

The Requires

 

by Sam Oliveri

crystal mycrystalhub

21/04 2018

v1.0.2

1.0.2.0

A PHP-SDK for MyCrystalHub API

  Sources   Download

MIT

The Requires

 

by Sam Oliveri

crystal mycrystalhub

19/04 2018

1.0.0

1.0.0.0

A PHP-SDK for MyCrystalHub API

  Sources   Download

MIT

The Requires

 

by Sam Oliveri

crystal mycrystalhub