{"id":37003503,"url":"https://github.com/getjoystick/joystick-php","last_synced_at":"2026-01-14T00:33:46.989Z","repository":{"id":102148627,"uuid":"604548963","full_name":"getjoystick/joystick-php","owner":"getjoystick","description":"Use Joystick in PHP easily!","archived":false,"fork":false,"pushed_at":"2024-11-06T20:04:18.000Z","size":103,"stargazers_count":2,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-06T16:31:31.377Z","etag":null,"topics":["json-api","json-config","json-configuration","json-server","php-json","remote-config","remote-configuration"],"latest_commit_sha":null,"homepage":"https://www.getjoystick.com","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/getjoystick.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-02-21T09:45:35.000Z","updated_at":"2023-08-31T14:41:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"de75a5df-3092-4511-85aa-8c77b4d98c91","html_url":"https://github.com/getjoystick/joystick-php","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"7c3fd8f0ff52627f988c2e35cfbad74de0a4d859"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/getjoystick/joystick-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getjoystick%2Fjoystick-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getjoystick%2Fjoystick-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getjoystick%2Fjoystick-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getjoystick%2Fjoystick-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getjoystick","download_url":"https://codeload.github.com/getjoystick/joystick-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getjoystick%2Fjoystick-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["json-api","json-config","json-configuration","json-server","php-json","remote-config","remote-configuration"],"created_at":"2026-01-14T00:33:46.214Z","updated_at":"2026-01-14T00:33:46.973Z","avatar_url":"https://github.com/getjoystick.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP client for [Joystick](https://www.getjoystick.com/)\n\n[![GitHub Actions](https://github.com/getjoystick/joystick-php/actions/workflows/main.yml/badge.svg)](\u003c(https://github.com/getjoystick/joystick-php/actions?query=branch%3Amaster)\u003e)\n[![Latest Stable Version](https://poser.pugx.org/getjoystick/joystick-php/v/stable.svg)](https://packagist.org/packages/getjoystick/joystick-php)\n[![Total Downloads](https://poser.pugx.org/getjoystick/joystick-php/downloads.svg)](https://packagist.org/packages/getjoystick/joystick-php)\n[![License](https://poser.pugx.org/getjoystick/joystick-php/license.svg)](https://packagist.org/packages/getjoystick/joystick-php)\n\nThis is the library that simplifies the way how you can communicate with [Joystick API](https://docs.getjoystick.com/).\n\n## Requirements\n\nPHP 7.2 and later\n\n## Installation\n\nYou can install the package via [Composer](http://getcomposer.org/):\n\n```bash\ncomposer require getjoystick/joystick-php\n```\n\nWe will try to find the PSR-18 compatible HTTP client within your dependencies using\n[`php-http/discovery`](https://docs.php-http.org/en/latest/discovery.html), if you don't have one\ninstalled, just run this command to install\n[Guzzle HTTP client](https://docs.guzzlephp.org/en/stable/):\n\n```bash\ncomposer require guzzlehttp/guzzle\n```\n\n## Usage\n\nTo use the client, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):\n\n```php\nrequire_once 'vendor/autoload.php';\n```\n\nSimple usage looks like this:\n\n```php\n$config = \\Joystick\\ClientConfig::create()-\u003esetApiKey(getenv('JOYSTICK_API_KEY'));\n\n$client = \\Joystick\\Client::create($config);\n\n$getContentsResponse = $client-\u003egetContents(['content-id1', 'content-id2']);\n\n$getContentsResponse-\u003emyProperty1\n$getContentsResponse-\u003emyProperty2\n```\n\n### Requesting Content by single Content Id\n\n```php\n$getContentResponse = $client-\u003egetContent('content-id1');\n$getContentResponse-\u003emyProperty1\n```\n\n### Specifying additional parameters:\n\nWhen creating the `ClientConfig` object, you can specify additional parameters which will be used\nby all API calls from the client, for more details see\n[API documentation](https://docs.getjoystick.com/api-reference/):\n\n```php\n$config = \\Joystick\\ClientConfig::create()\n    -\u003esetApiKey(getenv('JOYSTICK_API_KEY'))\n    -\u003esetCacheExpirationSeconds(600) // 10 mins\n    -\u003esetSerialized(true)\n    -\u003esetParams([\n        'param1' =\u003e 'value1',\n        'param2' =\u003e 'value2',\n     ])\n     -\u003esetSemVer('0.0.1')\n     -\u003esetUserId('user-id-1');\n```\n\n### Options\n\n#### `fullResponse`\n\nIn most of the cases you will be not interested in the full response from the API, but if you're you can specify \n`fullResponse` option to the client methods. The client will return you raw API response:\n```php\n$getContentResponse = $client-\u003egetContent('content-id1', ['fullResponse' =\u003e true]);\n// OR\n$getContentsResponse = $client-\u003egetContents(['content-id1', 'content-id2'], ['fullResponse' =\u003e true]);\n```\n\n#### `serialized`\n\nWhen `true`, we will pass query parameter `responseType=serialized` \nto [Joystick API](https://docs.getjoystick.com/api-reference-combine/). \n\n```php\n$getContentResponse = $client-\u003egetContent('content-id1', ['serialized' =\u003e true]);\n// OR\n$getContentsResponse = $client-\u003egetContents(['content-id1', 'content-id2'], ['serialized' =\u003e true]);\n```\n\n#### `refresh`\n\nIf you want to ignore existing cache and request the new config – pass this option as `true`.\n\n```php\n$getContentResponse = $client-\u003egetContent('content-id1', ['refresh' =\u003e true]);\n// OR\n$getContentsResponse = $client-\u003egetContents(['content-id1', 'content-id2'], ['refresh' =\u003e true]);\n```\n\nThis option can be set for every API call from the client by setting `setSerialized(true)`:\n\n```php\n$config = \\Joystick\\ClientConfig::create()\n    -\u003esetApiKey(getenv('JOYSTICK_API_KEY'))\n    -\u003esetSerialized(true)\n```\n\n### Caching \n\nBy default, the client uses [array caching](https://packagist.org/packages/cache/array-adapter),\nwhich means that if you build the HTTP application where each process exits after the request \nhas been processed – the cache will be erased after the process is finished.\n\nYou can specify your [cache implementation which conforms PSR-16](https://packagist.org/providers/psr/simple-cache-implementation).\n\n\nSee [`examples/file-cache`](./examples/file-cache) for more details.\n\n#### Clear the cache\n\nIf you want to clear the cache – run `$client-\u003eclearCache()`.\n\n\u003e Note that we will call `clear()` on the PSR-16 interface.\n\u003e Make sure that you use different cache instances in different places of your app\n\n\n### HTTP Client\n\nIf you want to provide custom HTTP client, which may be useful for use-cases like specifying custom proxy,\ncollecting detailed metrics about HTTP requests,\n\nYou can specify your [HTTP client implementation which conforms PSR-18](https://packagist.org/providers/psr/simple-cache-implementation).\n\nSee [`examples/custom-http-client`](./examples/custom-http-client) for more details.\n\n## Testing\n\nTo run unit tests, just run:\n```bash\nphpunit\n```\n\n### Security\n\nIf you discover any security related issues, please email [letsgo@getjoystick.com](letsgo@getjoystick.com) \ninstead of using the issue tracker.\n\n## Credits\n\n- [Joystick](https://github.com/getjoystick)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT. Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetjoystick%2Fjoystick-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetjoystick%2Fjoystick-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetjoystick%2Fjoystick-php/lists"}