定制 dexiio/dexi-api-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

dexiio/dexi-api-client

最新稳定版本:1.2.1

Composer 安装命令:

composer require dexiio/dexi-api-client

包简介

Dexi API Client for PHP 5.3+

README 文档

README

dexi.io

dexi-php-client

Dexi API Client for PHP 5.3+

Installation

dexi-php-client is available via composer/packagist as dexi-api-client. Install it by adding it to your composer.json file:

"dexiio/dexi-api-client": "~1.1"

or

composer require dexiio/dexi-api-client

Example

The following example executes a run and retrieves information for the execution:

<?php

// Load using the composer autoloader to handle our PSR-4 namespacing
require __DIR__ . '/vendor/autoload.php';

define('CS_API_KEY', 'Your secret API Key'); // See https://app.dexi.io/#/api
define('CS_ACCOUNT_ID', 'Your account ID');
$someRunId = '59f3822f-6abc-4a01-81dc-5002a31f2dbc'; // Edit your runs inside the app to get their ID

\Dexi\Dexi::init(CS_API_KEY, CS_ACCOUNT_ID);

$newExecution = \Dexi\Dexi::runs()->execute($someRunId);

var_dump($newExecution);

Documentation

See the API documentation for details on all namespaces, methods and models. The global API object must be initialized in order to be used:

\Dexi\Dexi::init(<your api key>, <your account id>);

The following API namespaces are contained in the global Dexi\Dexi class:

\Dexi\Dexi::executions() \Dexi\Dexi::runs() \Dexi\Dexi::robots() \Dexi\Dexi::dataSets()

These namespaces contain the methods displayed in the API documentation. Models are defined in the \Dexi\DTO\ namespace.

Migrating from cloudscrape-client-php

Github: cloudscrape/cloudscrape-client-php is now dexiio/dexi-php-client

Packagist: cloudscrape/cloudscrape-api-client is now dexiio/dexi-api-client

If you are currently using cloudscrape-client-php, we strongly suggest you upgrade to this library as cloudscrape-client-php has been deprecated and will no longer be developed, and may not be supported in the future. Most method signatures have changed and we have added PSR-4 namespacing and rebranding to the Dexi name, as well as moving to support PHP7. New classes and methods have also been added.

Old class New class
CloudScrape \Dexi\Dexi
CloudScrapeClient \Dexi\Client
CloudScrapeExecutions \Dexi\Executions
CloudScrapeRuns \Dexi\Runs
\Dexi\Robots
\Dexi\DataSets
CloudScrapeRunDTO \Dexi\DTO\RunDTO
\Dexi\DTO\RunListDTO
CloudScrapeResultDTO \Dexi\DTO\ResultDTO
CloudScrapeFileDTO \Dexi\DTO\FileDTO
CloudScrapeExecutionDTO \Dexi\DTO\ExecutionDTO
CloudScrapeExecutionListDTO \Dexi\DTO\ExecutionListDTO
\Dexi\DTO\StatsDTO
\Dexi\DTO\RobotDTO
\Dexi\DTO\DataSetRowSetDTO
\Dexi\DTO\DataSetRowQueryDTO
CloudScrapeRequestException \Dexi\Exception\RequestException

Testing

PHPUnit integration tests are provided in the test/Dexi folder. In order to run them, a configuration.ini file must be created in the top-level folder with the following settings:

[tests]
apiKey=<a valid api key>
accountId=<your account id>

# Optional fields
categoryId=<if set, will store created resources in this folder>
dataSetId=<if set, provides data set tests using this data set>

Contributing

Please submit bug reports, suggestions and pull requests to through Github.

We are more than happy to examine any pull-requests and appreciate any ideas, comments or suggestions you may have.

License

The library is available as open source under the terms of the MIT License.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 7
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-11-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固