Skip to content

capKopper/Wrike-API

Repository files navigation

wrike-php-client

Definition of the Wrike API 3.0.

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 1.1.0
  • Build package: io.swagger.codegen.languages.PhpClientCodegen

Requirements

PHP 5.4.0 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/capKopper/Wrike-API.git"
    }
  ],
  "require": {
    "capKopper/Wrike-API": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/wrike-php-client/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth
Wrike\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure API key authorization: token
Wrike\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Wrike\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Wrike\Client\Api\DefaultApi();
$me = true; // bool | If present - only contact info of requesting user is returned
$metadata = "metadata_example"; // string | Metadata filter, exact match for metadata key or key-value pair
$fields = "fields_example"; // string | Json string array of optional fields to be included in the response model

try {
    $result = $api_instance->getContacts($me, $metadata, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getContacts: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://www.wrike.com/api/v3

Class Method HTTP request Description
DefaultApi getContacts GET /contacts
DefaultApi getContactsById GET /contacts/{contactId}
DefaultApi getFolders GET /folders
DefaultApi getFoldersFromFolderId GET /folders/{folderId}/folders
DefaultApi getTasks GET /tasks
DefaultApi getTasksById GET /tasks/{taskId}
DefaultApi getTimelogs GET /timelogs
DefaultApi getTimelogsForAccount GET /accounts/{accountId}/timelogs
DefaultApi getTimelogsForContact GET /contacts/{contactId}/timelogs
DefaultApi getTimelogsForFolder GET /folders/{folderId}/timelogs
DefaultApi getTimelogsForTask GET /tasks/{taskId}/timelogs
DefaultApi updateMyContact PUT /contacts/{contactId}

Documentation For Models

Documentation For Authorization

oauth

token

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages