{"id":23522140,"url":"https://github.com/sharapov-outsource/odds-converter","last_synced_at":"2025-04-19T19:44:04.579Z","repository":{"id":57048998,"uuid":"91189400","full_name":"sharapov-outsource/odds-converter","owner":"sharapov-outsource","description":"Convert odds between american, decimal, and fractional formats","archived":false,"fork":false,"pushed_at":"2017-05-16T13:53:36.000Z","size":4,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-13T16:34:19.325Z","etag":null,"topics":["conversion","formulas","odds","php","sports"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sharapov-outsource.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":"2017-05-13T16:57:05.000Z","updated_at":"2023-12-16T22:17:01.000Z","dependencies_parsed_at":"2022-08-23T19:10:26.339Z","dependency_job_id":null,"html_url":"https://github.com/sharapov-outsource/odds-converter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharapov-outsource%2Fodds-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharapov-outsource%2Fodds-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharapov-outsource%2Fodds-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharapov-outsource%2Fodds-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharapov-outsource","download_url":"https://codeload.github.com/sharapov-outsource/odds-converter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231260766,"owners_count":18349461,"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":["conversion","formulas","odds","php","sports"],"created_at":"2024-12-25T17:15:26.716Z","updated_at":"2024-12-25T17:15:27.309Z","avatar_url":"https://github.com/sharapov-outsource.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Odds Converter\n======================\n\nConvert odds between american, decimal, and fractional formats\n\nInstallation\n------------\n\nYou can either get the files from GIT or you can install the library via [Composer](getcomposer.org). To use Composer, simply add the following to your `composer.json` file.\n\n```json\n{\n    \"require\": {\n        \"sharapov/odds-converter\": \"1.01\"\n    }\n}\n```\n\nHow to use it?\n--------------\n\n```php\nrequire_once \"../vendor/autoload.php\";\n\n$converter = new \\Sharapov\\OddsConverter\\OddsConverter($odd);\n```\n\nSet up your input odd in the decimal, fractional or moneyline (US) format\n\n#### Set moneyline (US) input\n```php\n$converter-\u003esetOdd('275');\n```\n\n##### Get fractional\n```php\nprint $converter-\u003egetFractional(); // 11/4\n```\n\n##### Get decimal\n```php\nprint $converter-\u003egetDecimal(); // 3.75\n```\n\n\n#### Set fractional input\n```php\n$converter-\u003esetOdd('11/4');\n```\n\n##### Get moneyline (US)\n```php\nprint $converter-\u003egetMoneyline(); // 275\n```\n\n##### Get decimal\n```php\nprint $converter-\u003egetDecimal(); // 3.75\n```\n\n#### Set decimal input\n```php\n$converter-\u003esetOdd('3.75');\n```\n\n##### Get moneyline (US)\n```php\nprint $converter-\u003egetMoneyline(); // 275\n```\n\n##### Get fractional\n```php\nprint $converter-\u003egetFractional(); // 11/4\n```\n\nThat's so easy","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharapov-outsource%2Fodds-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharapov-outsource%2Fodds-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharapov-outsource%2Fodds-converter/lists"}