https://github.com/briandowns/libbluesky
C/C++ library for accessing the BlueSky API.
https://github.com/briandowns/libbluesky
bluesky c cplusplus libray
Last synced: 12 months ago
JSON representation
C/C++ library for accessing the BlueSky API.
- Host: GitHub
- URL: https://github.com/briandowns/libbluesky
- Owner: briandowns
- License: bsd-2-clause
- Created: 2024-12-02T05:35:19.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-21T19:05:56.000Z (over 1 year ago)
- Last Synced: 2025-02-13T17:57:15.592Z (over 1 year ago)
- Topics: bluesky, c, cplusplus, libray
- Language: C
- Homepage:
- Size: 93.8 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# libbluesky
[](https://github.com/briandowns/libbluesky/actions/workflows/main.yml/badge.svg)
libbluesky is a C/C++ client library for the BlueSky API. It requires a Bluesky account to connect through and an application password to authenticate with.
**Note**: This library is very much in alpha and will experience change over the coming months.
## Usage
To initialize the library, the user's github token is required.
```c
char *bksy_app_password = getenv("BSKY_APP_PASSWORD");
int ret = bs_client_init("bdowns328.bsky.social", bksy_app_password, NULL);
if (ret > 0) {
fprintf(stderr, "failed to login to bluesky\n");
return 1;
}
```
## Build shared object
To build the shared object:
```sh
make install
```
## Example
Build the example:
```sh
make example
```
## API Coverage
* API response data is returned in a string containing JSON.
* The caller is responsible for how to handle the data.
### User
* Retrieve a user's profile information
* Retrieve the authenticated preferences
* Retrieve follows for a given handle
* Retrieve followers for a given handle
* Resolve handle into DID (domain identifier)
### Posts
* Create a post
* Retrieve the authenticated user's timeline
* Retrieve post for a given account
### Likes
* Retrieve likes for the authenticated user
* Retrieve likes for a given at-uri
## Requirements / Dependencies
* curl
* jansson
## Contributing
Please feel free to open a PR!
## Contact
Brian Downs [@bdowns328](http://twitter.com/bdowns328)
## License
BSD 2 Clause [License](/LICENSE).