Skip to content

Commit

Permalink
Fix broken links in DocC
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterJ93 committed Dec 7, 2024
1 parent 315f124 commit 4e2a8ff
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:)``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ATProtoKit/Utilities/ATRecordProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {

Expand Down

0 comments on commit 4e2a8ff

Please sign in to comment.