{"id":21508503,"url":"https://github.com/lmangani/atproto-cpp","last_synced_at":"2025-04-09T16:40:47.291Z","repository":{"id":260831817,"uuid":"882471318","full_name":"lmangani/atproto-cpp","owner":"lmangani","description":"Simple C++ interface for interacting with BlueSky #atproto ","archived":false,"fork":false,"pushed_at":"2024-11-22T19:56:07.000Z","size":54,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T10:33:47.556Z","etag":null,"topics":["atproto","bluesky","bsky","cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lmangani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["lmangani"]}},"created_at":"2024-11-02T21:31:25.000Z","updated_at":"2024-11-23T18:34:57.000Z","dependencies_parsed_at":"2024-11-02T22:22:03.171Z","dependency_job_id":"a7d055ce-7688-4628-9cfb-49539d5ef861","html_url":"https://github.com/lmangani/atproto-cpp","commit_stats":null,"previous_names":["lmangani/atproto-cpp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmangani%2Fatproto-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmangani%2Fatproto-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmangani%2Fatproto-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmangani%2Fatproto-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lmangani","download_url":"https://codeload.github.com/lmangani/atproto-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248068903,"owners_count":21042577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atproto","bluesky","bsky","cpp"],"created_at":"2024-11-23T21:05:46.543Z","updated_at":"2025-04-09T16:40:47.272Z","avatar_url":"https://github.com/lmangani.png","language":"C++","readme":"# atproto-cpp\n\n[![CMake Builder](https://github.com/lmangani/atproto-cpp/actions/workflows/cmake-test.yml/badge.svg)](https://github.com/lmangani/atproto-cpp/actions/workflows/cmake-test.yml)\n\nThe BlueSky `atproto-cpp` library provides a C++ interface for interacting with the BlueSky social networking service. This library includes functions to handle user authentication, post creation, feed retrieval, and more.\n\n## Features\n\n- User authentication and session management\n- Post creation and feed retrieval\n- Helper functions for JSON manipulation and URL encoding\n\n## Installation\n\nTo use the BlueSky HPP library, include the header files in your project and link against the required dependencies.\n\n```cpp\n#include \"bluesky_client.hpp\"\n```\n\n### Usage\n#### Initialization\nTo initialize the BlueskyClient, provide the server address:\n```cpp\nBlueskyClient client(\"bsky.social\");\n```\n\n#### Authentication\nTo log in to the BlueSky service, use the login function:\n```cpp\nbool success = client.login(\"your_identifier\", \"your_password\");\nif (success) {\n    std::cout \u003c\u003c \"Logged in successfully!\" \u003c\u003c std::endl;\n} else {\n    std::cerr \u003c\u003c \"Login failed!\" \u003c\u003c std::endl;\n}\n```\n\n#### Creating a Post\nTo create a new post, use the createPost function:\n```cpp\nBlueskyClient::Error error = client.createPost(\"Hello, BlueSky!\");\nif (error == BlueskyClient::Error_None) {\n    std::cout \u003c\u003c \"Post created successfully!\" \u003c\u003c std::endl;\n} else {\n    std::cerr \u003c\u003c \"Failed to create post!\" \u003c\u003c std::endl;\n}\n```\n\n#### Retrieving Feed Posts\nTo retrieve posts from a feed, use the getFeedPosts function:\n```cpp\nBlueskyClient::PostsResult result = client.getFeedPosts(\"feed_uri\", 10);\nif (result.error == BlueskyClient::Error_None) {\n    for (const auto\u0026 post : result.posts) {\n        std::cout \u003c\u003c \"Post: \" \u003c\u003c post.text \u003c\u003c std::endl;\n    }\n} else {\n    std::cerr \u003c\u003c \"Failed to retrieve feed posts!\" \u003c\u003c std::endl;\n}\n```\n\n#### Retrieving Author Posts\nTo retrieve posts from a specific author, use the getAuthorPosts function:\n```cpp\nBlueskyClient::PostsResult result = client.getAuthorPosts(\"author_id\", 10);\nif (result.error == BlueskyClient::Error_None) {\n    for (const auto\u0026 post : result.posts) {\n        std::cout \u003c\u003c \"Author Post: \" \u003c\u003c post.text \u003c\u003c std::endl;\n    }\n} else {\n    std::cerr \u003c\u003c \"Failed to retrieve author posts!\" \u003c\u003c std::endl;\n}\n````\n\n#### Additional Functions\n\n* `getUnreadCount()`: Retrieves the count of unread notifications.\n* `filterText(const std::string\u0026 str)`: Filters special characters from a text string.\n* `splitIntoWords(const std::string\u0026 str)`: Splits a string into individual words.\n* `urlEncode(const std::string\u0026 str)`: Encodes a string for use in URLs.\n* `createJsonString(const std::map\u003cstd::string, std::string\u003e\u0026 data)`: Creates a JSON string from a map of key-value pairs.\n\n### Status\n- Prototype, Untested\n\n### Credits\nContains portions of [bluesky_esphom](https://github.com/softplus/bluesky_esphom) and [postbluesky](https://github.com/kenjinote/PostBluesky)\n","funding_links":["https://github.com/sponsors/lmangani"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmangani%2Fatproto-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flmangani%2Fatproto-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmangani%2Fatproto-cpp/lists"}