Skip to content

Commit

Permalink
improving linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
leogdion committed May 13, 2024
1 parent cceef71 commit 374b656
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Sources/AviaryInsights/Event.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@

/// Represents an event in Plausible, such as a pageview or a custom event.
///
/// ``Event`` represents an event you can send to a ``Plausible``. An event has a name and URL, and optionally, a domain, referrer, custom properties (`props`), and revenue information.
/// ``Event`` represents an event you can send to a ``Plausible``.
/// An event has a name and URL, and
/// optionally, a domain, referrer, custom properties (`props`), and revenue information.
public struct Event: Sendable {
/// Default name for a pageview event.
public static let pageview = "pageview"
Expand Down
9 changes: 7 additions & 2 deletions Sources/AviaryInsights/Plausible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ import OpenAPIURLSession
import FoundationNetworking
#endif

// swiftlint:disable line_length

/// Represents an interface to interact with the Plausible API.
///
/// ``Plausible`` is a client for interacting with the Plausible API.
/// It is initialized with a domain, which is typically your app's bundle identifier.
/// The ``Plausible`` client is used to send events to the Plausible API for tracking and analysis.
///
/// To construct a ``Plausible`` instance, you need to provide a domain. The domain is a string that identifies your application, typically the bundle identifier of your app.
/// To construct a ``Plausible`` instance, you need to provide a domain.
/// The domain is a string that identifies your application, typically the bundle identifier of your app.
///
/// ```swift
/// let plausible = Plausible(domain: "com.example.yourApp")
Expand All @@ -67,13 +70,15 @@ import OpenAPIURLSession
/// ### Synchronous Method
///
/// This method sends an event to the Plausible API in the background and ignores any errors that occur.
/// This is useful when you don't need to handle errors and want to fire-and-forget the event. Here's an example:
/// This is useful when you don't need to handle errors and
/// want to fire-and-forget the event. Here's an example:
///
/// ```swift
/// plausible.postEvent(event)
/// ```
/// In both cases, `event` is an instance of ``Event`` that you want to send to the Plausible API.
public struct Plausible: Sendable {
// swiftlint:enable line_length
// swiftlint:disable force_try
/// Default server URL for the Plausible API.
public static let defaultServerURL = try! Servers.server1()
Expand Down

0 comments on commit 374b656

Please sign in to comment.