{"id":28368329,"url":"https://github.com/tak-pesar/fruitcraft","last_synced_at":"2026-03-13T14:32:58.719Z","repository":{"id":295388458,"uuid":"989983120","full_name":"Tak-Pesar/FruitCraft","owner":"Tak-Pesar","description":"Complete management of your FruitCraft accounts","archived":false,"fork":false,"pushed_at":"2025-06-10T17:44:55.000Z","size":405,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-04T03:35:16.889Z","etag":null,"topics":["api","craft","fruit","fruitcraft","fruithack","fruitscript","game","hack","script"],"latest_commit_sha":null,"homepage":"","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/Tak-Pesar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-05-25T08:54:25.000Z","updated_at":"2025-06-12T15:25:38.000Z","dependencies_parsed_at":"2025-05-25T09:37:41.671Z","dependency_job_id":null,"html_url":"https://github.com/Tak-Pesar/FruitCraft","commit_stats":null,"previous_names":["tak-pesar/fruitcraft"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Tak-Pesar/FruitCraft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tak-Pesar%2FFruitCraft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tak-Pesar%2FFruitCraft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tak-Pesar%2FFruitCraft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tak-Pesar%2FFruitCraft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tak-Pesar","download_url":"https://codeload.github.com/Tak-Pesar/FruitCraft/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tak-Pesar%2FFruitCraft/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30468315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T11:00:43.441Z","status":"ssl_error","status_checked_at":"2026-03-13T11:00:23.173Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["api","craft","fruit","fruitcraft","fruithack","fruitscript","game","hack","script"],"created_at":"2025-05-29T04:10:26.695Z","updated_at":"2026-03-13T14:32:58.711Z","avatar_url":"https://github.com/Tak-Pesar.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FruitCraft\nComplete management of your FruitCraft accounts\n\n## Installation\n```bash\ncomposer require takpesar/fruitcraft\n```\nOr you can use the [`Phar`](./fruitcraft.phar)\n\n## Requirements\n\nThis package requires PHP 8.2 or later. Curl extensions require this package\n\n## Usage\n\n```php\n\u003c?php\n\nrequire __DIR__ . '/vendor/autoload.php';\n\nuse Tak\\FruitCraft\\Client;\n\nuse Tak\\FruitCraft\\Errors;\n\n# your restore key, you can get it from the game settings\n$restore_key = 'fight123456789';\n\n$passport = md5($restore_key);\n\n$session_path = __DIR__.DIRECTORY_SEPARATOR.$passport.'.txt';\n\n$client = new Client(passport : $passport);\n\n# Save it to use it later for load the plyer and set the $client-\u003eplayer\nif(file_exists($session_path)){\n    $client-\u003eplayer = unserialize(file_get_contents($session_path));\n} else {\n    $player = $client-\u003elogin($restore_key)-\u003edata;\n    echo 'Sign in as '.$player-\u003ename , PHP_EOL;\n}\n\nfile_put_contents($session_path,serialize($client-\u003eplayer));\n\n# You are now ready to use the implemented methods :)\n# for example ...\n\n$heroes = $client-\u003egetheroes();\n\n$ids = array_column($heroes,'base_card_id');\n\nforeach($ids as $id){\n    try {\n        var_dump($client-\u003eplayer_fillpotion(amount : 50));\n        var_dump($client-\u003ecards_potionize(hero_id : $id));\n    } catch(Errors $e){\n         if($e-\u003egetCode() === 400){\n            # ERROR_CODE_{$X} : 400 #\n            echo 'Error : ' , $client-\u003egeterrormessage($e-\u003egetValue()) , PHP_EOL;\n         } else {\n            echo 'Error : ' , strval($e) , PHP_EOL;\n         }\n    }\n}\n\n?\u003e\n```\n\n\u003e **Note**\n\u003e Please see [`examples`](./example) for more examples\n\n![Test 01](./example/Test-01.png)\n\n![Test 02](./example/Test-02.png)\n\n## Issues\n\nShould you encounter any issues, please do not hesitate to reach out to us via email at [`loser.man.2007@gmail.com`](mailto:loser.man.2007@gmail.com).\n\n## License\n\nThe MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftak-pesar%2Ffruitcraft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftak-pesar%2Ffruitcraft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftak-pesar%2Ffruitcraft/lists"}