PHPackages                             glauberportella/skyhub-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. glauberportella/skyhub-php

ActiveLibrary[API Development](/categories/api)

glauberportella/skyhub-php
==========================

PHP Library for SkyHub.com.br API

0292[1 issues](https://github.com/glauberportella/skyhub-php/issues)PHP

Since Mar 23Pushed 7y ago1 watchersCompare

[ Source](https://github.com/glauberportella/skyhub-php)[ Packagist](https://packagist.org/packages/glauberportella/skyhub-php)[ RSS](/packages/glauberportella-skyhub-php/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (4)Used By (0)

[![Code Climate](https://camo.githubusercontent.com/7b207e5e6dbd269bccfcb9ef0bc87ca517680209acdde7bb960dc25302b4c072/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f676c6175626572706f7274656c6c612f736b796875622d7068702f6261646765732f6770612e737667)](https://codeclimate.com/github/glauberportella/skyhub-php) [![Test Coverage](https://camo.githubusercontent.com/87537be627666bdb0afb18cd300e32e233920e0d8ec7374c823ad8c4dd3014c8/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f676c6175626572706f7274656c6c612f736b796875622d7068702f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/glauberportella/skyhub-php/coverage)

A PHP Library for SkyHub API
============================

[](#a-php-library-for-skyhub-api)

The purpose of this lib is to create an abstracted layer to facilitate the use of [SkyHub API](http://www.skyhub.com.br) by PHP developers.

Requirements
============

[](#requirements)

- PHP 5.6+
- PHP Multibyte String Extension installed and active
- PHP cURL extension installed and active

How to Install
==============

[](#how-to-install)

Install via composer:

```
composer require glauberportella/skyhub-php

```

Classes
=======

[](#classes)

The library has the following classes

### Exceptions

[](#exceptions)

- \\SkyHub\\Exception\\ForbiddenException
- \\SkyHub\\Exception\\MalformedRequestException
- \\SkyHub\\Exception\\MethodNotAllowedException
- \\SkyHub\\Exception\\NotAcceptableException
- \\SkyHub\\Exception\\NotFoundException
- \\SkyHub\\Exception\\RequestException
- \\SkyHub\\Exception\\SemanticalErrorException
- \\SkyHub\\Exception\\SkyHubException
- \\SkyHub\\Exception\\UnauthorizedException

### Handlers

[](#handlers)

- \\SkyHub\\Handlers\\JsonHandler

### Requests

[](#requests)

- \\SkyHub\\Request\\AttributeRequest
- \\SkyHub\\Request\\CategoryRequest
- \\SkyHub\\Request\\OrderRequest
- \\SkyHub\\Request\\OrderStatusRequest
- \\SkyHub\\Request\\ProductRequest
- \\SkyHub\\Request\\QueueRequest
- \\SkyHub\\Request\\Request *&lt;abstract&gt;*
- \\SkyHub\\Request\\RequestFactory
- \\SkyHub\\Request\\RequestInterface *&lt;interface&gt;*
- \\SkyHub\\Request\\SaleSystemRequest
- \\SkyHub\\Request\\StatusTypeRequest

### Resources

[](#resources)

- \\SkyHub\\Resource\\ApiResource *&lt;abstract&gt;*
- \\SkyHub\\Resource\\ApiResourceInterface *&lt;interface&gt;*
- \\SkyHub\\Resource\\Attribute
- \\SkyHub\\Resource\\Category
- \\SkyHub\\Resource\\Order
- \\SkyHub\\Resource\\OrderStatus
- \\SkyHub\\Resource\\Product
- \\SkyHub\\Resource\\SaleSystem
- \\SkyHub\\Resource\\StatusType

### Security

[](#security)

- \\SkyHub\\Security\\Auth

### Utils

[](#utils)

- \\SkyHub\\Utils\\JsonUtils - contains a safe json encoding routine, based on Multibyte String charset converter

Documentation
=============

[](#documentation)

Send an API request is simple, you create a Request object and call the RESTful methods supported by the [SkyHub API](http://in.skyhub.com.br/api-explorer/) with the required resource/code.

Below is some Product requests, the principle is the same for the other type of resources on the SkyHub API.

Product Example
---------------

[](#product-example)

### 1. Get Registered Products

[](#1-get-registered-products)

```
