sidecloud / appleauto-php

AppleAuto 的 PHP 库

1.0.1 2024-04-01 23:05 UTC

This package is auto-updated.

Last update: 2024-09-02 11:27:48 UTC


README

AppleAuto 是一个帮助你管理共享 Apple 账户的项目。

使用这个库,你可以轻松实现 AppleAuto API 提供的几个功能。

安装

该库可以通过 Composer 安装。运行以下命令

composer require sidecloud/appleauto-php

使用方法

SharePage

这可以使你从 AppleAuto 的共享页面获取账户。

如果你的共享链接是 https://test.com/share/kfcv50,那么将 'share' 替换为 'shareapi'。

如果你的共享页面需要密码,那么将其作为第二个参数添加。例如 https://test.com/shareapi/kfcv50/password

// Create a new SharePage object
$page = new AppleAutoShare\SharePage("https://test.com/shareapi/kfcv50");

// The request will be sent when the object is created, so you can get the accounts directly
$accounts = $page->accounts;
echo "username".$accounts[0]['username'];
echo "password".$accounts[0]['password'];
echo "last_check".$accounts[0]['last_check']; // The date and time in string format
echo "status".$accounts[0]['status']?"Normal":"Abnormal"; // status is a boolean value

// The error message will be stored in $page->errorMsg, if there is.
// By default, it is null.
if ($page->errorMsg) {
    echo $page->errorMsg;
}

许可证

该库在 MIT 许可证(MIT)下提供。有关更多信息,请参阅 许可证文件