From 4e2a8ff55f7b46c0067fed2f9e4ca6a68fa69474 Mon Sep 17 00:00:00 2001 From: Christopher Jr Riley Date: Sat, 7 Dec 2024 14:17:22 -0500 Subject: [PATCH] Fix broken links in DocC --- .../SessionManager/ATProtocolConfiguration.swift | 8 ++++---- .../ATProtoKit.docc/Misc/0210AuthFlowChange.md | 2 +- .../ATProtoKit.docc/Utilities/ATLinkBuilderProtocol.md | 2 +- .../Utilities/DateFormatting PropertyWrapper.md | 10 ++++++---- Sources/ATProtoKit/Utilities/ATRecordProtocol.swift | 4 ++-- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Sources/ATProtoKit/APIReference/SessionManager/ATProtocolConfiguration.swift b/Sources/ATProtoKit/APIReference/SessionManager/ATProtocolConfiguration.swift index d4eac85a2f..871e772356 100644 --- a/Sources/ATProtoKit/APIReference/SessionManager/ATProtocolConfiguration.swift +++ b/Sources/ATProtoKit/APIReference/SessionManager/ATProtocolConfiguration.swift @@ -106,10 +106,10 @@ public class ATProtocolConfiguration: SessionConfiguration { /// handle or password. /// /// - Important: ``ATProtocolConfiguration/authenticate(authenticationFactorToken:)``, - /// ``ATProtocolConfiguration/createAccount(email:handle:existingDID:inviteCode:verificationCode:verificationPhone:password:recoveryKey:plcOp:)``, - /// ``ATProtocolConfiguration/deleteSession(using:pdsURL:)``, - /// ``ATProtocolConfiguration/getSession(by:pdsURL:)``, and - /// ``ATProtocolConfiguration/refreshSession(using:pdsURL:)`` will not work when initializing + /// ``ATProtocolConfiguration/createAccount(email:handle:existingDID:inviteCode:verificationCode:verificationPhone:password:recoveryKey:plcOperation:)``, + /// ``ATProtocolConfiguration/deleteSession()``, + /// ``ATProtocolConfiguration/getSession()``, and + /// ``ATProtocolConfiguration/deleteSession()`` will not work when initializing /// ATProtocolConfiguration with this initializer. /// /// - Parameters: diff --git a/Sources/ATProtoKit/ATProtoKit.docc/Misc/0210AuthFlowChange.md b/Sources/ATProtoKit/ATProtoKit.docc/Misc/0210AuthFlowChange.md index 02e1279d31..1ecbb924f9 100644 --- a/Sources/ATProtoKit/ATProtoKit.docc/Misc/0210AuthFlowChange.md +++ b/Sources/ATProtoKit/ATProtoKit.docc/Misc/0210AuthFlowChange.md @@ -56,7 +56,7 @@ Here are the changes being made: `ATProtoKit` method|Proxy Method ---:|:--- ``ATProtoKit/ATProtoKit/createSession(with:and:authenticationFactorToken:pdsURL:)``|``ATProtocolConfiguration/authenticate(authenticationFactorToken:)`` -``ATProtoKit/ATProtoKit/getSession(by:pdsURL:)``|``ATProtocolConfiguration/getSession(by:pdsURL:)`` +``ATProtoKit/ATProtoKit/getSession(by:pdsURL:)``|``ATProtocolConfiguration/getSession() ``ATProtoKit/ATProtoKit/refreshSession(refreshToken:pdsURL:)``| ``ATProtocolConfiguration/refreshSession()`` ``ATProtoKit/ATProtoKit/deleteSession(refreshToken:pdsURL:)``|``ATProtocolConfiguration/deleteSession()`` ``ATProtoKit/ATProtoKit/createAccount(email:handle:existingDID:inviteCode:verificationCode:verificationPhone:password:recoveryKey:plcOperation:pdsURL:)``| ``ATProtocolConfiguration/createAccount(email:handle:existingDID:inviteCode:verificationCode:verificationPhone:password:recoveryKey:plcOperation:)`` diff --git a/Sources/ATProtoKit/ATProtoKit.docc/Utilities/ATLinkBuilderProtocol.md b/Sources/ATProtoKit/ATProtoKit.docc/Utilities/ATLinkBuilderProtocol.md index baf29d3fa6..54a93332a2 100644 --- a/Sources/ATProtoKit/ATProtoKit.docc/Utilities/ATLinkBuilderProtocol.md +++ b/Sources/ATProtoKit/ATProtoKit.docc/Utilities/ATLinkBuilderProtocol.md @@ -98,7 +98,7 @@ Task { } ``` -You can then create a post as normal using [`createPostRecord()`](``ATProtoBluesky/createPostRecord(text:locales:replyTo:embed:labels:tags:creationDate:recordKey:shouldValidate:swapCommit:)``). +You can then create a post as normal using ``ATProtoBluesky/createPostRecord(text:locales:replyTo:embed:labels:tags:creationDate:recordKey:shouldValidate:swapCommit:)``. The mthod will automatically take the first link it detects and use it as the external website card. diff --git a/Sources/ATProtoKit/ATProtoKit.docc/Utilities/DateFormatting PropertyWrapper.md b/Sources/ATProtoKit/ATProtoKit.docc/Utilities/DateFormatting PropertyWrapper.md index 0bd48fc4b2..fb8572b5c1 100644 --- a/Sources/ATProtoKit/ATProtoKit.docc/Utilities/DateFormatting PropertyWrapper.md +++ b/Sources/ATProtoKit/ATProtoKit.docc/Utilities/DateFormatting PropertyWrapper.md @@ -35,10 +35,12 @@ This will automatically create the custom initializer, as well as the custom dec ## Manual Entry If you rather write the custom initializers and methods manually, you can do so as well. When creating the custom initializers and methods, you'll want to replace the following methods with the custom ones: -- Replace `decode(_:forKey:)` with ``decodeDate(from:forKey:)``. -- Replace `decodeIfPresent(_:forKey:)` with ``decodeDateIfPresent(from:forKey:)``. -- Replace `encode(_:forKey:)` with ``encodeDate(_:with:forKey:)``. -- Replace `encodeIfPresent(_:forKey:)` with ``encodeDateIfPresent(_:with:forKey:)``. +Replace|With... +---:|:--- +`decode(_:forKey:)`|``decodeDate(from:forKey:)`` +`decodeIfPresent(_:forKey:)`|``decodeDateIfPresent(from:forKey:)`` +`encode(_:forKey:)`|``encodeDate(_:with:forKey:)`` +`encodeIfPresent(_:forKey:)`|``encodeDateIfPresent(_:with:forKey:)`` ```swift public struct UserProfile: ATRecordProtocol { diff --git a/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift b/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift index a79c182ef3..629351aeed 100644 --- a/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift +++ b/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift @@ -149,7 +149,7 @@ public actor ATRecordTypeRegistry { /// Initializes the registry with an array of record types from Bluesky. /// - /// - Note: This must only be used for the main`ATProtoKit` `class` and only for + /// - Note: This must only be used for the main `ATProtoKit` `class` and only for /// Bluesky-specific record lexicon models. /// /// - Parameter types: An array of ``ATRecordProtocol``-conforming `struct`s. @@ -238,7 +238,7 @@ public actor ATRecordTypeRegistry { /// ``` /// /// As shown above, the `records` property is of type `UnknownType`. By adding this, any `struct`s -/// within the dictionary of ``ATRecordTypeRegistry/recordRegistry`` can be used to potentially +/// within the dictionary of ``ATRecordTypeRegistry/recordRegistry`` can be used to potentially /// decode and encode the JSON object. public enum UnknownType: Sendable, Codable {