{"id":21571103,"url":"https://github.com/treblle/funxtion-php","last_synced_at":"2025-03-18T06:15:22.432Z","repository":{"id":233467541,"uuid":"704496177","full_name":"Treblle/funxtion-php","owner":"Treblle","description":"The SDK from Treblle Hacktoberfest 2023 for the Funxtion API","archived":false,"fork":false,"pushed_at":"2023-10-13T12:16:09.000Z","size":49,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-24T12:45:46.213Z","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/Treblle.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":"2023-10-13T11:37:29.000Z","updated_at":"2023-10-16T13:36:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"745e8f05-3a44-4cad-b1d7-4387be5450dd","html_url":"https://github.com/Treblle/funxtion-php","commit_stats":null,"previous_names":["treblle/funxtion-php"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Treblle%2Ffunxtion-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Treblle%2Ffunxtion-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Treblle%2Ffunxtion-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Treblle%2Ffunxtion-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Treblle","download_url":"https://codeload.github.com/Treblle/funxtion-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244166758,"owners_count":20409179,"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":"2024-11-24T11:14:53.363Z","updated_at":"2025-03-18T06:15:22.422Z","avatar_url":"https://github.com/Treblle.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Funxtion PHP SDK\n\n## Usage\n\n```php\n$funxtion = new \\Funxtion\\Funxtion(\n    token: '123123123',\n    url: '123123123',\n);\n\n// Get a list of exercises\n$funxtion-\u003eexercises()-\u003elist(\n    new \\Funxtion\\Filters\\WhereFilter(\n        key: 'name',\n        value: 'Steve',\n        operator: \\Funxtion\\Enums\\Operator::CONTAINS,\n    ),\n    new \\Funxtion\\Filters\\WhereFilter(\n        key: 'equipment',\n        value: '1,2',\n        operator: \\Funxtion\\Enums\\Operator::IN,\n    ),\n);\n```\n\n## Example Implementation\n\n```php\nuse Funxtion\\Funxtion;\nuse Funxtion\\ValueObjects\\ExerciseCollectionItem;\n\nclass FunxtionService\n{\n    public function __construct(\n        private readonly Funxtion $funxtion,\n    ) {}\n    \n    public function listExercise()\n    {\n        $response = $this-\u003efunxtion-\u003eexercises()-\u003elist();\n        \n        return array_map(\n            callback: fn (array $item) =\u003e ExerciseCollectionItem::fromArray(\n                data: $item,\n            ),\n            array: json_decode(\n                json: $response-\u003egetBody()-\u003egetContents(),\n                associative: true,\n                flags: JSON_THROW_ON_ERROR,\n            )['data'],\n        );\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreblle%2Ffunxtion-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftreblle%2Ffunxtion-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreblle%2Ffunxtion-php/lists"}