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 May 31, 2024
1 parent e53dd9d commit 2914471
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ To create a post, use the ``ATProtoKit/ATProtoKit/createPostRecord(text:locales:
let postResult = await atProto.createPostRecord(text: "Hello Bluesky!")
```

You should see the post in your Bluesky account once you run this code. When the method successfully completes, you'll receive a ``StrongReference`` object that contains the URI of the record (``StrongReference/recordURI``) and the content identifier hash of the record (``StrongReference/cidHash``).
You should see the post in your Bluesky account once you run this code. When the method successfully completes, you'll receive a ``ComAtprotoLexicon/Repository/StrongReference`` object that contains the URI of the record (``ComAtprotoLexicon/Repository/StrongReference/recordURI``) and the content identifier hash of the record (``ComAtprotoLexicon/Repository/StrongReference/cidHash``).
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ extension ComAtprotoLexicon.Server {
public let codes: [ServerAccountCodes]
}

/// The server invite codes generated from ``ServerCreateInviteCodes``.
/// The server invite codes generated from ``ComAtprotoLexicon/Server/CreateInviteCodesOutput``.
///
///
/// - SeeAlso: This is based on the [`com.atproto.server.createInviteCodes`][github] lexicon.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/ATProtoKit/Networking/PlatformAPI/CreateLike.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extension ATProtoKit {
/// - createdAt: The date and time the like record was created. Defaults to `Date.now`.
/// - shouldValidate: Indicates whether the record should be validated. Optional.
/// Defaults to `true`.
/// - Returns: A `Result`, containing either a ``StrongReference``
/// - Returns: A `Result`, containing either a ``ComAtprotoLexicon/Repository/StrongReference``
/// if it's successful, or an `Error` if it's not.
public func createLikeRecord(
_ strongReference: ComAtprotoLexicon.Repository.StrongReference,
Expand Down
6 changes: 3 additions & 3 deletions Sources/ATProtoKit/Networking/PlatformAPI/CreatePost.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ extension ATProtoKit {

/// Uploads images to the AT Protocol for attaching to a record at a later request.
/// - Parameters:
/// - images: The ``ImageQuery`` that contains the image data. Current limit is 4 images.
/// - images: The ``ComAtprotoLexicon/Repository/ImageQuery`` that contains the image data. Current limit is 4 images.
/// - pdsURL: The URL of the Personal Data Server (PDS). Defaults to `nil`.
/// - accessToken: The access token used to authenticate to the user.
/// - Returns: An ``EmbedUnion``, which contains an array of ``EmbedImage``s for
/// - Returns: An ``ATUnion/EmbedViewUnion``, which contains an array of ``AppBskyLexicon/Embed/ImagesDefinition``s for
/// use in a record.
///
/// - Important: Each image can only be 1 MB in size.
Expand Down Expand Up @@ -134,7 +134,7 @@ extension ATProtoKit {
/// Scraps the website for the required information in order to attach to a record's embed at a
/// later request.
/// - Parameter url: The URL of the website
/// - Returns: An ``EmbedUnion`` which contains an ``EmbedExternal`` for use
/// - Returns: An ``ATUnion/EmbedViewUnion`` which contains an ``AppBskyLexicon/Embed/ExternalDefinition`` for use
/// in a record.
public func buildExternalEmbed(from url: URL) async throws -> ATUnion.PostEmbedUnion? {

Expand Down
8 changes: 4 additions & 4 deletions Sources/ATProtoKit/Utilities/ATImageProcessing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public typealias ATImage = NSImage
/// Provides a standardized approach to processing images for uploading to servers that interact
/// with the AT Protocol.
///
/// This protocol aids in the conversion of images into an ``ImageQuery`` (which is used to give
/// This protocol aids in the conversion of images into an ``ComAtprotoLexicon/Repository/ImageQuery`` (which is used to give
/// all of the necessary information about the image for the server), while ensuring that
/// privacy-sensitive EXIF data is stripped from the images before upload.
///
Expand All @@ -52,7 +52,7 @@ public typealias ATImage = NSImage
/// \
/// Also, this should be an `internal` method, as it will be part of
/// `convertToImageQuery(image:altText:targetFileSize)`. It's recommended that it's called before
/// ``convertToImageQuery(imagePath:altText:targetFileSize:)-2fma7`` attempts to access the image.
/// ``convertToImageQuery(imagePath:altText:targetFileSize:)-468o1`` attempts to access the image.
///
/// ### Example
/// Below is a sample implementation showcasing how to conform to `ATImageProcessable` for a
Expand Down Expand Up @@ -105,14 +105,14 @@ public protocol ATImageProcessable {
/// - altText: The alt text used to help blind and low-vision users know what's contained
/// in the text. Optional.
/// - targetFileSize: The size (in bytes) the file needs to be.
/// - Returns: An ``ImageQuery``, which combines the image itself in a `Data` format and
/// - Returns: An ``ComAtprotoLexicon/Repository/ImageQuery``, which combines the image itself in a `Data` format and
/// the alt text.
func convertToImageQuery(imagePath: String, altText: String?, targetFileSize: Int) -> ComAtprotoLexicon.Repository.ImageQuery?

/// Removes all EXIF and GPS metadata from the image.
///
/// This method should ideally be before
/// ``convertToImageQuery(imagePath:altText:targetFileSize:)-2fma7`` does anything
/// ``convertToImageQuery(imagePath:altText:targetFileSize:)-468o1`` does anything
/// to the image, as it will help with the process of maintaining more of the image quality.
func stripMetadata(from image: ATImage) -> ATImage?
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/ATProtoKit/Utilities/ATProtoTools.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class ATProtoTools {
/// Resolves the reply references to prepare them for a later post record request.
///
/// - Parameter parentURI: The URI of the post record the current one is directly replying to.
/// - Returns: A ``ReplyReference``.
/// - Returns: A ``AppBskyLexicon/Feed/PostRecord/ReplyReference``.
public func resolveReplyReferences(parentURI: String) async throws -> AppBskyLexicon.Feed.PostRecord.ReplyReference {
let threadRecords = try await fetchRecordForURI(parentURI)

Expand Down Expand Up @@ -75,7 +75,7 @@ public class ATProtoTools {
/// Gets a record from the user's repository.
///
/// - Parameter uri: The URI of the record.
/// - Returns: A ``RecordOutput``
/// - Returns: A ``ComAtprotoLexicon/Repository/GetRecordOutput``
public func fetchRecordForURI(_ uri: String) async throws -> ComAtprotoLexicon.Repository.GetRecordOutput {
let query = try parseURI(uri)

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 @@ -135,9 +135,9 @@ public struct ATRecordTypeRegistry {
///
/// Within the ``ATRecordProtocol``-conforming `struct`, any properties that are of type
/// `unknown` as dictated by the lexicon the `struct`conforms to _must_ of this type. For example,
/// here's the basic structure for ``ATNotification``:
/// here's the basic structure for ``AppBskyLexicon/Notification/Notification``:
/// ```swift
/// public struct ATNotification: Codable {
/// public struct Notification: Codable {
/// public let notificationURI: String
/// public let notificationCID: String
/// public let notificationAuthor: String
Expand Down

0 comments on commit 2914471

Please sign in to comment.