Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from TootSDK/wip/TootStreamUpdates
Toot Stream Updates
- Loading branch information
Showing
18 changed files
with
488 additions
and
411 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
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 was deleted.
Oops, something went wrong.
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,29 @@ | ||
// LocalTimelineQuery.swift | ||
// Created by Konstantin on 09/03/2023. | ||
|
||
import Foundation | ||
|
||
/// Specifies the parameters for a local timeline request | ||
public struct LocalTimelineQuery: Hashable, Codable, Sendable { | ||
public init(onlyMedia: Bool? = nil) { | ||
self.onlyMedia = onlyMedia | ||
} | ||
|
||
/// Return only statuses with media attachments | ||
public var onlyMedia: Bool? | ||
} | ||
|
||
extension LocalTimelineQuery: TimelineQuery { | ||
|
||
public func getQueryItems() -> [URLQueryItem] { | ||
var queryItems: [URLQueryItem] = [] | ||
|
||
if let onlyMedia { | ||
queryItems.append(.init(name: "only_media", value: String(onlyMedia))) | ||
} | ||
|
||
queryItems.append(.init(name: "local", value: String(true))) | ||
|
||
return queryItems | ||
} | ||
} |
Oops, something went wrong.