mesilov / bitrix24-php-sdk

A powerful PHP library for the Bitrix24 REST API
MIT License
409 stars 159 forks source link

Improve examples #167

Closed dynamodan closed 3 years ago

dynamodan commented 4 years ago

The example given on the readme page gives no mention of a $client object. It ends with this:

// get information about current user from bitrix24
$obB24User = new \Bitrix24\User\User($obB24App);
$arCurrentB24User = $obB24User->current();

What is $arCurrentB24User ? Is it a client object you can use to run the call() method on?

Here and there in I see bits of code like this:

$fullResult = $this->client->call(
           'crm.company.update',
           array('id' => $bitrix24CompanyId),
           array('fields' => $fields)
           array(
                            'id' => $bitrix24CompanyId,
                            'fields' => $fields,
                        )
       );
       return $fullResult;

I work for a company that wants to integrate CRM lead submissions and I can't make sense of the javascript documentation that Bitrix gives on their rest api docs. How does it translate to PHP using this library? There's probably one small detail I'm missing.

mesilov commented 3 years ago

see https://dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=99