Download the PHP package robsonsanches/stays-php-client without Composer

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

Stays API - PHP Client (Unofficial)

PHP client for server-side integration with Stays API v1 (unofficial library)

GitHub release (latest by date) GitHub

Table of contents:

Requirements

Installation

Getting started

To obtain API credentials please read the Stays API Docs https://stays.net/external-api/#introduction.

Setup

Setup for the Stays API integration:

Client Parameters

Parameter Type Required Description
$domain string yes System's domain, example: https://play.stays.net/
$clientId string yes API Client ID
$clientSecret string yes API Client Secret
$options array no Additional options (see additional options table)

Additional options

Option Type Required Description
type string no API type, default is external
version string no API version, default is v1
timeout number no Request timeout, default is 2.0
response_format string no Response format (array, object or string), default is array
http_errors bool no Set to false to disable throwing exceptions, default is true
http_client_options array no Guzzle HTTP client options

Making Requests

You may use the get, post, patch, and delete methods to make requests to Stays API.

Request Methods

Arguments

Parameter Type Description
$endpoint string Stays API endpoint, example: content/groups
$data array Only for POST and PATCH, data that will be converted to JSON
$query array Only for GET and DELETE, request query string
$headers array Additional http headers

Using Responses

All the request methods will return a response that can be a multidimensional array, array of objects or JSON string on success. If is present the argument http_errors = true, will throwing ClientException error on failure.

To get the response data from Http Client:

If you need to get the last requested data:

Docs

Stays Documentation

Licence

The MIT License

Release History


All versions of stays-php-client with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
guzzlehttp/guzzle Version ^7.3
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 robsonsanches/stays-php-client contains the following files

Loading the files please wait ....