Download the PHP package awaluk/nextbike-api-client without Composer

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

Nextbike API Client

Build Status

Client to get some data from Nextbike API.

This library require PHP version >= 7.

Installation

Usage

To use, please include Composer autoloader. Next, create HTTP client (based on Guzzle) and Nextbike class instance.

If it's necessary, you might pass custom API address in second parameter of Nextbike class:

Methods

Nextbike class provide methods to get data from API. In results you receive structure (one object) or collection (more objects).

Method Description Result
getSystems() get all Nextbike systems SystemCollection
getCities() get all cities from all systems CityCollection
getCity(int $cityId) get one city by passed id City

Structure

Each structure provides own methods to get data. For details, please see to necessary class. In addition, each structure have method get(string $name) to get data by given name.

Collection

In collections you might use following methods:

Method Description Result
isEmpty() check is structure have any data bool
count() get number of objects in collection int
getAll() get all data array
getFirst() get first object structure class

Examples

  1. Get all systems names:

  2. Get stations with number of available bikes in given city (in this example: 496 - Koszalin, Poland):

Contributing rules

Do you want to help develop this library? See CONTRIBUTING file.

License

MIT


All versions of nextbike-api-client with dependencies

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

Loading the files please wait ....