Skip to content

Commit 493a5e3

Browse files
author
Josh Wolff
committed
Initial
0 parents  commit 493a5e3

File tree

185 files changed

+11216
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+11216
-0
lines changed

.gitignore

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/swift,xcode
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=swift,xcode
3+
4+
### Swift ###
5+
# Xcode
6+
#
7+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
8+
9+
## User settings
10+
xcuserdata/
11+
12+
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
13+
*.xcscmblueprint
14+
*.xccheckout
15+
16+
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
17+
build/
18+
DerivedData/
19+
*.moved-aside
20+
*.pbxuser
21+
!default.pbxuser
22+
*.mode1v3
23+
!default.mode1v3
24+
*.mode2v3
25+
!default.mode2v3
26+
*.perspectivev3
27+
!default.perspectivev3
28+
29+
## Obj-C/Swift specific
30+
*.hmap
31+
32+
## App packaging
33+
*.ipa
34+
*.dSYM.zip
35+
*.dSYM
36+
37+
## Playgrounds
38+
timeline.xctimeline
39+
playground.xcworkspace
40+
41+
# Swift Package Manager
42+
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
43+
# Packages/
44+
# Package.pins
45+
# Package.resolved
46+
# *.xcodeproj
47+
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
48+
# hence it is not needed unless you have added a package configuration file to your project
49+
# .swiftpm
50+
51+
.build/
52+
53+
# CocoaPods
54+
# We recommend against adding the Pods directory to your .gitignore. However
55+
# you should judge for yourself, the pros and cons are mentioned at:
56+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
57+
# Pods/
58+
# Add this line if you want to avoid checking in source code from the Xcode workspace
59+
# *.xcworkspace
60+
61+
# Carthage
62+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
63+
# Carthage/Checkouts
64+
65+
Carthage/Build/
66+
67+
# Add this lines if you are using Accio dependency management (Deprecated since Xcode 12)
68+
# Dependencies/
69+
# .accio/
70+
71+
# fastlane
72+
# It is recommended to not store the screenshots in the git repo.
73+
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
74+
# For more information about the recommended setup visit:
75+
# https://docs.fastlane.tools/best-practices/source-control/#source-control
76+
77+
fastlane/report.xml
78+
fastlane/Preview.html
79+
fastlane/screenshots/**/*.png
80+
fastlane/test_output
81+
82+
# Code Injection
83+
# After new code Injection tools there's a generated folder /iOSInjectionProject
84+
# https://github.com/johnno1962/injectionforxcode
85+
86+
iOSInjectionProject/
87+
88+
### Xcode ###
89+
# Xcode
90+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
91+
92+
93+
94+
95+
## Gcc Patch
96+
/*.gcno
97+
98+
### Xcode Patch ###
99+
*.xcodeproj/*
100+
!*.xcodeproj/project.pbxproj
101+
!*.xcodeproj/xcshareddata/
102+
!*.xcworkspace/contents.xcworkspacedata
103+
**/xcshareddata/WorkspaceSettings.xcsettings
104+
105+
# End of https://www.toptal.com/developers/gitignore/api/swift,xcode

.openapi-generator-ignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

.openapi-generator/FILES

