hyperplural/ohmywishes

SDK for the public Ohmywishes API

Maintainers

Package info

github.com/hyperplural/ohmywishes

pkg:composer/hyperplural/ohmywishes

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v0.1.1 2026-06-14 22:19 UTC

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

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:

License

MIT. See LICENSE.