Giter VIP home page Giter VIP logo

yougile-api's Introduction

yougile-api

Библиотека для работы с YouGile REST API v2.0

Описание и примеры: shafeev.net

Установка

Через Composer

composer require shami/yougile

Использование

Инициализация

require_once __DIR__ . "/vendor/autoload.php";

use Yougile\Yougile;

$yougile = new Yougile('ID_Компании', 'КЛЮЧ');

Необходимые данные

  1. Получить ID компании
  2. Получить ключ API

Общая информация

Чтобы воспользоваться определенным методом, необходимо указать ресурс к которому данный метод относится.

$resources = $yougile->api('resources');

Далее можно обращаться к любому методу из указанного ресурса.

$result = $resources->create();

Примеры

Получить список сотрудников

$users = $yougile->api("users");
$user_list = $users->get_list();
var_dump($user_list);

Пригласить в компанию сотрудника

$users = $yougile->api("users");
$res = $users->create("[email protected]", true); // два параметра: $email, $isAdmin - имеет ли пользователь права администратора
var_dump($res);

Получить информацию по ID сотрудника

$users = $yougile->api("users");
$user = $users->get_by_id("ТУТ_ID");
var_dump($user);

Удалить из компании

$users = $yougile->api("users");
$res = $users->delete("ТУТ_ID");
var_dump($res);

Доступные ресурсы

  • Users
  • Tasks
  • Boards
  • Chats
  • Columns
  • Departments
  • GroupChats
  • Projects
  • Roles
  • SprintStickers
  • StringStickers

yougile-api's People

Contributors

sh-sham avatar

Watchers

 avatar

Forkers

artemyurov

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.