+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
.gitignore
2+
Cartfile
3+
Package.swift
4+
README.md
5+
docs/ATAResponse.md
6+
docs/Account.md
7+
docs/AccountContext.md
8+
docs/AccountIsCandyMachine.md
9+
docs/AccountIsNFT.md
10+
docs/AccountValue.md
11+
docs/AirdropRequest.md
12+
docs/BalanceRequest.md
13+
docs/BalanceResponse.md
14+
docs/CreateTestCandyMachineRequest.md
15+
docs/CreateTestCandyMachineResponse.md
16+
docs/FileAPI.md
17+
docs/GetAllNFTsResponse.md
18+
docs/GetAllNFTsResponseMintedNfts.md
19+
docs/GetAllNFTsResponseUnmintedNfts.md
20+
docs/GetCandyDetailsErrorResponse.md
21+
docs/GetCandyDetailsRequest.md
22+
docs/GetCandyDetailsResponse.md
23+
docs/GetCandyMachineIDRequest.md
24+
docs/GetCandyMachineIDResponse.md
25+
docs/GetConfigInfoRequest.md
26+
docs/GetConfigInfoResponse.md
27+
docs/GetConfigInfoResponseCreators.md
28+
docs/GetFileResponse.md
29+
docs/GetMintedNFTsRequest.md
30+
docs/GetMintedNFTsResponse.md
31+
docs/GetPublicKeyRequest.md
32+
docs/ListNFTsResponse.md
33+
docs/MintNFTErrorResponse.md
34+
docs/MintNFTRequest.md
35+
docs/MintNFTResponse.md
36+
docs/NFT.md
37+
docs/NFTData.md
38+
docs/NFTMintErrorResponse.md
39+
docs/NFTMintFee.md
40+
docs/NFTMintRequest.md
41+
docs/NFTOwnerResponse.md
42+
docs/PublicKey.md
43+
docs/SecretPhrase.md
44+
docs/SolanaAccountAPI.md
45+
docs/SolanaCandyMachineAPI.md
46+
docs/SolanaNFTAPI.md
47+
docs/SolanaTransactionAPI.md
48+
docs/SolanaWalletAPI.md
49+
docs/Task.md
50+
docs/TaskAPI.md
51+
docs/Transaction.md
52+
docs/TransferRequest.md
53+
docs/TransferResponse.md
54+
docs/UploadFileRequest.md
55+
git_push.sh
56+
project.yml
57+
theblockchainapi.podspec
58+
theblockchainapi/Classes/OpenAPIs/APIHelper.swift
59+
theblockchainapi/Classes/OpenAPIs/APIs.swift
60+
theblockchainapi/Classes/OpenAPIs/APIs/FileAPI.swift
61+
theblockchainapi/Classes/OpenAPIs/APIs/SolanaAccountAPI.swift
62+
theblockchainapi/Classes/OpenAPIs/APIs/SolanaCandyMachineAPI.swift
63+
theblockchainapi/Classes/OpenAPIs/APIs/SolanaNFTAPI.swift
64+
theblockchainapi/Classes/OpenAPIs/APIs/SolanaTransactionAPI.swift
65+
theblockchainapi/Classes/OpenAPIs/APIs/SolanaWalletAPI.swift
66+
theblockchainapi/Classes/OpenAPIs/APIs/TaskAPI.swift
67+
theblockchainapi/Classes/OpenAPIs/CodableHelper.swift
68+
theblockchainapi/Classes/OpenAPIs/Configuration.swift
69+
theblockchainapi/Classes/OpenAPIs/Extensions.swift
70+
theblockchainapi/Classes/OpenAPIs/JSONDataEncoding.swift
71+
theblockchainapi/Classes/OpenAPIs/JSONEncodingHelper.swift
72+
theblockchainapi/Classes/OpenAPIs/Models.swift
73+
theblockchainapi/Classes/OpenAPIs/Models/ATAResponse.swift
74+
theblockchainapi/Classes/OpenAPIs/Models/Account.swift
75+
theblockchainapi/Classes/OpenAPIs/Models/AccountContext.swift
76+
theblockchainapi/Classes/OpenAPIs/Models/AccountIsCandyMachine.swift
77+
theblockchainapi/Classes/OpenAPIs/Models/AccountIsNFT.swift
78+
theblockchainapi/Classes/OpenAPIs/Models/AccountValue.swift
79+
theblockchainapi/Classes/OpenAPIs/Models/AirdropRequest.swift
80+
theblockchainapi/Classes/OpenAPIs/Models/BalanceRequest.swift
81+
theblockchainapi/Classes/OpenAPIs/Models/BalanceResponse.swift
82+
theblockchainapi/Classes/OpenAPIs/Models/CreateTestCandyMachineRequest.swift
83+
theblockchainapi/Classes/OpenAPIs/Models/CreateTestCandyMachineResponse.swift
84+
theblockchainapi/Classes/OpenAPIs/Models/GetAllNFTsResponse.swift
85+
theblockchainapi/Classes/OpenAPIs/Models/GetAllNFTsResponseMintedNfts.swift
86+
theblockchainapi/Classes/OpenAPIs/Models/GetAllNFTsResponseUnmintedNfts.swift
87+
theblockchainapi/Classes/OpenAPIs/Models/GetCandyDetailsErrorResponse.swift
88+
theblockchainapi/Classes/OpenAPIs/Models/GetCandyDetailsRequest.swift
89+
theblockchainapi/Classes/OpenAPIs/Models/GetCandyDetailsResponse.swift
90+
theblockchainapi/Classes/OpenAPIs/Models/GetCandyMachineIDRequest.swift
91+
theblockchainapi/Classes/OpenAPIs/Models/GetCandyMachineIDResponse.swift
92+
theblockchainapi/Classes/OpenAPIs/Models/GetConfigInfoRequest.swift
93+
theblockchainapi/Classes/OpenAPIs/Models/GetConfigInfoResponse.swift
94+
theblockchainapi/Classes/OpenAPIs/Models/GetConfigInfoResponseCreators.swift
95+
theblockchainapi/Classes/OpenAPIs/Models/GetFileResponse.swift
96+
theblockchainapi/Classes/OpenAPIs/Models/GetMintedNFTsRequest.swift
97+
theblockchainapi/Classes/OpenAPIs/Models/GetMintedNFTsResponse.swift
98+
theblockchainapi/Classes/OpenAPIs/Models/GetPublicKeyRequest.swift
99+
theblockchainapi/Classes/OpenAPIs/Models/ListNFTsResponse.swift
100+
theblockchainapi/Classes/OpenAPIs/Models/MintNFTErrorResponse.swift
101+
theblockchainapi/Classes/OpenAPIs/Models/MintNFTRequest.swift
102+
theblockchainapi/Classes/OpenAPIs/Models/MintNFTResponse.swift
103+
theblockchainapi/Classes/OpenAPIs/Models/NFT.swift
104+
theblockchainapi/Classes/OpenAPIs/Models/NFTData.swift
105+
theblockchainapi/Classes/OpenAPIs/Models/NFTMintErrorResponse.swift
106+
theblockchainapi/Classes/OpenAPIs/Models/NFTMintFee.swift
107+
theblockchainapi/Classes/OpenAPIs/Models/NFTMintRequest.swift
108+
theblockchainapi/Classes/OpenAPIs/Models/NFTOwnerResponse.swift
109+
theblockchainapi/Classes/OpenAPIs/Models/PublicKey.swift
110+
theblockchainapi/Classes/OpenAPIs/Models/SecretPhrase.swift
111+
theblockchainapi/Classes/OpenAPIs/Models/Task.swift
112+
theblockchainapi/Classes/OpenAPIs/Models/Transaction.swift
113+
theblockchainapi/Classes/OpenAPIs/Models/TransferRequest.swift
114+
theblockchainapi/Classes/OpenAPIs/Models/TransferResponse.swift
115+
theblockchainapi/Classes/OpenAPIs/Models/UploadFileRequest.swift
116+
theblockchainapi/Classes/OpenAPIs/OpenISO8601DateFormatter.swift
117+
theblockchainapi/Classes/OpenAPIs/SynchronizedDictionary.swift
118+
theblockchainapi/Classes/OpenAPIs/URLSessionImplementations.swift

