Move oauth1 provider implementation fo main TwitterFeedProvider class.

This commit is contained in:
Maurice Parker 2020-04-15 14:14:33 -05:00
parent 42853fe487
commit d883981afd
2 changed files with 15 additions and 14 deletions

View File

@ -53,6 +53,21 @@ public struct TwitterFeedProvider {
}
extension TwitterFeedProvider: OAuth1SwiftProvider {
public static var oauth1Swift: OAuth1Swift {
return OAuth1Swift(
consumerKey: Secrets.twitterConsumerKey,
consumerSecret: Secrets.twitterConsumerSecret,
requestTokenUrl: "https://api.twitter.com/oauth/request_token",
authorizeUrl: "https://api.twitter.com/oauth/authorize",
accessTokenUrl: "https://api.twitter.com/oauth/access_token"
)
}
}
// MARK: FeedProvider
extension TwitterFeedProvider: FeedProvider {

View File

@ -36,17 +36,3 @@ extension TwitterFeedProvider: ExtensionPoint {
}
}
extension TwitterFeedProvider: OAuth1SwiftProvider {
public static var oauth1Swift: OAuth1Swift {
return OAuth1Swift(
consumerKey: Secrets.twitterConsumerKey,
consumerSecret: Secrets.twitterConsumerSecret,
requestTokenUrl: "https://api.twitter.com/oauth/request_token",
authorizeUrl: "https://api.twitter.com/oauth/authorize",
accessTokenUrl: "https://api.twitter.com/oauth/access_token"
)
}
}