{"id":25081792,"url":"https://github.com/rapideinternet/hellohi.apiclient.php","last_synced_at":"2025-04-01T09:43:09.529Z","repository":{"id":62515716,"uuid":"122974684","full_name":"rapideinternet/hellohi.apiclient.php","owner":"rapideinternet","description":"PHP Client for the MKA API","archived":false,"fork":false,"pushed_at":"2023-12-15T11:59:50.000Z","size":53,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-12-15T12:56:02.925Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rapideinternet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-02-26T13:35:34.000Z","updated_at":"2023-12-15T12:56:02.926Z","dependencies_parsed_at":"2025-02-07T05:19:44.816Z","dependency_job_id":"e072c08f-6d5c-4afb-9d02-ede51994d3b6","html_url":"https://github.com/rapideinternet/hellohi.apiclient.php","commit_stats":null,"previous_names":[],"tags_count":5,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapideinternet%2Fhellohi.apiclient.php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapideinternet%2Fhellohi.apiclient.php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapideinternet%2Fhellohi.apiclient.php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapideinternet%2Fhellohi.apiclient.php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rapideinternet","download_url":"https://codeload.github.com/rapideinternet/hellohi.apiclient.php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246620204,"owners_count":20806718,"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":[],"created_at":"2025-02-07T05:18:57.601Z","updated_at":"2025-04-01T09:43:09.508Z","avatar_url":"https://github.com/rapideinternet.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hellohi.apiclient\nPHP Client for the HelloHi API. This documentation uses the threads endpoint as example. For a a list of available endpionts, please refer to the client documentation. ##url-here-please##.\n\n## Setup\n```\nrequire_once __DIR__ . '/vendor/autoload.php'; \n\nuse ApiClient\\Client;\nuse ApiClient\\Model;\n\nClient::init(\n\t\"https://api.staging.hellohi.nl/v1/oauth/token\",\n\t\"https://api.staging.hellohi.nl/v1\",\n\t\"your-oauth-client-id\",\n\t\"your-oauth-your-secret\",\n\t\"you@yourcompany.com\",\n\t\"your-password\",\n\t\"your-tenant-id\"\n);\n```\n\n## get threads with creator includes\n```$threads = Model::all('threads', ['creator']);```\n\n## get all threads magic with creator includes\n```$threads = Model::threads(['creator']);```\n\n## find a thread by id static\n```$thread = Model::byId('threads', \"mjkvxl5qmwza68b9\");```\n\n## get thread items magic\n```$thread-\u003eall('items');```\n\n## get thread_items magic\n```$thread-\u003eitems; //$thread-\u003eitems();```\n\n## find a thread_item by id\n```$thread-\u003ebyId('items', \"mn9vlbrl4w8zjoqx\");```\n\n## get thread_items with includes\n```$items = $thread-\u003eitems(['participant', 'participant.person']);```\n    \n## create a thread\n```\n$thread-\u003ecreate('threads', [\n\t'subject' =\u003e 'Rapportage',\n\t'company_id' =\u003e 'kyd9nprax5lajbv3',\n\t'participants' =\u003e [\n\t\t[\n\t\t\t'person_id' =\u003e '8bkgjnrmdrz63pvd',\n\t\t\t'customer_id' =\u003e 'kyd9nprax5lajbv3',\n\t\t\t'is_admin' =\u003e 0\n\t\t]\n\t],\n\t'dossier_item_groups' =\u003e [\n\t\t[\n\t\t\t'dossier_item_group_template_id' =\u003e '8bkgjnrmdrz63pvd',\n\t\t\t'year' =\u003e 2017,\n\t\t\t'period' =\u003e 'q2'\n\t\t]\n\t],\n\t'message' =\u003e 'branker'\n]);\n```\n\n## update a thread\n```\n$thread = Model::byId('threads', \"kyd9nprax5lajbv3\");\n$thread-\u003eupdate([\n  'subject' =\u003e 'Some subject'\n]);\n```\n\n## update a thread message with endpoint override\nSometimes it is necessary to override endpoints when using polymorphic relations. For example. Thread messages are fetched using their polymorphic master class 'item' trough /threads/{id}/items, but updated using their own endpoint /threads/{id}/messages.\n\n```\n$thread-\u003eall('items')[0]\n  -\u003esetEndpoint('messages')\n  -\u003eupdate(['message' =\u003e 'Different message']);\n  ```\n\n\n## delete a thread\n```$thread-\u003edelete();```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapideinternet%2Fhellohi.apiclient.php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapideinternet%2Fhellohi.apiclient.php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapideinternet%2Fhellohi.apiclient.php/lists"}