{"id":25824521,"url":"https://github.com/theimpossibleastronaut/writeas.php","last_synced_at":"2025-09-07T00:37:48.503Z","repository":{"id":57068065,"uuid":"261534135","full_name":"theimpossibleastronaut/writeas.php","owner":"theimpossibleastronaut","description":"Basic implementation of the write.as / write.freely api in PHP","archived":false,"fork":false,"pushed_at":"2020-06-07T13:44:31.000Z","size":42,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-26T13:46:35.006Z","etag":null,"topics":["api","api-client","php","writeas","writefreely"],"latest_commit_sha":null,"homepage":null,"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/theimpossibleastronaut.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":"2020-05-05T17:04:36.000Z","updated_at":"2024-04-12T14:55:51.000Z","dependencies_parsed_at":"2022-08-24T10:20:10.757Z","dependency_job_id":null,"html_url":"https://github.com/theimpossibleastronaut/writeas.php","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theimpossibleastronaut%2Fwriteas.php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theimpossibleastronaut%2Fwriteas.php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theimpossibleastronaut%2Fwriteas.php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theimpossibleastronaut%2Fwriteas.php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theimpossibleastronaut","download_url":"https://codeload.github.com/theimpossibleastronaut/writeas.php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241153683,"owners_count":19918846,"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","api-client","php","writeas","writefreely"],"created_at":"2025-02-28T12:52:52.869Z","updated_at":"2025-02-28T12:52:53.447Z","avatar_url":"https://github.com/theimpossibleastronaut.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![PHP Composer](https://github.com/theimpossibleastronaut/writeas.php/workflows/PHP%20Composer/badge.svg)\n![PHP Stan](https://github.com/theimpossibleastronaut/writeas.php/workflows/PHP%20Stan/badge.svg)\n[![License](https://poser.pugx.org/theimpossibleastronaut/writeas.php/license)](https://packagist.org/packages/theimpossibleastronaut/write.as)\n[![Latest Stable Version](https://poser.pugx.org/theimpossibleastronaut/writeas.php/v/stable)](https://packagist.org/packages/theimpossibleastronaut/write.as)\n[![Latest Unstable Version](https://poser.pugx.org/theimpossibleastronaut/writeas.php/v/unstable)](https://packagist.org/packages/theimpossibleastronaut/write.as)\n\n# writeas.php\nImplementation of the write.as API in PHP.\n\nIt's very basic, and PHP 7.x oriented, but should work on most versions as it's\nonly clear dependency is curl.\n\n```php\n\u003c?php\nrequire_once( \"lib/writeas.php\" );\n```\n\nOr use composer:\n\n```bash\ncomposer require theimpossibleastronaut/writeas.php\n```\n\n```php\n\u003c?php\nrequire __DIR__ . '/vendor/autoload.php';\n```\n\nThen check one of the examples!\n\n```php\nrequire_once( \"../lib/writeas.php\" );\n\n$context = new \\writeas\\Context();\n$post = new Post( $context );\n$post-\u003ebody = \"Hello from Writeas.php\";\n$post-\u003esave();\n```\n\nThe Context is your livelyhood for communicating with the instance you specify in its constructor. It handles the building of requests and updating of object instances.\n\nIf you work with Anonymous data like Posts, it's important that you save the returned token that you get after initially saving your Post (otherwise you'll be unable to update the post).\n\nObjects like Post or Collection will update automagically after calling a save/get function. For instance, if you -\u003esave a Post, it's token will appear in -\u003etoken.\n\nAuthentication is done on the Context (use multiple contexts if you want to authenticate multiple users). Upon logging in you should store the access token for future sessions. Logout when needed, and don't keep tokens lying around.\n\nAll errors are transformed to catchable WAException objects.\n\n# Supports the following api endpoints (near) completely\n\n- [x] Authentication\n- [x] Posts\n- [x] Collections\n- [x] Users\n- [x] Channels\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheimpossibleastronaut%2Fwriteas.php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheimpossibleastronaut%2Fwriteas.php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheimpossibleastronaut%2Fwriteas.php/lists"}