Download the PHP package kostaschasiotis/octotravel-php without Composer

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

Octo.travel API PHP Library

A simple, robust PHP library for interacting with the Octo.travel API. This library provides an object-oriented interface to easily consume the API, including functionality for retrieving suppliers, managing products, and checking availability.

Features

Installation

Install the library using Composer:



Usage

Setup

Create an instance of the OctoClient with your API base URL and optional headers.



Endpoints


Get Supplier

Returns the supplier and associated contact details.



Get Products

Fetch the list of products.



Get Single Product

Fetch the product for the given id.



Get Availability Calendar

This endpoint is highly optimised and will return a single object per day. It's designed to be queried for large date ranges and the result is used to populate an availability calendar.



Check Availability

This endpoint is slightly slower as it will return an object for each individual departure time (or day).

You have to perform this step to retrieve an availabilityId in order to confirm a sale, so if you just want to use this endpoint and skip the calendar endpoint then that's perfectly ok.



Booking Reservation

Reserving availability when making a booking.



Get Bookings

This endpoint will fetch the bookings you have made for the given filters.

When using this endpoint you must include one of the following query parameters:



Booking Confirmation

This endpoint confirms the booking so it's ready to be used.



Booking Cancellation

For cancelling bookings. You can only cancel a booking if booking.cancellable is TRUE, and is within the booking cancellation cut-off window.



Get Booking

Fetch the status of an existing booking.



Booking Update

Updates a booking before and after it has been confirmed as long as it hasn't been redeemed or within the cancellation cutoff window.



Extend Reservation

Use this endpoint to hold the availability for a booking longer if the status is ON_HOLD.



Extending the Library

This library uses a mapper-based architecture to map raw API responses to domain entities. You can easily add new endpoints or extend the functionality:

  1. Create a New API Call Class Implement the ApiCallInterface for your custom API endpoint logic.
  2. Add Mappers Map raw data to your domain entities using static mapper classes.
  3. Register the Call Add the new call to OctoClient for easy access.

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new feature branch: git checkout -b feature/your-feature-name.
  3. Commit your changes: git commit -m "Add your message here".
  4. Push the branch: git push origin feature/your-feature-name.
  5. Open a pull request.

License

This library is open-sourced under the MIT license.

Acknowledgments

Special thanks to the Octo.travel team for providing the inspiration and API documentation for this library.


All versions of octotravel-php with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.9
respect/validation Version ^2.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 kostaschasiotis/octotravel-php contains the following files

Loading the files please wait ....