Flying Fish CRM

Let it dry goods directly, PHP method call today's headlines flying fish CRM, point me jump .
Two very simple methods, encryption is important to have a space, must have, this is fucked me a pit for a long time.

 

? < PHP 

// introduced ./src/FeiYu.php file
require_once './src/FeiYu.php' ;
use FeiYuCRM \ Feiyu;

// instantiate the class and pass initialization parameters Feiyu
$ Feiyu = new new Feiyu ([ 'Host '=>' https://feiyu.oceanengine.com ', ' pull_route '=>' / CRM / V2 / OpenAPI / pull-Clues / ', ' push_route '=>' / CRM / V2 / OpenAPI / CLUE / the callback / ', ' signature_key '=>' ABCDEFGHIGKLMNOP ', ' token '=>' 01234567890123abcdefghijklmnopqrstuvwxyz ', ]);

// pull data, passing the start and end dates, the third parameter is the number of data per
$ Feiyu -> pullData ( '2019-08-01', '2019-09-01', 100) ->run(function($customers){
// this is a closure, will be performed after taking a full page of data is complete
the foreach ( $ the Customers AS $ Customer ) { // RUN Yourself function print_r ( $ Customer ); Die ; } });

 

It is very simple.

Guess you like

Origin www.cnblogs.com/w736611944/p/11626863.html