{"id":37235998,"url":"https://github.com/prokerala/astrology-sdk","last_synced_at":"2026-01-16T04:52:00.302Z","repository":{"id":56665536,"uuid":"180379947","full_name":"prokerala/astrology-sdk","owner":"prokerala","description":"Prokerala.com Astrology API Client Library for PHP","archived":false,"fork":false,"pushed_at":"2025-11-25T03:45:33.000Z","size":803,"stargazers_count":25,"open_issues_count":1,"forks_count":19,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T14:49:38.352Z","etag":null,"topics":["api","astrology","php","prokerala"],"latest_commit_sha":null,"homepage":null,"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/prokerala.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":"2019-04-09T14:02:39.000Z","updated_at":"2025-12-10T13:53:27.000Z","dependencies_parsed_at":"2023-12-02T11:32:16.121Z","dependency_job_id":"ad4017e4-6043-4aaa-a889-116331a3490d","html_url":"https://github.com/prokerala/astrology-sdk","commit_stats":{"total_commits":242,"total_committers":8,"mean_commits":30.25,"dds":0.6694214876033058,"last_synced_commit":"58e432e012bc0808372e9b482c4ce9aa62b357b7"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/prokerala/astrology-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prokerala%2Fastrology-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prokerala%2Fastrology-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prokerala%2Fastrology-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prokerala%2Fastrology-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prokerala","download_url":"https://codeload.github.com/prokerala/astrology-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prokerala%2Fastrology-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28442357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","astrology","php","prokerala"],"created_at":"2026-01-15T04:05:43.795Z","updated_at":"2026-01-15T04:05:44.262Z","avatar_url":"https://github.com/prokerala.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Getting Started with Prokerala Astrology API\r\n\r\nProkerala Astrology SDK provides convenient access to Prokerala Astrology API for applications developed in PHP. [Prokerala API](https://api.prokerala.com) integration helps you generate custom [horoscope](https://api.prokerala.com/demo/kundli.php), perform [horoscope matching](https://api.prokerala.com/demo/kundli-matching.php), check [mangal dosha](https://api.prokerala.com/demo/mangal-dosha.php), [panchang](https://api.prokerala.com/demo/panchang.php) and [much more](https://api.prokerala.com/demo).\r\n\r\n\u003e We have open sourced the code for our [API demo](https://api.prokerala.com/demo/) at [prokerala/astrology-api-demo](https://github.com/prokerala/astrology-api-demo). \r\n\r\n## Requirements\r\n\r\nPHP needs to be a minimum version of PHP 8.0\r\n\r\n## Installation\r\n\r\n\u003e **If you prefer to work with the JSON response directly, please checkout our dependency free [minimal PHP Client example](https://github.com/prokerala/astrology-api-client-example/tree/master/php) that calls the API directly.**\r\n\r\n### Using composer (recommended)\r\n\r\nThis is the recommended method for installation of the SDK.\r\n\r\n#### Quick Installation\r\n\r\nIf you have `composer` already installed, and just want to get started quickly, the following command will install the SDK and its dependencies:\r\n\r\n```sh\r\ncomposer require prokerala/astrology-sdk:^1.0 nyholm/psr7 guzzlehttp/guzzle symfony/cache\r\n```\r\n\r\nThat's it. The SDK is now ready to use. You can skip to the **Usage** section below.\r\n\r\n#### Detailed Instructions\r\n\r\nIf you do not have `composer` already installed, you can install it with the following command on *nix systems.\r\n\r\n```sh\r\ncurl -sS https://getcomposer.org/installer | php\r\n```\r\n\r\nIf you are on Windows, follow the official documentation at [getcomposer.org](https://getcomposer.org/download/).\r\n\r\nThe current version of the SDK no longer ships with an HTTP client, instead depends on external implementations of `PSR-17` ([HTTP Message factory](https://www.php-fig.org/psr/psr-17/)) and `PSR-18` ([HTTP client](https://www.php-fig.org/psr/psr-18/)). You may choose any implementation of [PSR-17](https://packagist.org/providers/psr/http-factory-implementation) and [PSR-18](https://packagist.org/providers/php-http/client-implementation), for example, the following command installs `nyholm/psr7` for `PSR-17` and Guzzle HTTP client for `PSR-18`.\r\n\r\n```sh\r\ncomposer require nyholm/psr7 guzzlehttp/guzzle\r\n```\r\n\r\nOptionally, you can pass an implementation of `PSR-16` Simple Cache interface for caching the access token and responses. As before, you can choose any implementation of [PSR-16](https://packagist.org/providers/psr/simple-cache-implementation). The following command will install `symfony/cache`.\r\n\r\n```sh\r\ncomposer require symfony/cache\r\n```\r\n\r\n\r\nNow that you have all the dependencies installed, install the SDK by running the following command.\r\n\r\n```sh\r\ncomposer require prokerala/astrology-sdk:^1.0\r\n```\r\n\r\n### Manual Installation\r\n\r\nIf you are not using composer, download the latest release from the releases section. You should download the zip file. After that include autoload.php in your application and you can use the API as usual.\r\n\r\nFor further help, Please visit our [documentation](https://api.prokerala.com/docs)\r\n\r\n## Usage\r\n\r\nThis SDK is powering our API demo page. The source code of the demos are open source and available on a separate [GitHub repostiory](https://github.com/prokerala/astrology-api-demo).\r\n\r\n```php\r\n\u003c?php\r\n\r\nuse Prokerala\\Api\\Astrology\\Location;\r\nuse Prokerala\\Api\\Astrology\\Service\\MangalDosha;\r\nuse Prokerala\\Common\\Api\\Authentication\\Oauth2;\r\nuse Prokerala\\Common\\Api\\Client;\r\nuse Prokerala\\Common\\Api\\Exception\\QuotaExceededException;\r\nuse Prokerala\\Common\\Api\\Exception\\RateLimitExceededException;\r\n\r\n# Include composer autoloader\r\ninclude __DIR__.'/vendor/autoload.php';\r\n\r\n# Create the PSR-17 Factory. The following line creates a PSR-17 factory using\r\n# nyholm/psr7. If you are using a different implementation, update accordingly.\r\n$psr17Factory = new \\Nyholm\\Psr7\\Factory\\Psr17Factory();\r\n\r\n# Create the PSR-18 HTTP Client\r\n$httpClient = new \\GuzzleHttp\\Client();\r\n\r\n# Create the PSR-16 Cache. Even though the cache parameter is optional, it is\r\n# highly recommended to pass a cache to Oauth2, to improve performance.\r\n$cache = new \\Symfony\\Component\\Cache\\Psr16Cache(\r\n    new \\Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter()\r\n);\r\n\r\n$authClient = new Oauth2('YOUR_CLIENT_ID', 'YOUR_CLIENT_SECRET', $httpClient, $psr17Factory, $psr17Factory, $cache);\r\n\r\n$client = new Client($authClient, $httpClient, $psr17Factory);\r\n$input = [\r\n    'datetime' =\u003e '1967-08-29T09:00:00+05:30',\r\n    'latitude' =\u003e '19.0821978',\r\n    'longitude' =\u003e '72.7411014', // Mumbai\r\n];\r\n\r\n$datetime = new DateTime($input['datetime']);\r\n$tz = $datetime-\u003egetTimezone();\r\n\r\n$location = new Location($input['latitude'], $input['longitude'], 0, $tz);\r\n\r\ntry {\r\n    $method = new MangalDosha($client);\r\n    $result = $method-\u003eprocess($location, $datetime);\r\n\r\n    $mangalDoshaResult = [\r\n        'has_mangal_dosha' =\u003e $result-\u003ehasDosha(),\r\n        'description' =\u003e $result-\u003egetDescription(),\r\n    ];\r\n\r\n    print_r($mangalDoshaResult);\r\n} catch (QuotaExceededException $e) {\r\n} catch (RateLimitExceededException $e) {\r\n}\r\n\r\n```\r\n\r\nPlease check out our [API Demo](https://api.prokerala.com/demo) for a sample implementation using the SDK. The source code for the demo is available under the GitHub repository [prokerala/astrology-api-demo](https://github.com/prokerala/astrology-api-demo).\r\n\r\n## License\r\n\r\nCopyright \u0026copy; 2019-2022 [Ennexa Technologies Private Limited](https://www.ennexa.com). The Prokerala [Astrology](https://www.prokerala.com/astrology/) API PHP SDK is released under the [MIT License](https://github.com/prokerala/astrology-sdk/blob/master/LICENSE).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprokerala%2Fastrology-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprokerala%2Fastrology-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprokerala%2Fastrology-sdk/lists"}