Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LogSnag

LogSnag Swift

Get notifications and track your project events.

Discord Documentation

Installation

Swift Package Manager

  • File > Swift Packages > Add Package Dependency
  • Add https://github.com/Camji55/logsnag-swift.git
  • Select "Up to Next Major" with "1.0.0"

Usage

Import Library

import LogSnag

Initialize Client

let logsnag = LogSnagClient(
    project: "my-sass",
    token: "7f568d735724351757637b1dbf108e5"
)

Publish Event

async/await

let success = try await logsnag.asyncPublish(
    options: PublishOptions(
        channel: "waitlist",
        event: "User Joined",
        icon: "🎉",
        notify: true
    )
)

Combine

logsnag.publish(
    options: PublishOptions(
        channel: "waitlist",
        event: "User Joined",
        icon: "🎉",
        notify: true
    )
)
.sink(
    receiveCompletion: { _ in },
    receiveValue: { _ in }
)
.store(in: &cancellables)

About

Topics

Resources

Stars

15 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages