Skip to content

Commit 8bf52f9

Browse files
author
github-actions
committed
ios-consumer-api release 0.0.16
1 parent d7cd66f commit 8bf52f9

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

ExtoleConsumerAPI.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Pod::Spec.new do |s|
22
s.name = 'ExtoleConsumerAPI'
33
s.ios.deployment_target = '10.0'
44
s.platform = :ios, "10.0"
5-
s.version = '0.0.15'
5+
s.version = '0.0.16'
66
s.source = { :git => 'https://github.com/extole/ios-consumer-api.git', :tag => "#{s.version}" }
77
s.authors = 'Extole'
88
s.license = { :type => "MIT", :file => "LICENSE" }

Sources/ExtoleConsumerAPI/APIs/AuthorizationV4Endpoints.swift

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ open class AuthorizationV4Endpoints {
1313
/**
1414
Deletes the unique access token identified in the request from the associate user's profile.
1515

16+
- parameter token: (path)
1617
- parameter completion: completion handler to receive the data and the error objects
1718
*/
18-
open class func deleteToken(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
19-
deleteTokenWithRequestBuilder().execute { (response, error) -> Void in
19+
open class func deleteToken(token: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
20+
deleteTokenWithRequestBuilder(token: token).execute { (response, error) -> Void in
2021
if error == nil {
2122
completion((), error)
2223
} else {
@@ -28,7 +29,7 @@ open class AuthorizationV4Endpoints {
2829

2930
/**
3031
Deletes the unique access token identified in the request from the associate user's profile.
31-
- DELETE /v4/token
32+
- DELETE /v4/token/{token}
3233

3334
- API Key:
3435
- type: apiKey access_token (QUERY)
@@ -39,11 +40,15 @@ open class AuthorizationV4Endpoints {
3940
- API Key:
4041
- type: apiKey access_token (QUERY)
4142
- name: QUERY
43+
- parameter token: (path)
4244

4345
- returns: RequestBuilder<Void>
4446
*/
45-
open class func deleteTokenWithRequestBuilder() -> RequestBuilder<Void> {
46-
let path = "/v4/token"
47+
open class func deleteTokenWithRequestBuilder(token: String) -> RequestBuilder<Void> {
48+
var path = "/v4/token/{token}"
49+
let tokenPreEscape = "\(token)"
50+
let tokenPostEscape = tokenPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
51+
path = path.replacingOccurrences(of: "{token}", with: tokenPostEscape, options: .literal, range: nil)
4752
let URLString = ExtoleConsumerAPI.basePath + path
4853
let parameters: [String:Any]? = nil
4954
let url = URLComponents(string: URLString)
@@ -56,11 +61,10 @@ open class AuthorizationV4Endpoints {
5661
/**
5762
Deletes the unique access token identified in the request from the associate user's profile.
5863

59-
- parameter token: (path)
6064
- parameter completion: completion handler to receive the data and the error objects
6165
*/
62-
open class func deleteToken(token: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
63-
deleteTokenWithRequestBuilder(token: token).execute { (response, error) -> Void in
66+
open class func deleteToken(completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
67+
deleteTokenWithRequestBuilder().execute { (response, error) -> Void in
6468
if error == nil {
6569
completion((), error)
6670
} else {
@@ -72,7 +76,7 @@ open class AuthorizationV4Endpoints {
7276

7377
/**
7478
Deletes the unique access token identified in the request from the associate user's profile.
75-
- DELETE /v4/token/{token}
79+
- DELETE /v4/token
7680

7781
- API Key:
7882
- type: apiKey access_token (QUERY)
@@ -83,15 +87,11 @@ open class AuthorizationV4Endpoints {
8387
- API Key:
8488
- type: apiKey access_token (QUERY)
8589
- name: QUERY
86-
- parameter token: (path)
8790

8891
- returns: RequestBuilder<Void>
8992
*/
90-
open class func deleteTokenWithRequestBuilder(token: String) -> RequestBuilder<Void> {
91-
var path = "/v4/token/{token}"
92-
let tokenPreEscape = "\(token)"
93-
let tokenPostEscape = tokenPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
94-
path = path.replacingOccurrences(of: "{token}", with: tokenPostEscape, options: .literal, range: nil)
93+
open class func deleteTokenWithRequestBuilder() -> RequestBuilder<Void> {
94+
let path = "/v4/token"
9595
let URLString = ExtoleConsumerAPI.basePath + path
9696
let parameters: [String:Any]? = nil
9797
let url = URLComponents(string: URLString)

0 commit comments

Comments
 (0)