-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
files/xcode/templates/file/Source/PFFKit - Network Request.xctemplate/TemplateInfo.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>Identifier</key> | ||
<string>com.pro-football-focus.xcode-template.network-request</string> | ||
<key>Kind</key> | ||
<string>Xcode.IDEFoundation.TextSubstitutionFileTemplateKind</string> | ||
<key>SupportsSwiftPackage</key> | ||
<true/> | ||
<key>Description</key> | ||
<string>A new PFFKit network request.</string> | ||
<key>Summary</key> | ||
<string>PFFKit Networking</string> | ||
<key>SortOrder</key> | ||
<string>1</string> | ||
<key>AllowedTypes</key> | ||
<array> | ||
<string>public.swift-source</string> | ||
</array> | ||
<key>DefaultCompletionName</key> | ||
<string>NewNetworkRequest</string> | ||
<key>MainTemplateFile</key> | ||
<string>___FILEBASENAME___Request.swift</string> | ||
<key>Image</key> | ||
<dict> | ||
<key>FileTypeIcon</key> | ||
<string>swift</string> | ||
</dict> | ||
<key>Options</key> | ||
<array> | ||
<dict> | ||
<key>Identifier</key> | ||
<string>productName</string> | ||
<key>Required</key> | ||
<true/> | ||
<key>Name</key> | ||
<string>Name:</string> | ||
<key>Description</key> | ||
<string>The name of the request to create</string> | ||
<key>Type</key> | ||
<string>text</string> | ||
<key>NotPersisted</key> | ||
<true/> | ||
</dict> | ||
</array> | ||
</dict> | ||
</plist> |
22 changes: 22 additions & 0 deletions
22
...templates/file/Source/PFFKit - Network Request.xctemplate/___FILEBASENAME___Request.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Foundation | ||
|
||
/// <#Documentation#> | ||
struct ___FILEBASENAMEASIDENTIFIER___Request: NetworkRequest { | ||
typealias Output = Response | ||
|
||
let apiVersion: APIVersion = .v1 | ||
let league: League = .nfl | ||
let method: HTTPMethod = .get | ||
let path: String | ||
let queryItems: [URLQueryItem] = [] | ||
let headers: [HTTPRequestHeaderKey: String] = [:] | ||
|
||
init(<#Initializer Inputs#>) { | ||
self.path = <#Path#> | ||
} | ||
|
||
struct Response: Codable { | ||
<#Response Payload#> | ||
} | ||
|
||
} |