Download the PHP package namelivia/travelperk-http-php without Composer

On this page you can find all versions of the php package namelivia/travelperk-http-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 travelperk-http-php

travelperk-http-php tag Build Status codecov StyleCI

TravelPerk PHP SDK

About

This is an unofficial package for acessing the TravelPerk official Web API from your PHP language project. It is designed so you can easily query and retrieve all data hold on their platform and accessible through the API.

Installation

Require this package, with Composer, in the root directory of your project.

Getting started

Before getting started retrieving querying information from the TravelPerk Web API you first need to get an API Key.

Getting a TravelPerk instance

For querying the data you need to get a TravelPerk instance, here are two ways to get a TravelPerk API instance depending on how you authenticate with their API.

At TravelPerk there are two ways to authenticate, using an API Key or OAuth2.

For API Key Authentication

If you have an API Key for authenticating you need to call the Service Provider's build method passing your api key, and a boolean indicating if you will be using the sandbox environment or not like this:

For OAuth Authentication

If you want to use OAuth for authenticating you need to call the Service Provider's buildOAuth2 method passing your desired access token peristence method, your oauth credentials, an array of scopes your application will be accessing to, and a boolean indicating if you will be using the sandbox environment or not like this:

Retrieving data

Everything is ready, you can start asking for the data.

For further information refer to the documentation linked in the next section.

Documentation

The full documentation can be found in the wiki section of this github repository. Also you can refer to the official TravelPerk Web API documentation

License

MIT

Contributing

Any suggestion, bug reports, prs or any other kind enhacements are welcome. Just open an issue first, for creating a PR remember this project has linting checkings and unit tests so any PR should comply with both before beign merged, this checks will be automatically applied when opening or modifying the PRs.

Local development

This project comes with a docker-compose.yml file so if you use Docker and docker-compose you can develop without installing anything on your local environment. Just run docker-compose up --build for the first time to setup the container and launch the tests. PHPUnit is configured as the entrypoint so just run docker-compose up everytime you want the tests to execute on the Dockerized PHP development container.


All versions of travelperk-http-php with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
guzzlehttp/guzzle Version ^7.0.1
nesbot/carbon Version ^2.0
kamermans/guzzle-oauth2-subscriber Version ^1.0
namelivia/travelperk-php-api-types Version ^1.3.2
json-mapper/json-mapper Version ^2.6.0
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 namelivia/travelperk-http-php contains the following files

Loading the files please wait ....