.openapi-generator/VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5.3.0

Cartfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github "Flight-School/AnyCodable" ~> 0.6.1

OpenAPIClient.podspec

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Pod::Spec.new do |s|
2+
s.name = 'OpenAPIClient'
3+
s.ios.deployment_target = '9.0'
4+
s.osx.deployment_target = '10.11'
5+
s.tvos.deployment_target = '9.0'
6+
s.watchos.deployment_target = '3.0'
7+
s.version = 'null'
8+
s.source = { :git => '[email protected]:OpenAPITools/openapi-generator.git', :tag => 'vnull' }
9+
s.authors = 'OpenAPI Generator'
10+
s.license = 'Proprietary'
11+
s.homepage = 'https://github.com/OpenAPITools/openapi-generator'
12+
s.summary = 'OpenAPIClient Swift SDK'
13+
s.source_files = 'OpenAPIClient/Classes/**/*.swift'
14+
s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1'
15+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// APIHelper.swift
2+
//
3+
// Generated by openapi-generator
4+
// https://openapi-generator.tech
5+
//
6+
7+
import Foundation
8+
9+
public struct APIHelper {
10+
public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? {
11+
let destination = source.reduce(into: [String: Any]()) { result, item in
12+
if let value = item.value {
13+
result[item.key] = value
14+
}
15+
}
16+
17+
if destination.isEmpty {
18+
return nil
19+
}
20+
return destination
21+
}
22+
23+
public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] {
24+
return source.reduce(into: [String: String]()) { result, item in
25+
if let collection = item.value as? [Any?] {
26+
result[item.key] = collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
27+
} else if let value: Any = item.value {
28+
result[item.key] = "\(value)"
29+
}
30+
}
31+
}
32+
33+
public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? {
34+
guard let source = source else {
35+
return nil
36+
}
37+
38+
return source.reduce(into: [String: Any]()) { result, item in
39+
switch item.value {
40+
case let x as Bool:
41+
result[item.key] = x.description
42+
default:
43+
result[item.key] = item.value
44+
}
45+
}
46+
}
47+
48+
public static func mapValueToPathItem(_ source: Any) -> Any {
49+
if let collection = source as? [Any?] {
50+
return collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
51+
}
52+
return source
53+
}
54+
55+
public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? {
56+
let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in
57+
if let collection = item.value as? [Any?] {
58+
collection.filter { $0 != nil }.map { "\($0!)" }.forEach { value in
59+
result.append(URLQueryItem(name: item.key, value: value))
60+
}
61+
} else if let value = item.value {
62+
result.append(URLQueryItem(name: item.key, value: "\(value)"))
63+
}
64+
}
65+
66+
if destination.isEmpty {
67+
return nil
68+
}
69+
return destination
70+
}
71+
}

0 commit comments

Comments
 (0)