Download the PHP package mikolaykorniat/desk-php without Composer

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

desk-php

Build Status Coverage Status Scrutinizer Quality Score Dependency Status

PHP client for Desk.com v2 API, based on Guzzle

This project is still under development and things may change quickly. It'll attempt to adhere to Semantic Versioning to minimise any issues.

Here's a summary of what's implemented:

Project Aims

Installation

To get this library in to an existing project, the best way is to use Composer.

  1. Add bradfeehan/desk-php as a Composer dependency in your project's composer.json file:

  2. If you haven't already, download and install Composer:

  3. Install your Composer dependencies:

  4. Set up Composer's autoloader:

You're done! Now the Desk namespace should exist and contain everything you need to consume the Desk.com API.

"More on the composer.json format"
"More detailed installation instructions on the Composer site"
"More detailed instructions on the Composer site"
"More information about the autoloader on the Composer site"

Super Quick Run-down

Basic Usage

The main point of entry for your app will usually be the Desk\Client class:

.. or with API keys:

Individual commands can be retrieved from the client and executed:

There are some shortcuts which can be taken. The above is equivalent to:

...which again is the same as:

Complex data types are (generally) converted to/from easier to use formats. For example, dates are represented as strings over the wire when communicating with the Desk API, but these will be converted to PHP DateTime objects upon retrieval:

Command names

The names of commands follow a strict naming convention. The type of operation is first; this is usually one of Show, List, Create, Update, Delete, or Search. This is combined with the resource name (CamelCase if it's more than one word) -- for example, Article, Company, CustomField etc. List and Search operations will have a pluralised version of the resource name (e.g. ListCompanies, SearchArticles, etc). while the other operations will have the singular form (e.g. ShowCompany, CreateArticle, etc). The complete list is in the service description file, desk.json, although it might be a bit hard to use for this purpose due to its length.

"View this file on GitHub"

Relationships

In version 2 of the Desk API, there exists the concept of relationships between resources. For example, a Case resource now links to the Customer resource which created the case. This is fully supported by this library.

Links

A link from one resource to another is represented by a pre-configured command object which is ready to retrieve the target of the link. To retrieve a command representing a link, call the getLink() method on the model:

Embedded Resources

The example above would require two requests -- one for the case, and another for the customer. If, at the time of the first request, you know that you will (or might) need to access a related resource, you can request that the related resource be embedded into the first response. As an example, to improve on the performance of the previous example:

The call to getEmbedded() would throw an exception if we hadn't requested the "customer" relation to be embedded at the time of the original request to retrieve the case.

Contributing

Contributions are most welcome! At this early stage of development, I'm working hard on the items at the top of this README. At any time I'm probably halfway through implementing (or re-implementing) something on that list, so keep that in mind if you're planning to start working on something -- I may already be on it.

Here's a few guidelines when coding on this project:

With that being said, I feel like even if you have some code in a fork which doesn't adhere to these guidelines, it could certainly still be useful, so feel free to open a pull request anyway.


All versions of desk-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
guzzle/guzzle Version ~3.9
bradfeehan/guzzle-modular-service-descriptions Version ~1.1,>=1.1.1
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 mikolaykorniat/desk-php contains the following files

Loading the files please wait ....