Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/briandowns/libbluesky
C/C++ library for accessing the BlueSky API.
https://github.com/briandowns/libbluesky
bluesky c cplusplus libray
Last synced: 16 days 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 (about 1 month ago)
- Default Branch: master
- Last Pushed: 2024-12-21T19:05:56.000Z (18 days ago)
- Last Synced: 2024-12-21T20:18:37.165Z (18 days ago)
- Topics: bluesky, c, cplusplus, libray
- Language: C
- Homepage:
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# libbluesky
[![Build and Deploy](https://github.com/briandowns/libbluesky/actions/workflows/main.yml/badge.svg)](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).