deepser/api-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

deepser/api-php

Composer 安装命令:

composer require deepser/api-php

包简介

Deepser API PHP library

README 文档

README

Let's consume the Deepser API (issues)

Deepser is a help desk software and you can find more information in Deepser API Docs

Installation

This library can be found on Packagist. The recommended way to install this is through composer. We support PHP >=7.0. This library is no longer tested on HHVM.

Run these commands to install composer, the library and its dependencies:

$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar require deepser/api-php^1.0.3

You then need to install one of the following:

$ php composer.phar update

Or edit composer.json and add:

{
    "require": {
        "deepser/api-php": "^1.0.3"
    }
}

Example

Login with Basic Authentication

<?php

require 'vendor/autoload.php';

$host = 'https://your.deepser.net';
$username = 'username';
$password = 'password';
// create a deep desk object
\Deepser\Deepser::init($host, $username, $password);

// ...

Login with Token Based Authentication

<?php

require 'vendor/autoload.php';

$host = 'https://your.deepser.net';
$username = 'username';
$token = 'mytokenhere';
// create a deep desk object
\Deepser\Deepser::init($host, $token);

// ...

Operation (Ticket)

// ...
// load an existing operation by id
$operation = new \Deepser\Entity\Service\Operation();
$operation->load(1000);
//...
// create new operation object
$operation = new \Deepser\Entity\Service\Operation();
$operation->setTitle('My new ticket');
$operation->setDescription('can you help me?');
$operation->setType(123);
$operation->save();

User

// ...
// load an existing user by id
$user = new \Deepser\Entity\User();
$user->load(600);

// load user by username
$user = new \Deepser\Entity\User();
$user->load('myusername', 'username');

//...
// load user collection
$userCollection = \Deepser\Entity\User::getCollection();
$userCollection->addFilter('company_id', 'eq', 123);
foreach($userCollection as $user){
    echo $user->getFirstname();
}

Company

// ...
// load an existing company by id
$company = new \Deepser\Entity\Company();
$company->load(600);
//...
// load company collection
$companyCollection = \Deepser\Entity\Company::getCollection();
$companyCollection->addFilter('name', 'like', '%ACME%');
foreach($companyCollection as $company){
    echo $company->getName();
}

Credits

Support

Please open an issue in github

Contributor Code of Conduct

As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the Contributor Covenant, version 1.0.0, available at http://contributor-covenant.org/version/1/0/0/.

License

Deepser API is released under the MIT License. See the bundled LICENSE file for details.

统计信息

  • 总下载量: 26
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-02-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固