Download the PHP package art-pub/nfon-api-client-php without Composer

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

NFON administration portal REST API PHP-client

This is a small PHP package to send requests against the NFON administration portal REST API.

Requirements

You need to have

  1. the main URL to the API (i.e. https://api09.nfon.com)
  2. your API public and (i.e. NFON-ABCDEF-123456)
  3. your API secret and (i.e. gAp3bTxxUev5JkxOcBdeC5Absm7J84jp6mEhJZd3XiLdjzoGSF)
  4. your account name (i.e. K1234)

[!NOTE] If you do not have this information, please contact your NFON partner for assistance.

[!WARNING] Never share your API secret!

Usage

Install the package

The easiest way for installation is to use composer to use this package:

Create a request

The result is JSON-like, but difficult to read or process. The $response will therefore have a key dataMap having the result in a more useful structure, holding the original data still in $response['data'] (for single results) or $response['items'] (for multiple results).

Original data:

DataMap:

Good to know

Datasets and Pagination

Endpoints that return more than one record will return a maximum of 100 records on the first request. The result contains the following information:

Href: Path of the current request

Total: Amount of all datasets (not pages!)

Offset: Offset starting with 0

Size: Amount of maximum results in the response. You can set the amount in the request with the parameter pageSize=XXX with XXX being max. 100.

Links: Array of links including the first, the next and the last URL to retrieve all data. See LinksMap["first"], LinksMap["last"] and LinksMap["next"] in the example above.

[!IMPORTANT] Please note: You have to iterate through all those links to retrieve all data. Just repeat with the next given Href until your current Href (path of the current request) matches the last entry.

[!IMPORTANT] If the last entry is empty, you already have all data in the current response.

Links


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

PHP Build Version
Package Version
Requires php Version >=8.0.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 art-pub/nfon-api-client-php contains the following files

Loading the files please wait ...