{"id":21561684,"url":"https://github.com/testmonitor/asana-client","last_synced_at":"2025-04-10T12:06:06.577Z","repository":{"id":36281514,"uuid":"223037397","full_name":"testmonitor/asana-client","owner":"testmonitor","description":"The TestMonitor Asana Client.","archived":false,"fork":false,"pushed_at":"2024-10-04T13:45:56.000Z","size":120,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-24T18:08:39.355Z","etag":null,"topics":["api","asana","client"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/testmonitor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-20T22:14:51.000Z","updated_at":"2024-10-04T13:46:01.000Z","dependencies_parsed_at":"2024-05-01T13:18:55.750Z","dependency_job_id":"4e386ee3-f887-438b-859d-672802ee6f91","html_url":"https://github.com/testmonitor/asana-client","commit_stats":{"total_commits":84,"total_committers":5,"mean_commits":16.8,"dds":0.5952380952380952,"last_synced_commit":"23bfca7b9e65506cc287ace6ebdb794edacda8bf"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fasana-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fasana-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fasana-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testmonitor%2Fasana-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testmonitor","download_url":"https://codeload.github.com/testmonitor/asana-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248216881,"owners_count":21066631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","asana","client"],"created_at":"2024-11-24T09:27:36.354Z","updated_at":"2025-04-10T12:06:06.561Z","avatar_url":"https://github.com/testmonitor.png","language":"PHP","readme":"# TestMonitor Asana Client\n\n[![Latest Stable Version](https://poser.pugx.org/testmonitor/asana-client/v/stable)](https://packagist.org/packages/testmonitor/asana-client)\n[![CircleCI](https://img.shields.io/circleci/project/github/testmonitor/asana-client.svg)](https://circleci.com/gh/testmonitor/asana-client)\n[![StyleCI](https://styleci.io/repos/223037397/shield)](https://styleci.io/repos/223037397)\n[![codecov](https://codecov.io/gh/testmonitor/asana-client/graph/badge.svg?token=MNI8M45RN1)](https://codecov.io/gh/testmonitor/asana-client)\n[![License](https://poser.pugx.org/testmonitor/asana-client/license)](https://packagist.org/packages/testmonitor/asana-client)\n\nThis package provides a very basic, convenient, and unified wrapper for the [Official Asana PHP client library](https://github.com/Asana/php-asana).\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Tests](#tests)\n- [Changelog](#changelog)\n- [Contributing](#contributing)\n- [Credits](#credits)\n- [License](#license)\n\n## Installation\n\nTo install the client you need to require the package using composer:\n\n\t$ composer require testmonitor/asana-client\n\nUse composer's autoload:\n\n```php\nrequire __DIR__.'/../vendor/autoload.php';\n```\n\nYou're all set up now!\n\n## Usage\n\nThis client only supports **oAuth authentication**. You'll need an Asana application to proceed. If you haven't done so,\nplease read up with the [Asana authentication docs](https://developers.asana.com/docs/#authentication-basics) on how\nto create an application.\n\nWhen your Asana application is up and running, start with the oAuth authorization:\n\n```php\n$oauth = [\n    'clientId' =\u003e '12345',\n    'clientSecret' =\u003e 'abcdef',\n    'redirectUrl' =\u003e 'https://redirect.myapp.com/',\n];\n\n$asana = new \\TestMonitor\\Asana\\Client($oauth);\n\nheader('Location: ' . $asana-\u003eauthorizationUrl('state'));\nexit();\n```\n\nThis will redirect the user to a page asking confirmation for your app getting access to Asana. Make sure your redirectUrl points\nback to your app. This URL should point to the following code:\n\n```php\n$oauth = [\n    'clientId' =\u003e '12345',\n    'clientSecret' =\u003e 'abcdef',\n    'redirectUrl' =\u003e 'https://redirect.myapp.com/',\n];\n\n$asana = new \\TestMonitor\\Asana\\Client($oauth);\n\n$token = $asana-\u003efetchToken($_REQUEST['code']);\n```\n\nWhen everything went ok, you should have an access token (available through Token object). It will be valid for **one hour**.\nAfter that, you'll have to refresh the token to regain access:\n\n```php\n$oauth = ['clientId' =\u003e '12345', 'clientSecret' =\u003e 'abcdef', 'redirectUrl' =\u003e 'https://redirect.myapp.com/'];\n$token = new \\TestMonitor\\Asana\\Token('eyJ0...', '0/34ccc...', 1574600877); // the token you got last time\n\n$asana = new \\TestMonitor\\Asana\\Client($oauth, $token);\n\nif ($token-\u003eexpired()) {\n    $newToken = $asana-\u003erefreshToken();\n}\n```\n\nThe new token will be valid again for the next hour.\n\n## Examples\n\nGet a list of Asana workspaces:\n\n```php\n$workspaces = $asana-\u003eworkspaces();\n```\n\nOr creating a task, for example (using a example project with gid 12345):\n\n```php\n$task = $asana-\u003ecreateTask(new \\TestMonitor\\Asana\\Resources\\Task([\n    'completed' =\u003e false,\n    'name' =\u003e 'Name of the task',\n    'notes' =\u003e 'Some notes',\n]), '12345');\n```\n\n## Tests\n\nThe package contains integration tests. You can run them using PHPUnit.\n\n    $ vendor/bin/phpunit\n\n## Changelog\n\nRefer to [CHANGELOG](CHANGELOG.md) for more information.\n\n## Contributing\n\nRefer to [CONTRIBUTING](CONTRIBUTING.md) for contributing details.\n\n## Credits\n\n* **Thijs Kok** - *Lead developer* - [ThijsKok](https://github.com/thijskok)\n* **Stephan Grootveld** - *Developer* - [Stefanius](https://github.com/stefanius)\n* **Frank Keulen** - *Developer* - [FrankIsGek](https://github.com/frankisgek)\n* **Muriel Nooder** - *Developer* - [ThaNoodle](https://github.com/thanoodle)\n\n## License\n\nThe MIT License (MIT). Refer to the [License](LICENSE.md) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestmonitor%2Fasana-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestmonitor%2Fasana-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestmonitor%2Fasana-client/lists"}