This repository has been archived by the owner on Jun 30, 2023. It is now read-only.
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 #127 from mironal/class
Remove the API protocol and make it a class instead.
- Loading branch information
Showing
41 changed files
with
1,209 additions
and
1,293 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
11 changes: 3 additions & 8 deletions
11
Sources/TwitterAPIKit/APIv1/Application/ApplicationAPIv1.swift
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 |
---|---|---|
@@ -1,16 +1,11 @@ | ||
import Foundation | ||
|
||
public protocol ApplicationAPIv1 { | ||
open class ApplicationAPIv1: TwitterAPIBase { | ||
|
||
/// https://developer.twitter.com/en/docs/twitter-api/v1/developer-utilities/rate-limit-status/api-reference/get-application-rate_limit_status | ||
func getRateLimit( | ||
public func getRateLimit( | ||
_ request: GetApplicationRateLimitStatusRequestV1 | ||
) -> TwitterAPISessionJSONTask | ||
|
||
} | ||
|
||
extension TwitterAPIClient.TwitterAPIImplV1: ApplicationAPIv1 { | ||
func getRateLimit(_ request: GetApplicationRateLimitStatusRequestV1) -> TwitterAPISessionJSONTask { | ||
) -> TwitterAPISessionJSONTask { | ||
return session.send(request) | ||
} | ||
} |
58 changes: 9 additions & 49 deletions
58
Sources/TwitterAPIKit/APIv1/BlockAndMute/BlockAndMuteAPIv1.swift
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
83 changes: 20 additions & 63 deletions
83
Sources/TwitterAPIKit/APIv1/Collection/CollectionAPIv1.swift
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
Oops, something went wrong.