Download the PHP package goteborgco/open-api-php-client without Composer

On this page you can find all versions of the php package goteborgco/open-api-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 open-api-php-client

Göteborg & Co API Client for PHP

Official PHP client library for interacting with the Göteborg & Co GraphQL API. This package provides a type-safe interface for accessing Göteborg & Co's API, offering both structured methods for common operations and flexible GraphQL query capabilities.

Features

Requirements

Installation

Install the package via composer:

Setup

Initialize the API Client with your API URL and subscription key:

Usage

Type-Specific Methods

While the general query method provides full flexibility, the API also includes type-specific methods for common operations. These methods provide:

Entity Types

The following entity types are available:

Listing Guides

List guides using GraphQL field selection:

Getting a Single Guide

Retrieve a specific guide:

Error Handling

The API uses exception handling for errors. Wrap your API calls in try-catch blocks:

Places

The API provides methods to list places and retrieve individual places by ID. All responses are mapped to proper PHP classes for type safety.

Listing Places

List places with field selection:

Getting a Single Place

Events

The API provides methods to list events and retrieve individual events by ID. Events include support for date filtering and sorting.

Listing Events

Getting a Single Event

Search

Taxonomies

The API provides methods to list all available taxonomies. This is useful for getting an overview of all taxonomy types in the system.

Taxonomy

The API provides methods to list all terms within a specific taxonomy. Terms can be retrieved either as a flat list or as a hierarchical tree structure based on parent-child relationships.

Listing Taxonomy Terms (Flat)

Listing Taxonomy Terms (Hierarchical)

When working with hierarchical taxonomies like categories, you can retrieve terms in a tree structure:

Notes

Array Structure for Fields

As an alternative to GraphQL strings, you can also specify fields using an array structure. This can be useful when building queries dynamically:

General GraphQL Queries

The API provides a general-purpose query method for executing any GraphQL query. This method accepts raw GraphQL syntax and returns the unprocessed API response:

Query Structure

The query method expects a complete GraphQL query string. The query must:

Examples of valid queries:

Error Handling

The query method will throw exceptions for:

Always wrap query calls in try-catch blocks:

This array structure will be automatically converted to the equivalent GraphQL fields string internally.


All versions of open-api-php-client with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
guzzlehttp/guzzle Version ^7.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 goteborgco/open-api-php-client contains the following files

Loading the files please wait ....