socialweb / atproto
用于与AT协议集成和通信的PHP库
0.1.0-alpha.1
2023-04-30 03:36 UTC
Requires
- php: ^8.2
- psr/http-client: ^1.0
- psr/http-client-implementation: *
- psr/http-factory: ^1.0
- psr/http-factory-implementation: *
- psr/http-message: ^1.1
- psr/http-message-implementation: *
Requires (Dev)
- guzzlehttp/guzzle: ^7.5
- ramsey/devtools: ^2.0
This package is auto-updated.
Last update: 2024-09-01 02:31:27 UTC
README
用于与AT协议集成和通信的PHP库
关于
🚨 危险,罗宾逊!
这个库非常粗糙。不过,我很乐意得到您的意见和帮助,这就是为什么我把它发布得非常非常早。如果您有兴趣帮助开发这个库,请随时提出问题、发起拉取请求或与我联系。
本项目遵守行为准则。参与本项目及其社区,您应遵守此准则。
安装
使用Composer将此包作为依赖项安装。
composer require socialweb/atproto
使用方法
// This is very rough and in no way represents the final recommended // usage of this library. use SocialWeb\Atproto\Api\Client; $client = new Client('https://bsky.social'); $client->login('YOUR_EMAIL_ADDRESS', 'YOUR_PASSWORD'); $homeFeed = $client->getTimeline()->feed; foreach ($homeFeed as $item) { echo "{$item->post->author->displayName} (@{$item->post->author->handle}) says:\n\n"; echo "{$item->post->record->text}\n\n"; if (isset($item->post->record->reply)) { echo "in reply to {$item->post->record->reply->parent->uri}\n\n"; } echo str_repeat('-', 72); echo "\n\n"; }
贡献
欢迎贡献!要贡献,请熟悉CONTRIBUTING.md。
协调披露
保护用户信息的安全是首要任务,我们欢迎外部安全研究人员的贡献。如果您认为您已在此存储库维护的软件中发现了安全漏洞,请阅读SECURITY.md以获取提交漏洞报告的说明。
版权和许可证
socialweb/atproto版权所有© Ben Ramsey,许可使用条款遵循由自由软件基金会发布的GNU Lesser General Public License (LGPL-3.0-or-later)。请参阅COPYING.LESSER、COPYING和NOTICE以获取更多信息。