From d883981afd71b284422dc65980e97fd79ebe6fea Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 15 Apr 2020 14:14:33 -0500 Subject: [PATCH] Move oauth1 provider implementation fo main TwitterFeedProvider class. --- .../Twitter/TwitterFeedProvider.swift | 15 +++++++++++++++ .../TwitterFeedProvider-Extensions.swift | 14 -------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Frameworks/FeedProvider/Twitter/TwitterFeedProvider.swift b/Frameworks/FeedProvider/Twitter/TwitterFeedProvider.swift index 0ccf83ea2..b5f144c87 100644 --- a/Frameworks/FeedProvider/Twitter/TwitterFeedProvider.swift +++ b/Frameworks/FeedProvider/Twitter/TwitterFeedProvider.swift @@ -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 { diff --git a/Shared/ExtensionPoints/TwitterFeedProvider-Extensions.swift b/Shared/ExtensionPoints/TwitterFeedProvider-Extensions.swift index 9a1fa2c43..92699be06 100644 --- a/Shared/ExtensionPoints/TwitterFeedProvider-Extensions.swift +++ b/Shared/ExtensionPoints/TwitterFeedProvider-Extensions.swift @@ -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" - ) - } - -}