Skip to content

Commit 892ecbc

Browse files
committed
[Update] Separate APIParametrizable and AnyAPIParameter into new files
1 parent f0cded3 commit 892ecbc

4 files changed

Lines changed: 24 additions & 6 deletions

File tree

Sources/Core/RequestInfo/APIParameterConvertible.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88

99
import Foundation
1010

11-
/// Used to constrain what types can be used as api parameters.
12-
public typealias APIParametrizable = AnyAPIParameter.Input
13-
1411
/// Means that the type can be converted to an interface parameter for requesting an api.
1512
public protocol APIParameterConvertible {
1613
/// Converts the target to an Encodable-compliant type.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//
2+
// APIParametrizable.swift
3+
// RaAPIWrapper
4+
//
5+
// Created by Rakuyo on 2023/01/13.
6+
// Copyright © 2022 Rakuyo. All rights reserved.
7+
//
8+
9+
import Foundation
10+
11+
/// Used to constrain what types can be used as api parameters.
12+
public typealias APIParametrizable = AnyAPIHashableParameter.Input

Sources/Core/RequestInfo/AnyAPIHashable/AnyAPIHashableParameter.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88

99
import Foundation
1010

11-
/// Represents an arbitrary api parameter.
12-
public typealias AnyAPIParameter = AnyAPIHashableParameter
13-
1411
/// Make `Encodable` follow `Hashable` protocol.
1512
public struct AnyAPIHashableParameter: AnyAPIHashable {
1613
public typealias Value = Encodable
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//
2+
// AnyAPIParameter.swift
3+
// RaAPIWrapper
4+
//
5+
// Created by Rakuyo on 2023/01/13.
6+
// Copyright © 2022 Rakuyo. All rights reserved.
7+
//
8+
9+
import Foundation
10+
11+
/// Represents an arbitrary api parameter.
12+
public typealias AnyAPIParameter = AnyAPIHashableParameter

0 commit comments

Comments
 (0)