Download the PHP package szunisoft/laravel-unas without Composer

On this page you can find all versions of the php package szunisoft/laravel-unas. 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 laravel-unas

Build Status Latest Stable Version Total Downloads License PHP from Packagist Coverage Status

Laravel Unas

About the package

The package is not finished yet however will be maintained and developed continuously as our primary project which requires this extension will.

Naming conventions

At some point the official Unas naming convention is not that good or does not exist at all. However the package is not trying to introduce custom naming conventions it will use the official property and attribute names as they are described in the documentation.

API compatibility

The following table contains the related API endpoints. All the endpoints will be supported soon.

Endpoint Support
getProduct :heavy_check_mark:
setProduct :x:
getOrder :x:
setOrder :x:
getStock :x:
setStock :x:
getCategory :x:
setCategory :x:
getNewsletter :x:
setNewsletter :x:

Future features :star:

Configurable Rate Limiting

Will fire an event each time an endpoint is being exhausted based on the given configuration.

Requirements :exclamation:

Install :arrow_forward:

Laravel support :hand:

>= 5.5

Configure :gear:

Export the configuration

Authentication

Two authentication drivers are supported.

Legacy (default driver)

You must set the driver to legacy.

For legacy authentication you will need the following credentials:

Key

You must set the driver to key.

In case of key authentication you will need to generate an API key inside the Unas portal.

Error handling principles

Some kind of exceptions can be turned into events rather than throwing them. This is just a code architectural decision how a particular circumstance should be handled.

For instance we create a multi-tenancy project which will handle tons of different clients traffic behind the scenes. It is more wise to consume and intercept errors as events since we'll be able to use multiple listeners on it and we can send notification to the tenant also.

In the other hand if you'll need a very specific and custom application for a single tenant then it would be more appropriate to intercept errors as exceptions because it is probably the core component of the entire application.

By default all events are disabled and going to raise.

To adjust your needs your can freely add or remove events declared in the configuration file.

The following errors can be turned into events.

Exception Event
EndpointBlacklistedException EndpointBlacklisted
InvalidConfigurationException InvalidConfiguration
AuthenticationException Unauthenticated
PremiumAuthenticationException Unauthenticated
A little talk about each exception
EndpointBlacklistedException

Thrown when an endpoint is being exhausted for a single client. You can access the client and the until Carbon instance.

InvalidConfigurationException

Thrown in case of bad client configuration.

AuthenticationException

This exception will be thrown when legacy or key credentials are invalid. You can access the field which was invalid.

PremiumAuthenticationException

Thrown when the desired authentication way is API key but related tenant has no Premium package. In this case tenant should use the legacy approach.

TooHighChunkException

Thrown when an endpoint does not allow the amount of given results per page.

Remembering clients

Sometimes you wish to have multiple clients. If you want clients to be remembered you can turn on this feature in the configuration. Remembering client will avoid creating multiple clients for the same authentication credentials.

Creating and accessing client

There are multiple ways to create clients.

Dependency Injection

This method will use the credentials given in the configuration.

IoC Container

This method will use the credentials given in the configuration.

Sometimes you want to customize the client by yourself. For these kind of desires you can use the client Builder and client Factory.

Client Builder
Client Factory

Get Products

Official details

Accessing page #1 with 50 products per page.


All versions of laravel-unas with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
laravel/framework Version ~5.5
guzzlehttp/guzzle Version ^6.3.3
ext-xmlwriter Version *
ext-simplexml Version *
orchestra/parser Version ^3.8
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 szunisoft/laravel-unas contains the following files

Loading the files please wait ....