Skip to content

Commit

Permalink
Add PFFKit network request template
Browse files Browse the repository at this point in the history
  • Loading branch information
justin committed Jun 27, 2024
1 parent 71e7027 commit b1aff3a
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
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>
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#>
}

}

0 comments on commit b1aff3a

Please sign in to comment.