Download the PHP package teamzac/openzac-api-php without Composer

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

OpenZac API PHP Client

This is the PHP client for the OpenZac API.

Getting Started

You'll need an API key. Get one at https://openzac.com.

Creating an instance of the client

In Laravel

Include the service provider in your config/app.php file:

Publish the package's config file:

Add your API token, preferably to your .env file:

Or set it directly in the config file:

The service provider binds a singleton instance of to the IoC container, which you can access using the key 'OpenZac':

Using the client

The remainder of the documentation will assume you're using Laravel. If not, you can replace with a normal instance of .

We're fleshing out a fluent interface to the API, but for now you can just use the method on the client, providing a URI path and optionally any parameters or headers you wish to pass along:

Retreiving Entities

We do have a minimally developed interface for accessing 'entity' resources. You can access this interface using the attribute on the OpenZac instance:

There are two public methods on this resource: and .

all()

is the same as calling . You can pass an array of query parameters as the lone argument:

find()

The method takes an entity ID as its lone parameter, and will retrieve a single entity record.

Resources and Collections

API calls return either an instance of or .

TeamZac\OpenZac\Support\Resource

Right now this is just a simple wrapper for the response which allows you to access data as properties on the Resource object.

The infrastructure is in place to provide more helpful functionality by using this as a base class. Future development plans include each resource having it's own subclass. This will allow for casting attributes to certain data types and potentially other valuable features.

TeamZac\OpenZac\Support\ResourceCollection

This is a simple wrapper around responses that return more than a single resource. It has a couple of public methods which may be useful:

returns the resources, which are subclasses of .

returns any metadata associated with the response. Typically this will just be information related to pagination where applicable.

returns the next page number or if it does not exist.

returns the previous page number or if it does not exist.


All versions of openzac-api-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.7
nesbot/carbon Version ~1.20
guzzlehttp/guzzle Version ~6.0
illuminate/support Version 5.4.*
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 teamzac/openzac-api-php contains the following files

Loading the files please wait ....