GitXplorerGitXplorer
n

swift-atproto

public
4 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
825e0d875c0cb6734ebb04aac320a3857305cce1

v0.16.0

nnnabeyang committed 6 days ago
Verified
3086fdb436459b1ec038cd59fdf56fa7cfcb5928

Introduced `.mp4` case to the `EncodingType` enum, representing the "video/mp4" MIME type

nnnabeyang committed 6 days ago
Verified
d02c98abd02343f4a8bbfc27b4b3186d76f0cf4d

Rename "unknown" to "other"

nnnabeyang committed 7 days ago
Verified
837d84a866f83011761616a5d03a57b3cc44a5ce

Modified session refresh logic to trigger only when the error is successfully decoded, ensuring more precise control over token expiration checks.

nnnabeyang committed 7 days ago
Verified
e9ea571a2b2aaeb792cf2f1d9ea18360450d90cb

v0.15.1

nnnabeyang committed a month ago
Verified
939d3a9687d158455cd68d3b5a35063c4929062b

Fixed a bug where the record type could not be determined dynamically.

nnnabeyang committed a month ago

README

The README file for this repository.

swift-atproto

swift-atproto is a atproto library.

Installation

SwiftPM

Add the SwiftAtproto as a dependency:

let package = Package(
    // name, platforms, products, etc.
    dependencies: [
        // other dependencies
        .package(url: "https://github.com/nnabeyang/swift-atproto", from: "0.16.0"),
    ],
    targets: [
        .executableTarget(name: "<executable-target-name>", dependencies: [
            // other dependencies
                .product(name: "SwiftAtproto", package: "swift-atproto"),
        ]),
        // other targets
    ]
)

CocoaPods

Add the following to your Podfile:

pod 'SwiftAtproto'

Usage

Code generation is done as follows:

swift package plugin --allow-writing-to-package-directory \
--allow-network-connections all:443 swift-atproto --outdir <OUTPUT_DIR> --atproto-configuration ./.atproto.json

Sample configuration file is as follows:

{
  "dependencies": [
    {
      "location": "https://github.com/bluesky-social/atproto.git",
      "lexicons": [
        { "prefix": "app.bsky", "path": "lexicons/app/bsky" },
        { "prefix": "com.atproto", "path": "lexicons/com/atproto" }
      ],
      "state": {
        "tag": "@atproto/api@0.12.18"
      }
    },
    {
      "location": "https://github.com/whtwnd/whitewind-blog.git",
      "lexicons": [{ "prefix": "com.whtwnd", "path": "lexicons/com/whtwnd" }],
      "state": {
        "tag": "v1.0.1"
      }
    }
  ],
  "module": "Sources/Lexicon"
}

License

swift-atproto is published under the MIT License, see LICENSE.

Author

Noriaki Watanabe@nnabeyang