-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add summary and image tags to NIP-52 calendar events
- Loading branch information
Showing
8 changed files
with
79 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// ImageTagInterpreting.swift | ||
// | ||
// | ||
// Created by Terry Yiu on 8/4/24. | ||
// | ||
|
||
import Foundation | ||
|
||
public protocol ImageTagInterpreting: NostrEvent {} | ||
public extension ImageTagInterpreting { | ||
/// The image of the event. | ||
var imageURL: URL? { | ||
guard let imageURLString = firstValueForTagName(.image) else { | ||
return nil | ||
} | ||
return URL(string: imageURLString) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// SummaryTagInterpreting.swift | ||
// | ||
// | ||
// Created by Terry Yiu on 8/4/24. | ||
// | ||
|
||
import Foundation | ||
|
||
public protocol SummaryTagInterpreting: NostrEvent {} | ||
public extension SummaryTagInterpreting { | ||
/// The summary of the content. | ||
var summary: String? { | ||
firstValueForTagName(.summary) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters