hyperplural / ohmywishes
SDK for the public Ohmywishes API
v0.1.1
2026-06-14 22:19 UTC
Requires
- php: >=8.1
- ext-curl: *
- ext-json: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^1.12
- phpunit/phpunit: ^10.5
- rector/rector: ^1.2
This package is auto-updated.
Last update: 2026-06-15 08:34:40 UTC
README
Unofficial PHP SDK for Ohmywishes.
This project is not affiliated with Ohmywishes and is not maintained by them.
Installation
composer require hyperplural/ohmywishes
Quick Start
<?php declare(strict_types=1); use Hyperplural\Ohmywishes\Auth\StaticTokenProvider; use Hyperplural\Ohmywishes\Client\ClientConfig; use Hyperplural\Ohmywishes\Client\OhMyWishesClient; $client = new OhMyWishesClient( new ClientConfig(), new StaticTokenProvider('your-access-token'), ); $profile = $client->users()->self(); echo $profile->fullName;
If you want to resolve Cloudflare captcha tokens lazily, pass a callback when creating the auth service:
$client->auth(function (string $purpose, array $context): string { return getCaptchaTokenSomehow($purpose, $context); })->requestPhoneNumberConfirmationCode('+79990000000');
If you need raw HTTP payloads instead of DTOs:
$response = $client->raw()->request('GET', '/api/v3/client'); $payload = $response->json();
To customize HTTP behavior, pass Guzzle options through ClientConfig or inject your own PSR-18 client and PSR-17 factories into GuzzleTransport:
use Hyperplural\Ohmywishes\Client\ClientConfig; use Hyperplural\Ohmywishes\Client\OhMyWishesClient; $client = new OhMyWishesClient( new ClientConfig( guzzleOptions: [ 'timeout' => 10, 'proxy' => 'http://127.0.0.1:8080', ], ), );
Documentation
docs/README.md- documentation entry pointdocs/v2.md-v2APIdocs/v3.md-v3APIdocs/public.md- public status APIdocs/api-spec.md- appendix with notes, normalization, and DTO observations
Credits
- Ohmywishes for the product and the public HTTP surface this SDK mirrors.
- The favicon used in this README comes from the public Ohmywishes site favicon.
- The HTTP layer is built on Guzzle and PSR-18/17 interfaces.
Support & Contact
For support, questions, or coordination:
- Telegram: @hyperplural
License
MIT. See LICENSE.