{"id":15296198,"url":"https://github.com/johansatge/workflowy-php","last_synced_at":"2025-04-09T18:19:56.519Z","repository":{"id":24282597,"uuid":"27677326","full_name":"johansatge/workflowy-php","owner":"johansatge","description":"💡 Unofficial WorkFlowy API written in PHP.","archived":false,"fork":false,"pushed_at":"2021-03-11T13:59:54.000Z","size":83,"stargazers_count":139,"open_issues_count":4,"forks_count":16,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-09T18:19:48.391Z","etag":null,"topics":["api","php","workflowy"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"xupefei/Locale-Emulator","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johansatge.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-07T17:02:41.000Z","updated_at":"2025-02-18T19:54:51.000Z","dependencies_parsed_at":"2022-07-10T10:46:17.513Z","dependency_job_id":null,"html_url":"https://github.com/johansatge/workflowy-php","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johansatge%2Fworkflowy-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johansatge%2Fworkflowy-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johansatge%2Fworkflowy-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johansatge%2Fworkflowy-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johansatge","download_url":"https://codeload.github.com/johansatge/workflowy-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085324,"owners_count":21045139,"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","php","workflowy"],"created_at":"2024-09-30T18:09:43.617Z","updated_at":"2025-04-09T18:19:56.487Z","avatar_url":"https://github.com/johansatge.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Version](https://img.shields.io/packagist/v/johansatge/workflowy-php.svg)\n\n![WorkflowyPHP](logo.png)\n\nAn unofficial WorkFlowy API written in PHP.\n\n---\n\n* [Disclaimer](#disclaimer)\n* [Installation](#installation)\n* [Usage](#usage)\n  * [Login API](#login-api)\n  * [Lists API](#lists-api)\n    * [Get the informations of a list](#get-the-informations-of-a-list)\n    * [Edit the informations of a list](#edit-the-informations-of-a-list)\n  * [Account API](#account-api)\n* [Changelog](#changelog)\n* [License](#license)\n* [Credits](#credits)\n\n## Disclaimer\n\nThe aim of the API is to keep things simple. Please keep in mind that it is an unofficial tool, and it may stop working at any time.\n\nSo, I strongly recommend you not to manipulate sensitive data with this API, and be sure to make regular backups of your lists.\n\n## Installation\n\nBy using [Composer](https://getcomposer.org/):\n\n```json\n{\n    \"require\": {\n        \"johansatge/workflowy-php\": \"0.1\"\n    }\n}\n```\n\nIf you do not use Composer, you can download the source files, install them anywhere on your project, and call the providden autoloader file:\n\n```php\n\u003c?php require_once '/your/project/root/path/workflowy-php/src/autoload.php';\n```\n\n## Usage\n\n### Login API\n\nBecause of the unofficial status of the API, you have to login first, by using your regular credentials, before being able to perform requests on your data.\n\n```php\nuse WorkFlowyPHP\\WorkFlowy;\nuse WorkFlowyPHP\\WorkFlowyException;\ntry\n{\n    $session_id = WorkFlowy::login('user@domain.org', 'password');\n}\ncatch (WorkFlowyException $e)\n{\n    var_dump($e-\u003egetMessage());\n}\n```\n\nThe `$session_id` variable will be used later, when performing requests.\n\nYou have to use your unencoded password in your code.\nSo I strongly advise you to store it in a different file, or ask it once to the user, then store the session ID. (But keep in mind that the session does not last forever.)\nThis is a huge limitation, but for now there is no workaround.\n\n### Lists API\n\nLists-related stuff is managed with the recursive `WorkFlowySublist` class.\n\nFirst, you will need to get the main (root) list.\n\n```php\nuse WorkFlowyPHP\\WorkFlowyList;\n\n$list_request = new WorkFlowyList($session_id);\n$list = $list_request-\u003egetList();\n```\n\nThen, you will be able to perform the following operations on the resulting `$list`, or its sublists.\n\n#### Get the informations of a list\n\n| Function | Returns | Description |\n| --- | --- | --- |\n| `$list-\u003egetID();` | `string` | Get the ID of the list |\n| `$list-\u003egetName();` | `string` | Get the name of the list |\n| `$list-\u003egetDescription();` | `string` | Get the description of the list |\n| `$list-\u003egetParent();` | `WorkFlowySublist` | Get the parent of the list |\n| `$list-\u003eisComplete();` | `boolean` | Get the status of the list |\n| `$list-\u003egetCompletedTime();` | `int` | Get the completed time of the list (Unix timestamp) |\n| `$list-\u003egetLastModifiedTime();` | `int` | Get the last modified time of the list (Unix timestamp) |\n| `$list-\u003egetOPML();` | `string` | Get the list and its sublists as an OPML string |\n| `$list-\u003egetSublists();` | `array` | Get the sublists of the list |\n| `$list-\u003esearchSublist('/My sublist name/');` | `WorkFlowySublist` | Returns the first child list matching the given name |\n| `$list-\u003esearchSublist('/My sublist name/', array('get_all' =\u003e true));` | `array` | Returns all children lists matching the given name |\n\n#### Edit the informations of a list\n\n| Function | Parameters | Description |\n| --- | --- | --- |\n| `$list-\u003esetName('My sublist');` | `string` | Sets the list name |\n| `$list-\u003esetDescription('My sublist description');` | `string` | Sets the list description |\n| `$list-\u003esetParent($parent_list, 2);` | `WorkFlowySublist`,`int` | Sets the list parent and its position |\n| `$list-\u003esetComplete(true);` | `boolean` | Sets the list status |\n| `$list-\u003ecreateSublist('My sublist name', 'My sublist description', 9);` | `string`,`string`,`int` | Creates a sublist |\n\nThe methods below are used to edit data.\n\nKeep in mind that they will send requests to the server, but not update the existing variables.\n\nFor instance, if you change the parent of a list and call the getSublists() method on its old parent, the list will still be present in the resulting array.\n\n### Account API\n\n| Function | Returns | Description |\n| --- | --- | --- |\n| `$account_request = new WorkFlowyAccount($session_id);` | `WorkFlowyAccount` | Gets an account object |\n| `$account_request-\u003egetUsername();` | `string` | Gets his username |\n| `$account_request-\u003egetEmail();` | `string` | Gets his email address |\n| `$account_request-\u003egetTheme();` | `string` | Gets his selected theme |\n| `$account_request-\u003egetItemsCreatedInMonth();` | `int` | Gets the number of items created during the month |\n| `$account_request-\u003egetMonthlyQuota();` | `int` | Gets his monthly quota |\n| `$account_request-\u003egetRegistrationDate('d-m-Y');` | `string` | Gets his registration date\u003cbr\u003eLeave the format empty to use the default value ('Y-m-d H:i:s') |\n| `$account_request-\u003egetRegistrationDate('timestamp');` | `string` | Gets his registration time |\n\n## Changelog\n\n| Version | Date | Notes |\n| --- | --- | --- |\n| `0.2.3` | 2019-05-17 | Fix authentication process (#10) |\n| `0.2.2` | 2019-02-13 | Fix authentication process (#8) |\n| `0.2.1` | 2018-11-11 | Fix `getLastModifiedTime()` and `getCompletedTime()` methods\u003cbr\u003eInternal WorkFlowy API started returning timestamps in seconds |\n| `0.2.0` | 2018-07-21 | Fix `getItemsCreatedInMmonth()` method naming (renamed to `getItemsCreatedInMonth()`)\u003cbr\u003eUpdate documentation\u003cbr\u003eUpdate sample code |\n| `0.1.3` | 2017-02-28 | Add `$list-\u003egetCompletedTime()` \u0026 `$list-\u003egetLastModifiedTime()` methods (#5)\u003cbr\u003eFix OPML encoding (#4) |\n| `0.1.2` | 2016-06-26 | Fix `searchSublist`with `get_all` option ([@hirechrismeyers](https://github.com/hirechrismeyers)) |\n| `0.1.1` | 2015-08-25 | Fix case of filenames ([@citywill](https://github.com/citywill)) |\n| `0.1` | 2015-01-01 | Initial version |\n\n## License\n\nThis project is released under the [MIT License](LICENSE).\n\n## Credits\n\n* [WorkFlowy](http://workflowy.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohansatge%2Fworkflowy-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohansatge%2Fworkflowy-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohansatge%2Fworkflowy-php/lists"}