PHPackages                             zibios/wrike-php-library - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. zibios/wrike-php-library

AbandonedArchivedLibrary[HTTP &amp; Networking](/categories/http)

zibios/wrike-php-library
========================

Wrike PHP Library, generic implementation.

v1.0.0(8y ago)67.4k14[3 issues](https://github.com/zibios/wrike-php-library/issues)[1 PRs](https://github.com/zibios/wrike-php-library/pulls)3MITPHPPHP &gt;=5.5

Since Feb 7Pushed 3y ago2 watchersCompare

[ Source](https://github.com/zibios/wrike-php-library)[ Packagist](https://packagist.org/packages/zibios/wrike-php-library)[ RSS](/packages/zibios-wrike-php-library/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (7)Used By (3)

Wrike PHP LIBRARY - Wrike API V3 &amp; V4
=========================================

[](#wrike-php-library---wrike-api-v3--v4)

Introduction
------------

[](#introduction)

**This is generic library for [Wrike](https://www.wrike.com/) (online project management software) REST API.**

This package contains general documentation for all features. This package is decoupled from unnecessary dependencies and can't be used without additional HTTP Client plugin.

- For general purpose please check full configured [Wrike PHP SDK](https://github.com/zibios/wrike-php-sdk) - **recommended for most users**.
- For Symfony Framework please check full configured [Wrike bundle](https://github.com/zibios/wrike-bundle) based on this library
- For none standard purposes please check:
    - this generic [Wrike PHP Library](https://github.com/zibios/wrike-php-library)
    - [HTTP Client plugin](https://github.com/zibios/wrike-php-guzzle) based on [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) package
    - [response transformer plugin](https://github.com/zibios/wrike-php-jmsserializer) based on [jms/serializer](https://github.com/schmittjoh/serializer) package

Versions
--------

[](#versions)

Major VersionWrike APIPHP CompatibilityInitial releaseSupport[V3](https://github.com/zibios/wrike-php-library/tree/v3.x)V4PHP 7.1, PHP 7.2, TBDOctober, 2018TBD[V2](https://github.com/zibios/wrike-php-library/tree/v2.x)V4PHP 5.5, PHP 5.6, PHP 7.0, PHP 7.1October, 2018Support ends on October, 2019[V1](https://github.com/zibios/wrike-php-library/tree/v1.x)V3PHP 5.5, PHP 5.6, PHP 7.0, PHP 7.1February, 2018Support ends on February, 2019Project status
--------------

[](#project-status)

**General**

[![Packagist License](https://camo.githubusercontent.com/d8c09cf4e6d40d77c8d9369dec9bc8fd95a491b1dd54646c7f49bee05ab3d789/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7a6962696f732f7772696b652d7068702d6c6962726172792e737667)](https://packagist.org/packages/zibios/wrike-php-library)[![Packagist Downloads](https://camo.githubusercontent.com/3d965815a207b571931c7ce4880205a91823cbaf4b53abef3de9391ccb9512bc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a6962696f732f7772696b652d7068702d6c6962726172792e737667)](https://packagist.org/packages/zibios/wrike-php-library)[![Packagist Version](https://camo.githubusercontent.com/f6584a0b1a0cfa9cb4c2e501a889d4e04c51f13a7a1655389034e22f70d438bf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a6962696f732f7772696b652d7068702d6c6962726172792e737667)](https://packagist.org/packages/zibios/wrike-php-library)[![Packagist Version](https://camo.githubusercontent.com/71dcb594f52ea0ad7eb05055657289ab55cc98633ccbe1902fb891d687194b6d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7a6962696f732f7772696b652d7068702d6c6962726172792e737667)](https://packagist.org/packages/zibios/wrike-php-library)[![Libraries.io](https://camo.githubusercontent.com/86633de6b7adaa1fe04892467ddecbe35e30e0162f967c3dab288e46da403e96/68747470733a2f2f696d672e736869656c64732e696f2f6c6962726172696573696f2f6769746875622f7a6962696f732f7772696b652d7068702d6c6962726172792e737667)](https://libraries.io/packagist/zibios%2Fwrike-php-library)

[![CII Best Practices](https://camo.githubusercontent.com/6444309a579135de8fe40585d2742520462ed759b8a64258af46d0418d57529f/68747470733a2f2f626573747072616374696365732e636f7265696e6672617374727563747572652e6f72672f70726f6a656374732f313639302f6261646765)](https://bestpractices.coreinfrastructure.org/projects/1690)[![SensioLabsInsight](https://camo.githubusercontent.com/1438f86960918d6f3a805f5722735507e3b56a14fea7b035c6ec3e4615391455/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f32386434336666652d666139612d346166612d383933652d6663396232653038306430392f6d696e692e706e67)](https://insight.sensiolabs.com/projects/28d43ffe-fa9a-4afa-893e-fc9b2e080d09)[![Codacy Badge](https://camo.githubusercontent.com/79dbf8e3fe55da44d5eb8a6a00acbc1c1d804b6bd9ae73b44c9b30a4f65ab8df/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3962336231636636333231303430666139313063306331633333356235626131)](https://www.codacy.com/app/zibios/wrike-php-library)[![Code Climate Maintainability](https://camo.githubusercontent.com/3fffec67da5de3ac549d6b7b9ea82d8fc280b20ee793127be5ea8faf82e1d176/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f37333738336163663530333761393335633963382f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/zibios/wrike-php-library/maintainability)

**Branch 'master'**

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e4c4260666eeb9c3311046e7629cac29510069462abc1cd27a17c0e8453bb1bb/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7a6962696f732f7772696b652d7068702d6c6962726172792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/zibios/wrike-php-library/?branch=master)[![Scrutinizer Build Status](https://camo.githubusercontent.com/7a12f423b469d6af743ffb5e59269836f65b9ccc169d20abcfeddbf0e42333d5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7a6962696f732f7772696b652d7068702d6c6962726172792f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/zibios/wrike-php-library/build-status/master)[![Scrutinizer Code Coverage](https://camo.githubusercontent.com/eb63e812cb923a4ec653c07157652ab6fbcf736089971db1d599e7f7c23c8b05/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7a6962696f732f7772696b652d7068702d6c6962726172792f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/zibios/wrike-php-library/?branch=master)[![Travis Build Status](https://camo.githubusercontent.com/0f6200be37f4ac2f8736593ac26d83d1ae18c1ca67f6b57c537098965ae32b59/68747470733a2f2f7472617669732d63692e6f72672f7a6962696f732f7772696b652d7068702d6c6962726172792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/zibios/wrike-php-library)[![StyleCI](https://camo.githubusercontent.com/dd20df408e393a3170012f6a6f5c445ae57a934f8a6232a18b37ed97d53c98bc/68747470733a2f2f7374796c6563692e696f2f7265706f732f38303939323137392f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/80992179)[![Coverage Status](https://camo.githubusercontent.com/3162f2c425860e397fb4d14d5437418f06407d4daec1331ab996d6b38074ba00/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7a6962696f732f7772696b652d7068702d6c6962726172792f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/zibios/wrike-php-library?branch=master)

Installation
------------

[](#installation)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require zibios/wrike-php-library "^3.0"
```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Contribution
------------

[](#contribution)

To try it yourself clone the repository:

```
git clone git@github.com:zibios/wrike-php-library.git
cd wrike-php-library
```

and install dependencies with composer:

```
composer install
```

Run PHPUnit tests:

```
./vendor/bin/phpunit
```

Usage
-----

[](#usage)

All operations are immutable and stateless.

```
/**
 * Resources access methods
 */
$api = ApiFactory::create(); // @see zibios/wrike-php-sdk

$api->account()->getAll();
$api->account()->updateDefault($params);

$api->attachments()->getAll();
$api->attachments()->getAllForFolder($folderId);
$api->attachments()->getAllForTask($taskId);
$api->attachments()->getById($attachmentId);
$api->attachments()->getByIds([$attachmentId]);
$api->attachments()->update($attachmentId, $params);
$api->attachments()->uploadForFolder($attachmentId, $params);
$api->attachments()->uploadForTask($attachmentId, $params);
$api->attachments()->delete($attachmentId);
$api->attachments()->download($attachmentId);
$api->attachments()->downloadPreview($attachmentId);
$api->attachments()->getPublicUrl($attachmentId);

$api->colors()->getAll();

$api->comments()->getAll();
$api->comments()->getAllForFolder($folderId);
$api->comments()->getAllForTask($taskId);
$api->comments()->getById($commentId);
$api->comments()->getByIds([$commentId]);
$api->comments()->update($commentId, $params);
$api->comments()->createForFolder($folderId, $params);
$api->comments()->createForTask($taskId, $params);
$api->comments()->delete($commentId);

$api->contacts()->getAll();
$api->contacts()->getById($contactId);
$api->contacts()->getByIds([$contactId]);
$api->contacts()->update($contactId, $params);

$api->customFields()->getAll();
$api->customFields()->getById($customFieldId);
$api->customFields()->getByIds([$customFieldId]);
$api->customFields()->update($customFieldId, $params);
$api->customFields()->create($params);

$api->dependencies()->getAllForTask($taskId);
$api->dependencies()->getById($dependencyId);
$api->dependencies()->getByIds([$dependencyId]);
$api->dependencies()->update($dependencyId, $params);
$api->dependencies()->createForTask($taskId, $params);
$api->dependencies()->delete($dependencyId);

$api->folders()->getAll();
$api->folders()->getAllForFolder($folderId);
$api->folders()->getById($folderId);
$api->folders()->getByIds([$folderId]);
$api->folders()->update($folderId, $params);
$api->folders()->createForFolder($folderId, $params);
$api->folders()->copy($folderId, $params);
$api->folders()->delete($folderId);

$api->groups()->getAll();
$api->groups()->getById($groupId);
$api->groups()->update($groupId, $params);
$api->groups()->create($params);
$api->groups()->delete($groupId);

$api->ids()->getAll($params); // $params required

$api->invitations()->getAll();
$api->invitations()->update($invitationId, $params);
$api->invitations()->create($params);
$api->invitations()->delete($invitationId);

$api->tasks()->getAll();
$api->tasks()->getAllForFolder($folderId);
$api->tasks()->getById($taskId);
$api->tasks()->getByIds([$taskId]);
$api->tasks()->update($taskId, $params);
$api->tasks()->createForFolder($folderId, $params);
$api->tasks()->delete($taskId);

$api->timelogs()->getAll();
$api->timelogs()->getAllForFolder($folderId);
$api->timelogs()->getAllForTask($taskId);
$api->timelogs()->getAllForContact($contactId);
$api->timelogs()->getAllForTimelogCategory($timelogCategoryId);
$api->timelogs()->getById($timelogId);
$api->timelogs()->update($timelogId, $params);
$api->timelogs()->createForTask($taskId, $params);
$api->timelogs()->delete($timelogId);

$api->timelogCategories()->getAll();

$api->users()->getById($userId);
$api->users()->update($userId, $params);

$api->version()->getAll();

$api->workflows()->getAll();
$api->workflows()->update($workflowId, $params);
$api->workflows()->create($params);
```

```
/**
 * Params normalizer
 */
$params = $api->normalizeParams([
    'foo' => 'test',
    'bar' => ['test' => 'test'],
]);

// Array
// (
//     [foo] => test
//     [bar] => {"test":"test"}
// )
```

```
/**
 * Basic API usage
 */
$params = $api->normalizeParams([
    'fields' => ['metadata'],
    'metadata' => ['key' => 'importantMetadataKey'],
]);
$allContacts = $api->contacts()->getAll($params);

$params = $api->normalizeParams([
    'metadata' => [
        [
            'key' => 'metadataKey',
            'value' => 'metadataValue',
        ]
    ],
]);
$updatedContact = $api->contacts()->update($contactId, $params);
```

```
/**
 * Upload Attachment Request require two params: resource and name
 */
$params = $api->normalizeParams([
    'resource' => fopen(__FILE__, 'rb'),
    'name' => 'name.png',
]);
$updatedContact = $api->attachments()->uploadForFolder($folderId, $params);
$updatedContact = $api->attachments()->uploadForTask($taskId, $params);

/**
 * Download Attachment Requests returns none transformed Psr\Http\Message\ResponseInterface
 */
$response = $api->attachments()->download($attachmentId);
$response = $api->attachments()->downloadPreview($attachmentId);
```

```
/**
 * Advanced API usage
 *
 * $api->recreateForNew*() - returns new Api instance
 */
$api = ApiFactory::create(); // @see zibios/wrike-php-sdk

$newApi = $api->recreateForNewAccessToken();

$responseTransformer = new RawResponseTransformer();
$newApi = $api->recreateForNewResponseTransformer($responseTransformer);

$apiExceptionTransformer = new RawExceptionTransformer();
$newApi = $api->recreateForNewApiExceptionTransformer($apiExceptionTransformer);
```

Response transformers
---------------------

[](#response-transformers)

Response can be returned in various formats according to used response transformer

TransformerResponseCommentPsrResponseTransformerPsr\\Http\\Message\\ResponseInterfacePSR responsePsrBodyTransformerPsr\\Http\\Message\\StreamInterfacePSR response bodyStringBodyTransformerJSON stringPSR response body casted to JSON stringArrayBodyTransformerarrayPSR response body casted to arrayResponseModelTransformerResponseModelInterfacecheck [Response transformer plugin](https://github.com/zibios/wrike-php-jmsserializer)ResourceModelTransformerResourceModelInterfacecheck [Response transformer plugin](https://github.com/zibios/wrike-php-jmsserializer)ENUM's
------

[](#enums)

**Zibios\\WrikePhpLibrary\\Enum\\Api**

- RequestMethodEnum
- RequestPathFormatEnum
- ResourceMethodEnum
- ResponseFormatEnum

**namespace Zibios\\WrikePhpLibrary\\Enum**

- AttachmentPreviewSizeEnum
- AttachmentTypeEnum
- CustomFieldAggregationEnum
- CustomFieldCurrencyEnum
- CustomFieldInheritanceTypeEnum
- CustomFieldTypeEnum
- CustomStatusColorEnum
- DependencyRelationTypeEnum
- InvitationStatusEnum
- LegacyEntityTypeEnum
- OptionalFieldEnum
- ProjectStatusEnum
- RescheduleModeEnum
- ScopeEnum
- SubscriptionTypeEnum
- TaskDatesTypeEnum
- TaskImportanceEnum
- TaskStatusEnum
- TreeScopeEnum
- UserRoleEnum
- UserTypeEnum
- WeekDayEnum

Breaking Changes
----------------

[](#breaking-changes)

**V2.x due to changes in Wrike API V4**

RequestReplacement / Description$api-&gt;getAccountResource()-&gt;getAll();Now returns only one (current) account$api-&gt;getAccountResource()-&gt;getById($accountId);Removed$api-&gt;getAccountResource()-&gt;update($accountId, $params);$api-&gt;getAccountResource()-&gt;updateDefault($params);$api-&gt;getAttachmentResource()-&gt;getAllForAccount($accountId);$api-&gt;getAttachmentResource()-&gt;getAll();$api-&gt;getCommentResource()-&gt;getAllForAccount($accountId);$api-&gt;getCommentResource()-&gt;getAll();$api-&gt;getContactResource()-&gt;getAllForAccount($accountId);$api-&gt;getContactResource()-&gt;getAll();$api-&gt;getCustomFieldResource()-&gt;getAllForAccount($accountId);$api-&gt;getCustomFieldResource()-&gt;getAll();$api-&gt;getCustomFieldResource()-&gt;createForAccount($accountId, $params);$api-&gt;getCustomFieldResource()-&gt;create($params);$api-&gt;getFolderResource()-&gt;getAllForAccount($accountId);$api-&gt;getFolderResource()-&gt;getAll();$api-&gt;getGroupResource()-&gt;getAllForAccount($accountId);$api-&gt;getGroupResource()-&gt;getAll();$api-&gt;getGroupResource()-&gt;createForAccount($accountId, $params);$api-&gt;getGroupResource()-&gt;create($params);$api-&gt;getInvitationResource()-&gt;getAllForAccount($accountId);$api-&gt;getInvitationResource()-&gt;getAll();$api-&gt;getInvitationResource()-&gt;createForAccount($accountId, $params);$api-&gt;getInvitationResource()-&gt;create($params);$api-&gt;getTaskResource()-&gt;getAllForAccount($accountId);$api-&gt;getTaskResource()-&gt;getAll();$api-&gt;getTimelogResource()-&gt;getAllForAccount($accountId);$api-&gt;getTimelogResource()-&gt;getAll();$api-&gt;getWorkflowResource()-&gt;getAllForAccount($accountId);$api-&gt;getWorkflowResource()-&gt;getAll();$api-&gt;getWorkflowResource()-&gt;createForAccount($accountId, $params);$api-&gt;getWorkflowResource()-&gt;create($params);**V3.x due to refactoring for PHP &gt;=7.1**

- ArrayTransformer for Client JSON response is removed, only PSR response is accepted
- Strict types for method params and responses

Deprecated methodsNew methods$api-&gt;getAccountResource();$api-&gt;account();$api-&gt;getAttachmentResource();$api-&gt;attachments();$api-&gt;getColorResource();$api-&gt;colors();$api-&gt;getCommentResource();$api-&gt;comments();$api-&gt;getContactResource();$api-&gt;contacts();$api-&gt;getCustomFieldResource();$api-&gt;customFields();$api-&gt;getDependencyResource();$api-&gt;dependencies();$api-&gt;getFolderResource();$api-&gt;folders();$api-&gt;getGroupResource();$api-&gt;groups();$api-&gt;getIdResource();$api-&gt;ids();$api-&gt;getInvitationResource();$api-&gt;invitations();$api-&gt;getTaskResource();$api-&gt;tasks();$api-&gt;getTimelogResource();$api-&gt;timelogs();$api-&gt;getTimelogCategoryResource();$api-&gt;timelogCategories();$api-&gt;getUserResource();$api-&gt;users();$api-&gt;getVersionResource();$api-&gt;version();$api-&gt;getWorkflowResource();$api-&gt;workflows();Reference
---------

[](#reference)

**Internal**

Full configured [Wrike PHP SDK](https://github.com/zibios/wrike-php-sdk)

Full configured [Symfony bundle](https://github.com/zibios/wrike-bundle) based on Wrike PHP SDK

[Response transformer plugin](https://github.com/zibios/wrike-php-jmsserializer) for Wrike PHP Library

[HTTP Client plugin](https://github.com/zibios/wrike-php-guzzle) for Wrike PHP Library

**External**

Official [Wrike API Documentation](https://developers.wrike.com/documentation/api/overview)

[PSR Naming Conventions](http://www.php-fig.org/bylaws/psr-naming-conventions/)

Package general architecture inspired by [mpclarkson/freshdesk-php-library](https://github.com/mpclarkson/freshdesk-php-library)

License
-------

[](#license)

This bundle is available under the [MIT license](LICENSE).

###  Health Score

33

—

LowBetter than 74% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 98.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~120 days

Recently: every ~143 days

Total

6

Last Release

2774d ago

Major Versions

v0.1.0 → v1.0.02018-02-25

v1.0.0 → v2.x-dev2018-10-01

v1.x-dev → v3.x-dev2018-10-03

PHP version history (3 changes)v0.0.2PHP &gt;=5.5

v2.x-devPHP &gt;=5.5,&lt;7.2

v3.x-devPHP &gt;=7.1,&lt;7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/f8b0700934d169687d5fe078f40c5a67fc92964e57418d4619e02a32d69c8af6?d=identicon)[zibios](/maintainers/zibios)

---

Top Contributors

[![zibios](https://avatars.githubusercontent.com/u/6773684?v=4)](https://github.com/zibios "zibios (75 commits)")[![stickler-ci](https://avatars.githubusercontent.com/u/16011037?v=4)](https://github.com/stickler-ci "stickler-ci (1 commits)")

---

Tags

api-clientphppsrpsr-7restwrikewrike-php-librarywrike-php-sdkhttpphpapiclientsdkrestlibrarywrikewrike.com

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zibios-wrike-php-library/health.svg)

```
[![Health](https://phpackages.com/badges/zibios-wrike-php-library/health.svg)](https://phpackages.com/packages/zibios-wrike-php-library)
```

###  Alternatives

[arhitector/yandex

PHP SDK для работы с некоторыми сервисами яндекса (Яндекс.Диск, Yandex.Disk)

13082.9k5](/packages/arhitector-yandex)[huaweicloud/huaweicloud-sdk-php

Huawei Cloud SDK for PHP

1829.2k2](/packages/huaweicloud-huaweicloud-sdk-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
