Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/socialweb-php/atproto
A PHP library for integrating with and communicating over the AT Protocol
https://github.com/socialweb-php/atproto
atp atproto atprotocol bluesky
Last synced: about 2 months ago
JSON representation
A PHP library for integrating with and communicating over the AT Protocol
- Host: GitHub
- URL: https://github.com/socialweb-php/atproto
- Owner: socialweb-php
- License: lgpl-3.0
- Created: 2023-04-30T02:58:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-01T03:03:02.000Z (2 months ago)
- Last Synced: 2024-11-01T04:16:40.756Z (2 months ago)
- Topics: atp, atproto, atprotocol, bluesky
- Language: PHP
- Homepage:
- Size: 105 KB
- Stars: 31
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: COPYING
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
socialweb/atproto
A PHP library for integrating with and communicating over the AT Protocol## About
> 🚨 **DANGER, WILL ROBINSON!** \
> This library is extremely, very rough. I'd love to get your input and help,
> though, which is why I'm putting it out very, very, very early. If you're
> Interested in helping develop this, please feel free to open an issue, open a
> pull request, or contact me with any questions.This project adheres to a [code of conduct](CODE_OF_CONDUCT.md).
By participating in this project and its community, you are expected to
uphold this code.## Installation
Install this package as a dependency using [Composer](https://getcomposer.org).
``` bash
composer require socialweb/atproto
```## Usage
```php
// 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
Contributions are welcome! To contribute, please familiarize yourself with
[CONTRIBUTING.md](CONTRIBUTING.md).## Coordinated Disclosure
Keeping user information safe and secure is a top priority, and we welcome the
contribution of external security researchers. If you believe you've found a
security issue in software that is maintained in this repository, please read
[SECURITY.md](SECURITY.md) for instructions on submitting a vulnerability report.## Copyright and License
socialweb/atproto is copyright © [Ben Ramsey](https://benramsey.com)
and licensed for use under the terms of the
GNU Lesser General Public License (LGPL-3.0-or-later) as published by the Free
Software Foundation. Please see [COPYING.LESSER](COPYING.LESSER),
[COPYING](COPYING), and [NOTICE](NOTICE) for more information.