Download the PHP package katsana/katsana-sdk-php without Composer

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

KATSANA SDK for PHP

Build Status Latest Stable Version Total Downloads Latest Unstable Version License Coverage Status

Installation

To install through composer, simply put the following in your composer.json file:

Quick Installation

Above installation can also be simplify by using the following command:

composer require "php-http/guzzle6-adapter" "katsana/katsana-sdk-php=^1.2"

HTTP Adapter

Instead of utilizing php-http/guzzle6-adapter you might want to use any other adapter that implements php-http/client-implementation. Check Clients & Adapters for PHP-HTTP.

Usages

Creating Client

You can start by creating a client by using the following code (which uses php-http/guzzle6-adapter and php-http/discovery to automatically pick available adapter installed via composer):

In most cases, you will be using the client with Personal Access Token. You can initiate the client using the following code:

Change Timezone

By default, all request will return date and time data in UTC, however you may set the request to response with a different timezone by setting the client (globally) such as:

Or on each resource such as:

Handling Response

Every API request using the API would return an instance of Katsana\Sdk\Response which can fallback to \Psr\Http\Message\ResponseInterface, this allow developer to further inspect the response.

As an example:

Getting the Response

You can get the raw response using the following:

However we also create a method to parse the return JSON string to array.

Checking the Response HTTP Status

You can get the response status code via:

Checking the Response Header

You can also check the response header via the following code:

Using the API

There are two way to request an API:

Using API Resolver

This method allow you as the developer to automatically select the current selected API version without having to modify the code when KATSANA release new API version.

This would resolve an instance of Katsana\Sdk\One\Vehicles class (as v1 would resolve to One namespace).

Explicit API Resolver

This method allow you to have more control on which version to be used.


All versions of katsana-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^8.0
laravie/codex Version ^5.0
laravie/codex-security Version ^1.1.2
php-http/multipart-stream-builder Version ^1.2
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 katsana/katsana-sdk-php contains the following files

Loading the files please wait ....