PHP code example of beedooedtech / beedoo-sdk-php
1. Go to this page and download the library: Download beedooedtech/beedoo-sdk-php library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
beedooedtech / beedoo-sdk-php example snippets
oo = new Beedoo\Client("SECRET_KEY");
$params = [
"question" => "assunto_a_ser_pesquisado",
"category" => 1,
"tag" => 5,
"offset" => 20,
"limit" => 20,
];
$groups = $beedoo->groups()->get($params);
$payloadAuth = [
"clientId" => "n6XSN0o6FDQZQ4lmxb7P2"
];
$accessToken = $beedoo->accessToken()->get($payloadAuth);
$params = [
"id" => 1,
"name" => "nome_do_grupo",
"offset" => 5,
"limit" => 20,
];
$groups = $beedoo->groups()->get($params);
$article = [
'id' => 279
];
$beedoo = $beedoo->wiki()->getIsReadArticle($article);
$article = [
'id' => 279
];
$beedoo = $beedoo->wiki()->saveArticleRead($article);
$beedoo = $beedoo->team()->getAvatar();
$beedoo = $beedoo->upload()->getUrl();
$beedoo = $beedoo->visualIdentity()->get();
/** Campos obrigatórios */
$userData = [
"username" => "jhonsnow",
"name" => "Jhon Snow",
"login" => "jhonsnow",
"password" => "123mudar",
"status" => "Ativo",
"typeUser" => "Usuário",
"permission" => "Usuario",
"groups" => "geral"
];
$user = $beedoo->user()->create($userData);
$userData = [
"username" => "jhonsnow",
"name" => "Jhon Snow",
"login" => "jhonsnow",
"email" => "[email protected] ",
"password" => "123mudar",
"status" => "Ativo",
"typeUser" => "Usuário",
"permission" => "Usuario",
"groups" => "geral, grupo_pela_api",
"cpf_cnpj" => 46312127800,
"dashboard" => [
"agent_id" => 22032,
"template" => "Template DEV"
],
"hierarchy" => [
"leader" => 77202,
"level" => "Gerente"
],
"language" => "pt-BR",
"leader" => true,
"mention_feed" => false,
"entrytime" => "18:45:00",
"exittime" => "23:15:00",
"customfields" => [
"Login-SSO" => "jhonsnow",
"Complementar Numero" => 12345
]
];
$user = $beedoo->user()->update($userData);
shell
composer