Skip to content

Commit 13a6b68

Browse files
authored
Merge pull request #111 from futuredapp/housekeep/add-templates
Add templates
2 parents 46528ab + 4a9cb96 commit 13a6b68

13 files changed

Lines changed: 152 additions & 1 deletion

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<img align="right" alt="FTAPIKit logo" src="Sources/FTAPIKit/Documentation.docc/Resources/FTAPIKit.svg">
1+
<img align="right" alt="FTAPIKit logo" src="Sources/FTAPIKit/Documentation.docc/Resources/FTAPIKit.svg" height="65">
22

33
# FTAPIKit
44

@@ -13,6 +13,7 @@
1313
Declarative and generic REST API framework using Codable.
1414
With standard implementation using URLSesssion and JSON encoder/decoder.
1515
Easily extensible for your asynchronous framework or networking stack.
16+
The repository also contains set of Xcode templates, see `Installation`.
1617

1718
## Installation
1819

@@ -29,6 +30,14 @@ When using CocoaPods add following line to your `Podfile`:
2930
pod 'FTAPIKit', '~> 1.5'
3031
```
3132

33+
The repository includes an API endpoint Xcode template for user convenience. You can install it using make:
34+
35+
```bash
36+
git clone --depth=1 https://github.com/futuredapp/FTAPIKit.git
37+
cd Templates
38+
make
39+
```
40+
3241
## Features
3342

3443
The main feature of this library is to provide documentation-like API
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// ___FILEHEADER___
2+
3+
import FTAPIKit
4+
5+
struct ___VARIABLE_templateName___Endpoint: APIEndpoint {
6+
7+
let path: String = ""
8+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// ___FILEHEADER___
2+
3+
import FTAPIKit
4+
5+
struct ___VARIABLE_templateName___Endpoint: APIRequestEndpoint {
6+
typealias Request = ___VARIABLE_templateName___Request
7+
8+
var body: ___VARIABLE_templateName___Request
9+
var path: String
10+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// ___FILEHEADER___
2+
3+
import Foundation
4+
5+
struct ___VARIABLE_templateName___Request: Encodable {
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// ___FILEHEADER___
2+
3+
import FTAPIKit
4+
5+
struct ___VARIABLE_templateName___Endpoint: APIRequestResponseEndpoint {
6+
typealias Response = ___VARIABLE_templateName___Response
7+
typealias Request = ___VARIABLE_templateName___Request
8+
9+
var body: ___VARIABLE_templateName___Request
10+
let path: String = ""
11+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// ___FILEHEADER___
2+
3+
import Foundation
4+
5+
struct ___VARIABLE_templateName___Request: Encodable {
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// ___FILEHEADER___
2+
3+
import Foundation
4+
5+
struct ___VARIABLE_templateName___Response: Decodable {
6+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// ___FILEHEADER___
2+
3+
import FTAPIKit
4+
5+
struct ___VARIABLE_templateName___Endpoint: APIResponseEndpoint {
6+
typealias Response = ___VARIABLE_templateName___Response
7+
8+
let path: String = ""
9+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// ___FILEHEADER___
2+
3+
import Foundation
4+
5+
struct ___VARIABLE_templateName___Response: Decodable {
6+
}
553 Bytes
Loading

0 commit comments

Comments
 (0)