Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Commit d6086ac

Browse files
authored
Merge pull request #118 from mironal/fix-oauth1-name
fix name OAuth 1.0a
2 parents 4295402 + ae87cbd commit d6086ac

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
public typealias TwitterAuthAPI =
22
TwitterAuthAPIResource
3-
& OAuth11aAPI
3+
& OAuth10aAPI
44
& OAuth20API
55

66
public protocol TwitterAuthAPIResource {
7-
var oauth11a: OAuth11aAPI { get }
7+
var oauth10a: OAuth10aAPI { get }
88
var oauth20: OAuth20API { get }
99
}
1010

1111
extension TwitterAPIKit.TwitterAuthAPIImpl: TwitterAuthAPIResource {
12-
var oauth11a: OAuth11aAPI { return self }
12+
var oauth10a: OAuth10aAPI { return self }
1313
var oauth20: OAuth20API { return self }
1414
}

Sources/TwitterAPIKit/AuthAPI/OAuth11aAPI.swift renamed to Sources/TwitterAPIKit/AuthAPI/OAuth10aAPI.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
22

3-
public protocol OAuth11aAPI {
3+
public protocol OAuth10aAPI {
44
/// https://developer.twitter.com/en/docs/authentication/api-reference/request_token
55
func postOAuthRequestTokenData(
66
_ request: PostOAuthRequestTokenRequestV1
@@ -33,7 +33,7 @@ public protocol OAuth11aAPI {
3333
) -> TwitterAPISessionJSONTask
3434
}
3535

36-
extension TwitterAPIKit.TwitterAuthAPIImpl: OAuth11aAPI {
36+
extension TwitterAPIKit.TwitterAuthAPIImpl: OAuth10aAPI {
3737
public func postOAuthRequestTokenData(
3838
_ request: PostOAuthRequestTokenRequestV1
3939
) -> TwitterAPISessionDataTask {

Tests/TwitterAPIKitTests/AuthAPI/TwitterAuthAPITests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class TwitterAuthAPITests: XCTestCase {
2222
}
2323

2424
func testMakeOAuthAuthorizeURL() throws {
25-
let url = client.oauth11a.makeOAuthAuthorizeURL(
25+
let url = client.oauth10a.makeOAuthAuthorizeURL(
2626
.init(oauthToken: "token", forceLogin: true, screenName: "name")
2727
)
2828
XCTAssertEqual(
@@ -31,7 +31,7 @@ class TwitterAuthAPITests: XCTestCase {
3131
}
3232

3333
func testMakeOAuthAuthenticateURL() throws {
34-
let url = client.oauth11a.makeOAuthAuthenticateURL(
34+
let url = client.oauth10a.makeOAuthAuthenticateURL(
3535
.init(oauthToken: "token", forceLogin: true, screenName: "name")
3636
)
3737
XCTAssertEqual(

0 commit comments

Comments
 (0)