├── .gitignore ├── Images ├── demo.gif └── project-structure.png ├── LICENSE ├── README.md └── SwiftUI-MVVM-C ├── SwiftUI-MVVM-C.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ ├── IDEWorkspaceChecks.plist │ └── swiftpm │ └── Package.resolved ├── SwiftUI-MVVM-C ├── AppDelegate.swift ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ └── LaunchScreen.storyboard ├── CommonShared │ ├── Extensions │ │ ├── Binding+Utils.swift │ │ ├── Publisher+Utils.swift │ │ └── View+Utils.swift │ ├── Networking │ │ └── NetworkProvider │ │ │ ├── NetworkClient.swift │ │ │ ├── NetworkProvider.swift │ │ │ └── NetworkUtils.swift │ ├── Utils │ │ └── Container.swift │ └── Views │ │ └── EmptyNavigationLink.swift ├── ContentView.swift ├── Info.plist ├── Modules │ ├── Profile │ │ ├── Profile │ │ │ ├── ProfileView.swift │ │ │ └── ProfileViewModel.swift │ │ └── ProfileCoordinator.swift │ └── RepoList │ │ ├── RepoDetails │ │ ├── RepoDetailsView.swift │ │ └── RepoDetailsViewModel.swift │ │ ├── RepoList │ │ ├── RepoCell.swift │ │ ├── RepoListView.swift │ │ └── RepoListViewModel.swift │ │ └── RepoListCoordinator.swift ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── SceneDelegate.swift └── Shared │ ├── Models │ ├── Repo.swift │ └── User.swift │ └── Networking │ ├── GithubNetworkProvider.swift │ └── GithubRouter.swift └── SwiftUI-MVVM-CTests ├── Info.plist ├── MockData └── repos.json ├── Networking └── MockNetworkClient.swift ├── SwiftUI_MVVM_CTests.swift └── TestUtils.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## User settings 6 | xcuserdata/ 7 | 8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 9 | *.xcscmblueprint 10 | *.xccheckout 11 | 12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 13 | build/ 14 | DerivedData/ 15 | *.moved-aside 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | 28 | ## App packaging 29 | *.ipa 30 | *.dSYM.zip 31 | *.dSYM 32 | 33 | ## Playgrounds 34 | timeline.xctimeline 35 | playground.xcworkspace 36 | 37 | # Swift Package Manager 38 | # 39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 40 | # Packages/ 41 | # Package.pins 42 | # Package.resolved 43 | # *.xcodeproj 44 | # 45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 46 | # hence it is not needed unless you have added a package configuration file to your project 47 | # .swiftpm 48 | 49 | .build/ 50 | 51 | # CocoaPods 52 | # 53 | # We recommend against adding the Pods directory to your .gitignore. However 54 | # you should judge for yourself, the pros and cons are mentioned at: 55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 56 | # 57 | # Pods/ 58 | # 59 | # Add this line if you want to avoid checking in source code from the Xcode workspace 60 | # *.xcworkspace 61 | 62 | # Carthage 63 | # 64 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 65 | # Carthage/Checkouts 66 | 67 | Carthage/Build/ 68 | 69 | # Accio dependency management 70 | Dependencies/ 71 | .accio/ 72 | 73 | # fastlane 74 | # 75 | # It is recommended to not store the screenshots in the git repo. 76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 77 | # For more information about the recommended setup visit: 78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 79 | 80 | fastlane/report.xml 81 | fastlane/Preview.html 82 | fastlane/screenshots/**/*.png 83 | fastlane/test_output 84 | 85 | # Code Injection 86 | # 87 | # After new code Injection tools there's a generated folder /iOSInjectionProject 88 | # https://github.com/johnno1962/injectionforxcode 89 | 90 | iOSInjectionProject/ 91 | -------------------------------------------------------------------------------- /Images/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huynguyencong/SwiftUI-MVVM-C/fec971c98b46f35e380dee0c325706bc06c8f15a/Images/demo.gif -------------------------------------------------------------------------------- /Images/project-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huynguyencong/SwiftUI-MVVM-C/fec971c98b46f35e380dee0c325706bc06c8f15a/Images/project-structure.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Huy Nguyen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SwiftUI-MVVM-C 2 | A template project that uses SwiftUI for UI, Combine for event handling, MVVM-C for software architecture. 3 | 4 | I have done some small projects using SwiftUI. It is really cool, simple and fast, but also have some thing need to be improved, that surely will be improved by Apple in the future. After that, I have been improving the project structure little by little, restructure it with the MVVM-C architecture, what I have used in most UIKit projects before. Today, I am publishing a simple project, that conclude what I have learned, used in my SwiftUI projects. 5 | 6 | If you are using UIKit, this is UIKit version: https://github.com/huynguyencong/UIKit-MVVM-C 7 | 8 | ## Demo screen record 9 | 10 | ![Demo](Images/demo.gif) 11 | 12 | ## Compatibility 13 | - iOS 14 and later 14 | - SwiftUI 2 and later 15 | - Swift 5 and later 16 | 17 | ## Project overview 18 | The project uses the GitHub API to load a repo list of a user, show repo details when users tap on a repo. You can also tap on the top right icon to see user's profile. In this project, it is showing my repos. You can change it in the `username` static constant in `ContentView` view. 19 | 20 | The project uses MVVM-C (aka Model - View - ViewModel - Coordinator). Why is there Coordinator here? The Coordinator is an additional part for the MVVM, that help to separate navigation handling code to a different place, instead of putting it in the View (or View Controller in UIKit). It makes the view (or view controller in UIKit) more reusable, smaller. In my SwiftUI projects, Coordinator is a View, but only for handling navigation event purpose. 21 | 22 | ## What you can find in this project 23 | - MVVM-C implement with SwiftUI and Combine framework. 24 | - Networking with Combine framework, written in the way that help to test it, and integrate other 3rd parties API easily. 25 | - Unit test: Mock network data, view model test, dependency injection, etc. 26 | - Some useful extensions. 27 | - Structure of a SwiftUI project. 28 | 29 | ## Project structure 30 | ![Project structure](Images/project-structure.png) 31 | 32 | ## License 33 | Copyright huynguyencong, Licensed under the MIT license. 34 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 52; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 43552D7526535EC100E97D8D /* Binding+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43552D7426535EC100E97D8D /* Binding+Utils.swift */; }; 11 | 43552D7A2653603200E97D8D /* EmptyNavigationLink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43552D792653603200E97D8D /* EmptyNavigationLink.swift */; }; 12 | 43552D7F2653670800E97D8D /* RepoDetailsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43552D7E2653670800E97D8D /* RepoDetailsView.swift */; }; 13 | 43552D85265376F300E97D8D /* RepoDetailsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43552D84265376F300E97D8D /* RepoDetailsViewModel.swift */; }; 14 | 43552D892653777800E97D8D /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43552D882653777800E97D8D /* User.swift */; }; 15 | 43552D8E2653877700E97D8D /* Container.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43552D8D2653877700E97D8D /* Container.swift */; }; 16 | 43552D9B2653A23400E97D8D /* ProfileCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43552D9A2653A23400E97D8D /* ProfileCoordinator.swift */; }; 17 | 43552DA02653A24700E97D8D /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43552D9F2653A24700E97D8D /* ProfileView.swift */; }; 18 | 43552DA62653B44D00E97D8D /* ProfileViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43552DA52653B44C00E97D8D /* ProfileViewModel.swift */; }; 19 | 43552DAA2653B8CF00E97D8D /* Publisher+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43552DA92653B8CF00E97D8D /* Publisher+Utils.swift */; }; 20 | 43736D7F2652280700CE4368 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43736D7E2652280700CE4368 /* AppDelegate.swift */; }; 21 | 43736D812652280700CE4368 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43736D802652280700CE4368 /* SceneDelegate.swift */; }; 22 | 43736D832652280700CE4368 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43736D822652280700CE4368 /* ContentView.swift */; }; 23 | 43736D852652280900CE4368 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 43736D842652280900CE4368 /* Assets.xcassets */; }; 24 | 43736D882652280900CE4368 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 43736D872652280900CE4368 /* Preview Assets.xcassets */; }; 25 | 43736D8B2652280900CE4368 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 43736D892652280900CE4368 /* LaunchScreen.storyboard */; }; 26 | 43A6019E26522CFF00B24B9D /* Alamofire in Frameworks */ = {isa = PBXBuildFile; productRef = 43A6019D26522CFF00B24B9D /* Alamofire */; }; 27 | 43A601A426522DBA00B24B9D /* NetworkProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A601A326522DBA00B24B9D /* NetworkProvider.swift */; }; 28 | 43A601A726522E0F00B24B9D /* NetworkClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A601A626522E0F00B24B9D /* NetworkClient.swift */; }; 29 | 43A601B52652309900B24B9D /* NetworkUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A601B42652309900B24B9D /* NetworkUtils.swift */; }; 30 | 43A601BA2652560200B24B9D /* GithubNetworkProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A601B92652560200B24B9D /* GithubNetworkProvider.swift */; }; 31 | 43A601BE2652561E00B24B9D /* GithubRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A601BD2652561E00B24B9D /* GithubRouter.swift */; }; 32 | 43A601C3265257EE00B24B9D /* Repo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A601C2265257EE00B24B9D /* Repo.swift */; }; 33 | 43A601CD265267C000B24B9D /* SwiftUI_MVVM_CTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A601CC265267C000B24B9D /* SwiftUI_MVVM_CTests.swift */; }; 34 | 43A601DA2652687F00B24B9D /* repos.json in Resources */ = {isa = PBXBuildFile; fileRef = 43A601D92652687F00B24B9D /* repos.json */; }; 35 | 43A601E0265268BD00B24B9D /* TestUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A601DF265268BD00B24B9D /* TestUtils.swift */; }; 36 | 43A601E526526AAC00B24B9D /* MockNetworkClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A601E426526AAC00B24B9D /* MockNetworkClient.swift */; }; 37 | 43A601ED265272E800B24B9D /* RepoListCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A601EC265272E800B24B9D /* RepoListCoordinator.swift */; }; 38 | 43A601F3265272F600B24B9D /* RepoListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A601F2265272F600B24B9D /* RepoListView.swift */; }; 39 | 43A601F8265273B700B24B9D /* RepoListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A601F7265273B700B24B9D /* RepoListViewModel.swift */; }; 40 | 43A601FF2652780100B24B9D /* View+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A601FE2652780100B24B9D /* View+Utils.swift */; }; 41 | 43A60203265278A600B24B9D /* RepoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A60202265278A600B24B9D /* RepoCell.swift */; }; 42 | /* End PBXBuildFile section */ 43 | 44 | /* Begin PBXContainerItemProxy section */ 45 | 43A601CF265267C000B24B9D /* PBXContainerItemProxy */ = { 46 | isa = PBXContainerItemProxy; 47 | containerPortal = 43736D732652280700CE4368 /* Project object */; 48 | proxyType = 1; 49 | remoteGlobalIDString = 43736D7A2652280700CE4368; 50 | remoteInfo = "SwiftUI-MVVM-C"; 51 | }; 52 | /* End PBXContainerItemProxy section */ 53 | 54 | /* Begin PBXFileReference section */ 55 | 43552D7426535EC100E97D8D /* Binding+Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Binding+Utils.swift"; sourceTree = ""; }; 56 | 43552D792653603200E97D8D /* EmptyNavigationLink.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyNavigationLink.swift; sourceTree = ""; }; 57 | 43552D7E2653670800E97D8D /* RepoDetailsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepoDetailsView.swift; sourceTree = ""; }; 58 | 43552D84265376F300E97D8D /* RepoDetailsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepoDetailsViewModel.swift; sourceTree = ""; }; 59 | 43552D882653777800E97D8D /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; 60 | 43552D8D2653877700E97D8D /* Container.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Container.swift; sourceTree = ""; }; 61 | 43552D9A2653A23400E97D8D /* ProfileCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileCoordinator.swift; sourceTree = ""; }; 62 | 43552D9F2653A24700E97D8D /* ProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = ""; }; 63 | 43552DA52653B44C00E97D8D /* ProfileViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewModel.swift; sourceTree = ""; }; 64 | 43552DA92653B8CF00E97D8D /* Publisher+Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Publisher+Utils.swift"; sourceTree = ""; }; 65 | 43736D7B2652280700CE4368 /* SwiftUI-MVVM-C.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SwiftUI-MVVM-C.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 66 | 43736D7E2652280700CE4368 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 67 | 43736D802652280700CE4368 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 68 | 43736D822652280700CE4368 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 69 | 43736D842652280900CE4368 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 70 | 43736D872652280900CE4368 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 71 | 43736D8A2652280900CE4368 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 72 | 43736D8C2652280900CE4368 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 73 | 43A601A326522DBA00B24B9D /* NetworkProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkProvider.swift; sourceTree = ""; }; 74 | 43A601A626522E0F00B24B9D /* NetworkClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkClient.swift; sourceTree = ""; }; 75 | 43A601B42652309900B24B9D /* NetworkUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkUtils.swift; sourceTree = ""; }; 76 | 43A601B92652560200B24B9D /* GithubNetworkProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GithubNetworkProvider.swift; sourceTree = ""; }; 77 | 43A601BD2652561E00B24B9D /* GithubRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GithubRouter.swift; sourceTree = ""; }; 78 | 43A601C2265257EE00B24B9D /* Repo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Repo.swift; sourceTree = ""; }; 79 | 43A601CA265267C000B24B9D /* SwiftUI-MVVM-CTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SwiftUI-MVVM-CTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 80 | 43A601CC265267C000B24B9D /* SwiftUI_MVVM_CTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUI_MVVM_CTests.swift; sourceTree = ""; }; 81 | 43A601CE265267C000B24B9D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 82 | 43A601D92652687F00B24B9D /* repos.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = repos.json; sourceTree = ""; }; 83 | 43A601DF265268BD00B24B9D /* TestUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestUtils.swift; sourceTree = ""; }; 84 | 43A601E426526AAC00B24B9D /* MockNetworkClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockNetworkClient.swift; sourceTree = ""; }; 85 | 43A601EC265272E800B24B9D /* RepoListCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepoListCoordinator.swift; sourceTree = ""; }; 86 | 43A601F2265272F600B24B9D /* RepoListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepoListView.swift; sourceTree = ""; }; 87 | 43A601F7265273B700B24B9D /* RepoListViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepoListViewModel.swift; sourceTree = ""; }; 88 | 43A601FE2652780100B24B9D /* View+Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "View+Utils.swift"; sourceTree = ""; }; 89 | 43A60202265278A600B24B9D /* RepoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepoCell.swift; sourceTree = ""; }; 90 | /* End PBXFileReference section */ 91 | 92 | /* Begin PBXFrameworksBuildPhase section */ 93 | 43736D782652280700CE4368 /* Frameworks */ = { 94 | isa = PBXFrameworksBuildPhase; 95 | buildActionMask = 2147483647; 96 | files = ( 97 | 43A6019E26522CFF00B24B9D /* Alamofire in Frameworks */, 98 | ); 99 | runOnlyForDeploymentPostprocessing = 0; 100 | }; 101 | 43A601C7265267C000B24B9D /* Frameworks */ = { 102 | isa = PBXFrameworksBuildPhase; 103 | buildActionMask = 2147483647; 104 | files = ( 105 | ); 106 | runOnlyForDeploymentPostprocessing = 0; 107 | }; 108 | /* End PBXFrameworksBuildPhase section */ 109 | 110 | /* Begin PBXGroup section */ 111 | 43552D782653601F00E97D8D /* Views */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | 43552D792653603200E97D8D /* EmptyNavigationLink.swift */, 115 | ); 116 | path = Views; 117 | sourceTree = ""; 118 | }; 119 | 43552D7D265366F400E97D8D /* RepoDetails */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 43552D7E2653670800E97D8D /* RepoDetailsView.swift */, 123 | 43552D84265376F300E97D8D /* RepoDetailsViewModel.swift */, 124 | ); 125 | path = RepoDetails; 126 | sourceTree = ""; 127 | }; 128 | 43552D8C2653876C00E97D8D /* Utils */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 43552D8D2653877700E97D8D /* Container.swift */, 132 | ); 133 | path = Utils; 134 | sourceTree = ""; 135 | }; 136 | 43552D932653A1C000E97D8D /* Profile */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 43552D9E2653A23D00E97D8D /* Profile */, 140 | 43552D9A2653A23400E97D8D /* ProfileCoordinator.swift */, 141 | ); 142 | path = Profile; 143 | sourceTree = ""; 144 | }; 145 | 43552D9E2653A23D00E97D8D /* Profile */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 43552D9F2653A24700E97D8D /* ProfileView.swift */, 149 | 43552DA52653B44C00E97D8D /* ProfileViewModel.swift */, 150 | ); 151 | path = Profile; 152 | sourceTree = ""; 153 | }; 154 | 43736D722652280700CE4368 = { 155 | isa = PBXGroup; 156 | children = ( 157 | 43736D7D2652280700CE4368 /* SwiftUI-MVVM-C */, 158 | 43A601CB265267C000B24B9D /* SwiftUI-MVVM-CTests */, 159 | 43736D7C2652280700CE4368 /* Products */, 160 | ); 161 | sourceTree = ""; 162 | }; 163 | 43736D7C2652280700CE4368 /* Products */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | 43736D7B2652280700CE4368 /* SwiftUI-MVVM-C.app */, 167 | 43A601CA265267C000B24B9D /* SwiftUI-MVVM-CTests.xctest */, 168 | ); 169 | name = Products; 170 | sourceTree = ""; 171 | }; 172 | 43736D7D2652280700CE4368 /* SwiftUI-MVVM-C */ = { 173 | isa = PBXGroup; 174 | children = ( 175 | 43A601EA265272B500B24B9D /* Modules */, 176 | 43A601A026522D1500B24B9D /* Shared */, 177 | 43A601B7265255BC00B24B9D /* CommonShared */, 178 | 43736D7E2652280700CE4368 /* AppDelegate.swift */, 179 | 43736D802652280700CE4368 /* SceneDelegate.swift */, 180 | 43736D822652280700CE4368 /* ContentView.swift */, 181 | 43736D842652280900CE4368 /* Assets.xcassets */, 182 | 43736D892652280900CE4368 /* LaunchScreen.storyboard */, 183 | 43736D8C2652280900CE4368 /* Info.plist */, 184 | 43736D862652280900CE4368 /* Preview Content */, 185 | ); 186 | path = "SwiftUI-MVVM-C"; 187 | sourceTree = ""; 188 | }; 189 | 43736D862652280900CE4368 /* Preview Content */ = { 190 | isa = PBXGroup; 191 | children = ( 192 | 43736D872652280900CE4368 /* Preview Assets.xcassets */, 193 | ); 194 | path = "Preview Content"; 195 | sourceTree = ""; 196 | }; 197 | 43A601A026522D1500B24B9D /* Shared */ = { 198 | isa = PBXGroup; 199 | children = ( 200 | 43A601C1265257E200B24B9D /* Models */, 201 | 43A601B8265255F300B24B9D /* Networking */, 202 | ); 203 | path = Shared; 204 | sourceTree = ""; 205 | }; 206 | 43A601A126522D2A00B24B9D /* Networking */ = { 207 | isa = PBXGroup; 208 | children = ( 209 | 43A601A226522D9F00B24B9D /* NetworkProvider */, 210 | ); 211 | path = Networking; 212 | sourceTree = ""; 213 | }; 214 | 43A601A226522D9F00B24B9D /* NetworkProvider */ = { 215 | isa = PBXGroup; 216 | children = ( 217 | 43A601A326522DBA00B24B9D /* NetworkProvider.swift */, 218 | 43A601A626522E0F00B24B9D /* NetworkClient.swift */, 219 | 43A601B42652309900B24B9D /* NetworkUtils.swift */, 220 | ); 221 | path = NetworkProvider; 222 | sourceTree = ""; 223 | }; 224 | 43A601B7265255BC00B24B9D /* CommonShared */ = { 225 | isa = PBXGroup; 226 | children = ( 227 | 43552D8C2653876C00E97D8D /* Utils */, 228 | 43552D782653601F00E97D8D /* Views */, 229 | 43A601FD265277F400B24B9D /* Extensions */, 230 | 43A601A126522D2A00B24B9D /* Networking */, 231 | ); 232 | path = CommonShared; 233 | sourceTree = ""; 234 | }; 235 | 43A601B8265255F300B24B9D /* Networking */ = { 236 | isa = PBXGroup; 237 | children = ( 238 | 43A601B92652560200B24B9D /* GithubNetworkProvider.swift */, 239 | 43A601BD2652561E00B24B9D /* GithubRouter.swift */, 240 | ); 241 | path = Networking; 242 | sourceTree = ""; 243 | }; 244 | 43A601C1265257E200B24B9D /* Models */ = { 245 | isa = PBXGroup; 246 | children = ( 247 | 43A601C2265257EE00B24B9D /* Repo.swift */, 248 | 43552D882653777800E97D8D /* User.swift */, 249 | ); 250 | path = Models; 251 | sourceTree = ""; 252 | }; 253 | 43A601CB265267C000B24B9D /* SwiftUI-MVVM-CTests */ = { 254 | isa = PBXGroup; 255 | children = ( 256 | 43A601E326526A6F00B24B9D /* Networking */, 257 | 43A601D82652684700B24B9D /* MockData */, 258 | 43A601CC265267C000B24B9D /* SwiftUI_MVVM_CTests.swift */, 259 | 43A601CE265267C000B24B9D /* Info.plist */, 260 | 43A601DF265268BD00B24B9D /* TestUtils.swift */, 261 | ); 262 | path = "SwiftUI-MVVM-CTests"; 263 | sourceTree = ""; 264 | }; 265 | 43A601D82652684700B24B9D /* MockData */ = { 266 | isa = PBXGroup; 267 | children = ( 268 | 43A601D92652687F00B24B9D /* repos.json */, 269 | ); 270 | path = MockData; 271 | sourceTree = ""; 272 | }; 273 | 43A601E326526A6F00B24B9D /* Networking */ = { 274 | isa = PBXGroup; 275 | children = ( 276 | 43A601E426526AAC00B24B9D /* MockNetworkClient.swift */, 277 | ); 278 | path = Networking; 279 | sourceTree = ""; 280 | }; 281 | 43A601EA265272B500B24B9D /* Modules */ = { 282 | isa = PBXGroup; 283 | children = ( 284 | 43552D932653A1C000E97D8D /* Profile */, 285 | 43A601EB265272BC00B24B9D /* RepoList */, 286 | ); 287 | path = Modules; 288 | sourceTree = ""; 289 | }; 290 | 43A601EB265272BC00B24B9D /* RepoList */ = { 291 | isa = PBXGroup; 292 | children = ( 293 | 43552D7D265366F400E97D8D /* RepoDetails */, 294 | 43A601F6265273A600B24B9D /* RepoList */, 295 | 43A601EC265272E800B24B9D /* RepoListCoordinator.swift */, 296 | ); 297 | path = RepoList; 298 | sourceTree = ""; 299 | }; 300 | 43A601F6265273A600B24B9D /* RepoList */ = { 301 | isa = PBXGroup; 302 | children = ( 303 | 43A601F2265272F600B24B9D /* RepoListView.swift */, 304 | 43A601F7265273B700B24B9D /* RepoListViewModel.swift */, 305 | 43A60202265278A600B24B9D /* RepoCell.swift */, 306 | ); 307 | path = RepoList; 308 | sourceTree = ""; 309 | }; 310 | 43A601FD265277F400B24B9D /* Extensions */ = { 311 | isa = PBXGroup; 312 | children = ( 313 | 43A601FE2652780100B24B9D /* View+Utils.swift */, 314 | 43552D7426535EC100E97D8D /* Binding+Utils.swift */, 315 | 43552DA92653B8CF00E97D8D /* Publisher+Utils.swift */, 316 | ); 317 | path = Extensions; 318 | sourceTree = ""; 319 | }; 320 | /* End PBXGroup section */ 321 | 322 | /* Begin PBXNativeTarget section */ 323 | 43736D7A2652280700CE4368 /* SwiftUI-MVVM-C */ = { 324 | isa = PBXNativeTarget; 325 | buildConfigurationList = 43736D8F2652280900CE4368 /* Build configuration list for PBXNativeTarget "SwiftUI-MVVM-C" */; 326 | buildPhases = ( 327 | 43736D772652280700CE4368 /* Sources */, 328 | 43736D782652280700CE4368 /* Frameworks */, 329 | 43736D792652280700CE4368 /* Resources */, 330 | ); 331 | buildRules = ( 332 | ); 333 | dependencies = ( 334 | ); 335 | name = "SwiftUI-MVVM-C"; 336 | packageProductDependencies = ( 337 | 43A6019D26522CFF00B24B9D /* Alamofire */, 338 | ); 339 | productName = "SwiftUI-MVVM-C"; 340 | productReference = 43736D7B2652280700CE4368 /* SwiftUI-MVVM-C.app */; 341 | productType = "com.apple.product-type.application"; 342 | }; 343 | 43A601C9265267C000B24B9D /* SwiftUI-MVVM-CTests */ = { 344 | isa = PBXNativeTarget; 345 | buildConfigurationList = 43A601D3265267C100B24B9D /* Build configuration list for PBXNativeTarget "SwiftUI-MVVM-CTests" */; 346 | buildPhases = ( 347 | 43A601C6265267C000B24B9D /* Sources */, 348 | 43A601C7265267C000B24B9D /* Frameworks */, 349 | 43A601C8265267C000B24B9D /* Resources */, 350 | ); 351 | buildRules = ( 352 | ); 353 | dependencies = ( 354 | 43A601D0265267C000B24B9D /* PBXTargetDependency */, 355 | ); 356 | name = "SwiftUI-MVVM-CTests"; 357 | productName = "SwiftUI-MVVM-CTests"; 358 | productReference = 43A601CA265267C000B24B9D /* SwiftUI-MVVM-CTests.xctest */; 359 | productType = "com.apple.product-type.bundle.unit-test"; 360 | }; 361 | /* End PBXNativeTarget section */ 362 | 363 | /* Begin PBXProject section */ 364 | 43736D732652280700CE4368 /* Project object */ = { 365 | isa = PBXProject; 366 | attributes = { 367 | LastSwiftUpdateCheck = 1220; 368 | LastUpgradeCheck = 1220; 369 | TargetAttributes = { 370 | 43736D7A2652280700CE4368 = { 371 | CreatedOnToolsVersion = 12.2; 372 | }; 373 | 43A601C9265267C000B24B9D = { 374 | CreatedOnToolsVersion = 12.2; 375 | TestTargetID = 43736D7A2652280700CE4368; 376 | }; 377 | }; 378 | }; 379 | buildConfigurationList = 43736D762652280700CE4368 /* Build configuration list for PBXProject "SwiftUI-MVVM-C" */; 380 | compatibilityVersion = "Xcode 9.3"; 381 | developmentRegion = en; 382 | hasScannedForEncodings = 0; 383 | knownRegions = ( 384 | en, 385 | Base, 386 | ); 387 | mainGroup = 43736D722652280700CE4368; 388 | packageReferences = ( 389 | 43A6019C26522CFF00B24B9D /* XCRemoteSwiftPackageReference "Alamofire" */, 390 | ); 391 | productRefGroup = 43736D7C2652280700CE4368 /* Products */; 392 | projectDirPath = ""; 393 | projectRoot = ""; 394 | targets = ( 395 | 43736D7A2652280700CE4368 /* SwiftUI-MVVM-C */, 396 | 43A601C9265267C000B24B9D /* SwiftUI-MVVM-CTests */, 397 | ); 398 | }; 399 | /* End PBXProject section */ 400 | 401 | /* Begin PBXResourcesBuildPhase section */ 402 | 43736D792652280700CE4368 /* Resources */ = { 403 | isa = PBXResourcesBuildPhase; 404 | buildActionMask = 2147483647; 405 | files = ( 406 | 43736D8B2652280900CE4368 /* LaunchScreen.storyboard in Resources */, 407 | 43736D882652280900CE4368 /* Preview Assets.xcassets in Resources */, 408 | 43736D852652280900CE4368 /* Assets.xcassets in Resources */, 409 | ); 410 | runOnlyForDeploymentPostprocessing = 0; 411 | }; 412 | 43A601C8265267C000B24B9D /* Resources */ = { 413 | isa = PBXResourcesBuildPhase; 414 | buildActionMask = 2147483647; 415 | files = ( 416 | 43A601DA2652687F00B24B9D /* repos.json in Resources */, 417 | ); 418 | runOnlyForDeploymentPostprocessing = 0; 419 | }; 420 | /* End PBXResourcesBuildPhase section */ 421 | 422 | /* Begin PBXSourcesBuildPhase section */ 423 | 43736D772652280700CE4368 /* Sources */ = { 424 | isa = PBXSourcesBuildPhase; 425 | buildActionMask = 2147483647; 426 | files = ( 427 | 43736D7F2652280700CE4368 /* AppDelegate.swift in Sources */, 428 | 43552D9B2653A23400E97D8D /* ProfileCoordinator.swift in Sources */, 429 | 43552D85265376F300E97D8D /* RepoDetailsViewModel.swift in Sources */, 430 | 43552D7A2653603200E97D8D /* EmptyNavigationLink.swift in Sources */, 431 | 43A60203265278A600B24B9D /* RepoCell.swift in Sources */, 432 | 43A601FF2652780100B24B9D /* View+Utils.swift in Sources */, 433 | 43A601BE2652561E00B24B9D /* GithubRouter.swift in Sources */, 434 | 43A601ED265272E800B24B9D /* RepoListCoordinator.swift in Sources */, 435 | 43A601A726522E0F00B24B9D /* NetworkClient.swift in Sources */, 436 | 43A601C3265257EE00B24B9D /* Repo.swift in Sources */, 437 | 43552DAA2653B8CF00E97D8D /* Publisher+Utils.swift in Sources */, 438 | 43A601A426522DBA00B24B9D /* NetworkProvider.swift in Sources */, 439 | 43552D7526535EC100E97D8D /* Binding+Utils.swift in Sources */, 440 | 43736D812652280700CE4368 /* SceneDelegate.swift in Sources */, 441 | 43A601F3265272F600B24B9D /* RepoListView.swift in Sources */, 442 | 43A601F8265273B700B24B9D /* RepoListViewModel.swift in Sources */, 443 | 43552DA62653B44D00E97D8D /* ProfileViewModel.swift in Sources */, 444 | 43A601B52652309900B24B9D /* NetworkUtils.swift in Sources */, 445 | 43736D832652280700CE4368 /* ContentView.swift in Sources */, 446 | 43552D7F2653670800E97D8D /* RepoDetailsView.swift in Sources */, 447 | 43552D8E2653877700E97D8D /* Container.swift in Sources */, 448 | 43A601BA2652560200B24B9D /* GithubNetworkProvider.swift in Sources */, 449 | 43552DA02653A24700E97D8D /* ProfileView.swift in Sources */, 450 | 43552D892653777800E97D8D /* User.swift in Sources */, 451 | ); 452 | runOnlyForDeploymentPostprocessing = 0; 453 | }; 454 | 43A601C6265267C000B24B9D /* Sources */ = { 455 | isa = PBXSourcesBuildPhase; 456 | buildActionMask = 2147483647; 457 | files = ( 458 | 43A601CD265267C000B24B9D /* SwiftUI_MVVM_CTests.swift in Sources */, 459 | 43A601E526526AAC00B24B9D /* MockNetworkClient.swift in Sources */, 460 | 43A601E0265268BD00B24B9D /* TestUtils.swift in Sources */, 461 | ); 462 | runOnlyForDeploymentPostprocessing = 0; 463 | }; 464 | /* End PBXSourcesBuildPhase section */ 465 | 466 | /* Begin PBXTargetDependency section */ 467 | 43A601D0265267C000B24B9D /* PBXTargetDependency */ = { 468 | isa = PBXTargetDependency; 469 | target = 43736D7A2652280700CE4368 /* SwiftUI-MVVM-C */; 470 | targetProxy = 43A601CF265267C000B24B9D /* PBXContainerItemProxy */; 471 | }; 472 | /* End PBXTargetDependency section */ 473 | 474 | /* Begin PBXVariantGroup section */ 475 | 43736D892652280900CE4368 /* LaunchScreen.storyboard */ = { 476 | isa = PBXVariantGroup; 477 | children = ( 478 | 43736D8A2652280900CE4368 /* Base */, 479 | ); 480 | name = LaunchScreen.storyboard; 481 | sourceTree = ""; 482 | }; 483 | /* End PBXVariantGroup section */ 484 | 485 | /* Begin XCBuildConfiguration section */ 486 | 43736D8D2652280900CE4368 /* Debug */ = { 487 | isa = XCBuildConfiguration; 488 | buildSettings = { 489 | ALWAYS_SEARCH_USER_PATHS = NO; 490 | CLANG_ANALYZER_NONNULL = YES; 491 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 492 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 493 | CLANG_CXX_LIBRARY = "libc++"; 494 | CLANG_ENABLE_MODULES = YES; 495 | CLANG_ENABLE_OBJC_ARC = YES; 496 | CLANG_ENABLE_OBJC_WEAK = YES; 497 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 498 | CLANG_WARN_BOOL_CONVERSION = YES; 499 | CLANG_WARN_COMMA = YES; 500 | CLANG_WARN_CONSTANT_CONVERSION = YES; 501 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 502 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 503 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 504 | CLANG_WARN_EMPTY_BODY = YES; 505 | CLANG_WARN_ENUM_CONVERSION = YES; 506 | CLANG_WARN_INFINITE_RECURSION = YES; 507 | CLANG_WARN_INT_CONVERSION = YES; 508 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 509 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 510 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 511 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 512 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 513 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 514 | CLANG_WARN_STRICT_PROTOTYPES = YES; 515 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 516 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 517 | CLANG_WARN_UNREACHABLE_CODE = YES; 518 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 519 | COPY_PHASE_STRIP = NO; 520 | DEBUG_INFORMATION_FORMAT = dwarf; 521 | ENABLE_STRICT_OBJC_MSGSEND = YES; 522 | ENABLE_TESTABILITY = YES; 523 | GCC_C_LANGUAGE_STANDARD = gnu11; 524 | GCC_DYNAMIC_NO_PIC = NO; 525 | GCC_NO_COMMON_BLOCKS = YES; 526 | GCC_OPTIMIZATION_LEVEL = 0; 527 | GCC_PREPROCESSOR_DEFINITIONS = ( 528 | "DEBUG=1", 529 | "$(inherited)", 530 | ); 531 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 532 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 533 | GCC_WARN_UNDECLARED_SELECTOR = YES; 534 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 535 | GCC_WARN_UNUSED_FUNCTION = YES; 536 | GCC_WARN_UNUSED_VARIABLE = YES; 537 | IPHONEOS_DEPLOYMENT_TARGET = 14.2; 538 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 539 | MTL_FAST_MATH = YES; 540 | ONLY_ACTIVE_ARCH = YES; 541 | SDKROOT = iphoneos; 542 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 543 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 544 | }; 545 | name = Debug; 546 | }; 547 | 43736D8E2652280900CE4368 /* Release */ = { 548 | isa = XCBuildConfiguration; 549 | buildSettings = { 550 | ALWAYS_SEARCH_USER_PATHS = NO; 551 | CLANG_ANALYZER_NONNULL = YES; 552 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 553 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 554 | CLANG_CXX_LIBRARY = "libc++"; 555 | CLANG_ENABLE_MODULES = YES; 556 | CLANG_ENABLE_OBJC_ARC = YES; 557 | CLANG_ENABLE_OBJC_WEAK = YES; 558 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 559 | CLANG_WARN_BOOL_CONVERSION = YES; 560 | CLANG_WARN_COMMA = YES; 561 | CLANG_WARN_CONSTANT_CONVERSION = YES; 562 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 563 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 564 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 565 | CLANG_WARN_EMPTY_BODY = YES; 566 | CLANG_WARN_ENUM_CONVERSION = YES; 567 | CLANG_WARN_INFINITE_RECURSION = YES; 568 | CLANG_WARN_INT_CONVERSION = YES; 569 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 570 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 571 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 572 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 573 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 574 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 575 | CLANG_WARN_STRICT_PROTOTYPES = YES; 576 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 577 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 578 | CLANG_WARN_UNREACHABLE_CODE = YES; 579 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 580 | COPY_PHASE_STRIP = NO; 581 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 582 | ENABLE_NS_ASSERTIONS = NO; 583 | ENABLE_STRICT_OBJC_MSGSEND = YES; 584 | GCC_C_LANGUAGE_STANDARD = gnu11; 585 | GCC_NO_COMMON_BLOCKS = YES; 586 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 587 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 588 | GCC_WARN_UNDECLARED_SELECTOR = YES; 589 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 590 | GCC_WARN_UNUSED_FUNCTION = YES; 591 | GCC_WARN_UNUSED_VARIABLE = YES; 592 | IPHONEOS_DEPLOYMENT_TARGET = 14.2; 593 | MTL_ENABLE_DEBUG_INFO = NO; 594 | MTL_FAST_MATH = YES; 595 | SDKROOT = iphoneos; 596 | SWIFT_COMPILATION_MODE = wholemodule; 597 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 598 | VALIDATE_PRODUCT = YES; 599 | }; 600 | name = Release; 601 | }; 602 | 43736D902652280900CE4368 /* Debug */ = { 603 | isa = XCBuildConfiguration; 604 | buildSettings = { 605 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 606 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 607 | CODE_SIGN_STYLE = Automatic; 608 | DEVELOPMENT_ASSET_PATHS = "\"SwiftUI-MVVM-C/Preview Content\""; 609 | DEVELOPMENT_TEAM = 94KKN3D4YS; 610 | ENABLE_PREVIEWS = YES; 611 | INFOPLIST_FILE = "SwiftUI-MVVM-C/Info.plist"; 612 | LD_RUNPATH_SEARCH_PATHS = ( 613 | "$(inherited)", 614 | "@executable_path/Frameworks", 615 | ); 616 | PRODUCT_BUNDLE_IDENTIFIER = "com.nch.SwiftUI-MVVM-C"; 617 | PRODUCT_NAME = "$(TARGET_NAME)"; 618 | SWIFT_VERSION = 5.0; 619 | TARGETED_DEVICE_FAMILY = "1,2"; 620 | }; 621 | name = Debug; 622 | }; 623 | 43736D912652280900CE4368 /* Release */ = { 624 | isa = XCBuildConfiguration; 625 | buildSettings = { 626 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 627 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 628 | CODE_SIGN_STYLE = Automatic; 629 | DEVELOPMENT_ASSET_PATHS = "\"SwiftUI-MVVM-C/Preview Content\""; 630 | DEVELOPMENT_TEAM = 94KKN3D4YS; 631 | ENABLE_PREVIEWS = YES; 632 | INFOPLIST_FILE = "SwiftUI-MVVM-C/Info.plist"; 633 | LD_RUNPATH_SEARCH_PATHS = ( 634 | "$(inherited)", 635 | "@executable_path/Frameworks", 636 | ); 637 | PRODUCT_BUNDLE_IDENTIFIER = "com.nch.SwiftUI-MVVM-C"; 638 | PRODUCT_NAME = "$(TARGET_NAME)"; 639 | SWIFT_VERSION = 5.0; 640 | TARGETED_DEVICE_FAMILY = "1,2"; 641 | }; 642 | name = Release; 643 | }; 644 | 43A601D1265267C000B24B9D /* Debug */ = { 645 | isa = XCBuildConfiguration; 646 | buildSettings = { 647 | BUNDLE_LOADER = "$(TEST_HOST)"; 648 | CODE_SIGN_STYLE = Automatic; 649 | DEVELOPMENT_TEAM = 94KKN3D4YS; 650 | INFOPLIST_FILE = "SwiftUI-MVVM-CTests/Info.plist"; 651 | LD_RUNPATH_SEARCH_PATHS = ( 652 | "$(inherited)", 653 | "@executable_path/Frameworks", 654 | "@loader_path/Frameworks", 655 | ); 656 | PRODUCT_BUNDLE_IDENTIFIER = "com.nch.SwiftUI-MVVM-CTests"; 657 | PRODUCT_NAME = "$(TARGET_NAME)"; 658 | SWIFT_VERSION = 5.0; 659 | TARGETED_DEVICE_FAMILY = "1,2"; 660 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftUI-MVVM-C.app/SwiftUI-MVVM-C"; 661 | }; 662 | name = Debug; 663 | }; 664 | 43A601D2265267C000B24B9D /* Release */ = { 665 | isa = XCBuildConfiguration; 666 | buildSettings = { 667 | BUNDLE_LOADER = "$(TEST_HOST)"; 668 | CODE_SIGN_STYLE = Automatic; 669 | DEVELOPMENT_TEAM = 94KKN3D4YS; 670 | INFOPLIST_FILE = "SwiftUI-MVVM-CTests/Info.plist"; 671 | LD_RUNPATH_SEARCH_PATHS = ( 672 | "$(inherited)", 673 | "@executable_path/Frameworks", 674 | "@loader_path/Frameworks", 675 | ); 676 | PRODUCT_BUNDLE_IDENTIFIER = "com.nch.SwiftUI-MVVM-CTests"; 677 | PRODUCT_NAME = "$(TARGET_NAME)"; 678 | SWIFT_VERSION = 5.0; 679 | TARGETED_DEVICE_FAMILY = "1,2"; 680 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftUI-MVVM-C.app/SwiftUI-MVVM-C"; 681 | }; 682 | name = Release; 683 | }; 684 | /* End XCBuildConfiguration section */ 685 | 686 | /* Begin XCConfigurationList section */ 687 | 43736D762652280700CE4368 /* Build configuration list for PBXProject "SwiftUI-MVVM-C" */ = { 688 | isa = XCConfigurationList; 689 | buildConfigurations = ( 690 | 43736D8D2652280900CE4368 /* Debug */, 691 | 43736D8E2652280900CE4368 /* Release */, 692 | ); 693 | defaultConfigurationIsVisible = 0; 694 | defaultConfigurationName = Release; 695 | }; 696 | 43736D8F2652280900CE4368 /* Build configuration list for PBXNativeTarget "SwiftUI-MVVM-C" */ = { 697 | isa = XCConfigurationList; 698 | buildConfigurations = ( 699 | 43736D902652280900CE4368 /* Debug */, 700 | 43736D912652280900CE4368 /* Release */, 701 | ); 702 | defaultConfigurationIsVisible = 0; 703 | defaultConfigurationName = Release; 704 | }; 705 | 43A601D3265267C100B24B9D /* Build configuration list for PBXNativeTarget "SwiftUI-MVVM-CTests" */ = { 706 | isa = XCConfigurationList; 707 | buildConfigurations = ( 708 | 43A601D1265267C000B24B9D /* Debug */, 709 | 43A601D2265267C000B24B9D /* Release */, 710 | ); 711 | defaultConfigurationIsVisible = 0; 712 | defaultConfigurationName = Release; 713 | }; 714 | /* End XCConfigurationList section */ 715 | 716 | /* Begin XCRemoteSwiftPackageReference section */ 717 | 43A6019C26522CFF00B24B9D /* XCRemoteSwiftPackageReference "Alamofire" */ = { 718 | isa = XCRemoteSwiftPackageReference; 719 | repositoryURL = "https://github.com/Alamofire/Alamofire.git"; 720 | requirement = { 721 | kind = upToNextMajorVersion; 722 | minimumVersion = 5.4.3; 723 | }; 724 | }; 725 | /* End XCRemoteSwiftPackageReference section */ 726 | 727 | /* Begin XCSwiftPackageProductDependency section */ 728 | 43A6019D26522CFF00B24B9D /* Alamofire */ = { 729 | isa = XCSwiftPackageProductDependency; 730 | package = 43A6019C26522CFF00B24B9D /* XCRemoteSwiftPackageReference "Alamofire" */; 731 | productName = Alamofire; 732 | }; 733 | /* End XCSwiftPackageProductDependency section */ 734 | }; 735 | rootObject = 43736D732652280700CE4368 /* Project object */; 736 | } 737 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "Alamofire", 6 | "repositoryURL": "https://github.com/Alamofire/Alamofire.git", 7 | "state": { 8 | "branch": null, 9 | "revision": "f96b619bcb2383b43d898402283924b80e2c4bae", 10 | "version": "5.4.3" 11 | } 12 | } 13 | ] 14 | }, 15 | "version": 1 16 | } 17 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import UIKit 9 | 10 | @main 11 | class AppDelegate: UIResponder, UIApplicationDelegate { 12 | 13 | 14 | 15 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 16 | // Override point for customization after application launch. 17 | return true 18 | } 19 | 20 | // MARK: UISceneSession Lifecycle 21 | 22 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 23 | // Called when a new scene session is being created. 24 | // Use this method to select a configuration to create the new scene with. 25 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 26 | } 27 | 28 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 29 | // Called when the user discards a scene session. 30 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 31 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 32 | } 33 | 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/CommonShared/Extensions/Binding+Utils.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Binding+Utils.swift 3 | // 4 | // 5 | // Created by Huy Nguyen on 9/30/20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | extension Binding { 11 | func map( 12 | valueToMappedValue: @escaping (Value) -> MappedValue, 13 | mappedValueToValue: @escaping (MappedValue) -> Value 14 | ) -> Binding { 15 | Binding.init { () -> MappedValue in 16 | return valueToMappedValue(wrappedValue) 17 | } set: { mappedValue in 18 | wrappedValue = mappedValueToValue(mappedValue) 19 | } 20 | } 21 | 22 | func onSet(_ action: @escaping (Value) -> Void) -> Binding { 23 | return Binding { () -> Value in 24 | return wrappedValue 25 | } set: { value in 26 | action(value) 27 | wrappedValue = value 28 | } 29 | } 30 | } 31 | 32 | func ??(binding: Binding, fallback: T) -> Binding { 33 | return Binding(get: { 34 | binding.wrappedValue ?? fallback 35 | }, set: { 36 | binding.wrappedValue = $0 37 | }) 38 | } 39 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/CommonShared/Extensions/Publisher+Utils.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Publisher+Utils.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/18/21. 6 | // 7 | 8 | import Combine 9 | 10 | extension Publisher { 11 | func optionalize() -> Publishers.Map { 12 | map({ Optional.some($0) }) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/CommonShared/Extensions/View+Utils.swift: -------------------------------------------------------------------------------- 1 | // 2 | // View+Utils.swift 3 | // iWidget 4 | // 5 | // Created by Huy Nguyen on 9/25/20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | // MARK: - LeadingAlignmentModifier 11 | 12 | struct LeadingAlignmentModifier: ViewModifier { 13 | func body(content: Content) -> some View { 14 | HStack(spacing: 0) { 15 | content 16 | Spacer(minLength: 0) 17 | } 18 | } 19 | } 20 | 21 | extension View { 22 | func leadingAlignment() -> some View { 23 | modifier(LeadingAlignmentModifier()) 24 | } 25 | } 26 | 27 | // MARK: - TrailingAlignmentModifier 28 | 29 | struct TrailingAlignmentModifier: ViewModifier { 30 | func body(content: Content) -> some View { 31 | HStack(spacing: 0) { 32 | Spacer(minLength: 0) 33 | content 34 | } 35 | } 36 | } 37 | 38 | extension View { 39 | func trailingAlignment() -> some View { 40 | modifier(TrailingAlignmentModifier()) 41 | } 42 | } 43 | 44 | // MARK: - TopAlignmentModifier 45 | 46 | struct TopAlignmentModifier: ViewModifier { 47 | func body(content: Content) -> some View { 48 | VStack(spacing: 0) { 49 | content 50 | Spacer(minLength: 0) 51 | } 52 | } 53 | } 54 | 55 | extension View { 56 | func topAlignment() -> some View { 57 | modifier(TrailingAlignmentModifier()) 58 | } 59 | } 60 | 61 | // MARK: - BottomAlignmentModifier 62 | 63 | struct BottomAlignmentModifier: ViewModifier { 64 | func body(content: Content) -> some View { 65 | VStack(spacing: 0) { 66 | content 67 | Spacer(minLength: 0) 68 | } 69 | } 70 | } 71 | 72 | extension View { 73 | func bottomAlignment() -> some View { 74 | modifier(TrailingAlignmentModifier()) 75 | } 76 | } 77 | 78 | // MARK: - MultilineModifier 79 | 80 | struct MultilineModifier: ViewModifier { 81 | let lineLimit: Int? 82 | 83 | func body(content: Content) -> some View { 84 | content.lineLimit(lineLimit) 85 | .fixedSize(horizontal: false, vertical: true) 86 | } 87 | } 88 | 89 | extension View { 90 | func multiline(lineLimit: Int? = nil) -> some View { 91 | modifier(MultilineModifier(lineLimit: lineLimit)) 92 | } 93 | } 94 | 95 | // MARK: - Debug 96 | extension View { 97 | func debugView(_ action: () -> Void) -> some View { 98 | action() 99 | return EmptyView() 100 | } 101 | } 102 | 103 | // MARK: - ClearButtonModifier 104 | fileprivate struct ClearButtonModifier: ViewModifier { 105 | @Binding var text: String 106 | 107 | func body(content: Content) -> some View { 108 | HStack { 109 | content 110 | 111 | Button(action: { 112 | text = "" 113 | }) { 114 | Image(systemName: "multiply.circle.fill") 115 | .foregroundColor(.secondary) 116 | .frame(width: 30, height: 30) 117 | } 118 | .buttonStyle(PlainButtonStyle()) 119 | } 120 | } 121 | } 122 | 123 | extension View { 124 | func clearButton(text: Binding) -> some View { 125 | modifier(ClearButtonModifier(text: text)) 126 | } 127 | } 128 | 129 | // MARK: - DismissingKeyboard 130 | 131 | struct DismissingKeyboard: ViewModifier { 132 | func body(content: Content) -> some View { 133 | content 134 | .onTapGesture(count: 2, perform: {}) 135 | .onLongPressGesture(minimumDuration: 0, maximumDistance: 0, pressing: nil) { 136 | let keyWindow = UIApplication.shared.connectedScenes 137 | .filter({$0.activationState == .foregroundActive}) 138 | .map({$0 as? UIWindowScene}) 139 | .compactMap({$0}) 140 | .first?.windows 141 | .filter({$0.isKeyWindow}).first 142 | keyWindow?.endEditing(true) 143 | } 144 | } 145 | } 146 | 147 | extension View { 148 | func dismissKeyboardOnTap() -> some View { 149 | return modifier(DismissingKeyboard()) 150 | } 151 | } 152 | 153 | // MARK: - ViewDidLoadModifier 154 | struct ViewDidLoadModifier: ViewModifier { 155 | @State private var isViewDidLoad = false 156 | private let action: (() -> Void) 157 | 158 | init(perform action: @escaping (() -> Void)) { 159 | self.action = action 160 | } 161 | 162 | func body(content: Content) -> some View { 163 | content.onAppear { 164 | if isViewDidLoad == false { 165 | isViewDidLoad = true 166 | action() 167 | } 168 | } 169 | } 170 | } 171 | 172 | extension View { 173 | func onLoad(perform action: @escaping (() -> Void)) -> some View { 174 | modifier(ViewDidLoadModifier(perform: action)) 175 | } 176 | } 177 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/CommonShared/Networking/NetworkProvider/NetworkClient.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NetworkClient.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import Foundation 9 | import Alamofire 10 | import Combine 11 | 12 | class NetworkClient: NetworkProvider { 13 | static let instance = NetworkClient() 14 | 15 | private let session: Session 16 | 17 | private init() { 18 | session = Session.default 19 | } 20 | 21 | func request(_ info: RequestInfoConvertible) -> AnyPublisher { 22 | let requestInfo = info.asRequestInfo() 23 | 24 | return session.request(requestInfo.url, method: requestInfo.method, parameters: requestInfo.parameters, encoding: requestInfo.encoding, headers: requestInfo.headers, interceptor: requestInfo.interceptor, requestModifier: requestInfo.requestModifier).publishData().tryMap { response -> Data in 25 | switch response.result { 26 | case .success(let data): 27 | return data 28 | case .failure(let error): 29 | throw error 30 | } 31 | } 32 | .eraseToAnyPublisher() 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/CommonShared/Networking/NetworkProvider/NetworkProvider.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NetworkProvider.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import Foundation 9 | 10 | import Alamofire 11 | import Combine 12 | 13 | protocol NetworkProvider { 14 | func request(_ info: RequestInfoConvertible) -> AnyPublisher 15 | } 16 | 17 | struct RequestInfo { 18 | var url: URLConvertible 19 | var method: HTTPMethod 20 | var parameters: Parameters? 21 | var encoding: ParameterEncoding 22 | var headers: HTTPHeaders? 23 | var interceptor: RequestInterceptor? 24 | var requestModifier: Session.RequestModifier? 25 | 26 | init(url: URLConvertible, method: HTTPMethod = .get, parameters: Parameters? = nil, encoding: ParameterEncoding = URLEncoding.default, headers: HTTPHeaders? = nil, interceptor: RequestInterceptor? = nil, requestModifier: Session.RequestModifier? = nil) { 27 | self.url = url 28 | self.method = method 29 | self.parameters = parameters 30 | self.encoding = encoding 31 | self.headers = headers 32 | self.interceptor = interceptor 33 | self.requestModifier = requestModifier 34 | } 35 | } 36 | 37 | protocol RequestInfoConvertible { 38 | func asRequestInfo() -> RequestInfo 39 | } 40 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/CommonShared/Networking/NetworkProvider/NetworkUtils.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NetworkUtils.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import Foundation 9 | import Combine 10 | 11 | enum NetworkError: Error { 12 | case invalidResponse 13 | case invalidInput 14 | case invalidJSON 15 | case other(Error) 16 | } 17 | 18 | extension AnyPublisher where Output == Data, Failure == Error { 19 | func jsonObject() -> AnyPublisher<[String: Any], Failure> { 20 | tryMap { data -> [String: Any] in 21 | if let jsonObject = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] { 22 | return jsonObject 23 | } 24 | 25 | throw NetworkError.invalidJSON 26 | }.eraseToAnyPublisher() 27 | } 28 | 29 | func jsonObjects() -> AnyPublisher<[[String: Any]], Failure> { 30 | tryMap { data -> [[String: Any]] in 31 | if let jsonObjects = try JSONSerialization.jsonObject(with: data, options: []) as? [[String: Any]] { 32 | return jsonObjects 33 | } 34 | 35 | throw NetworkError.invalidJSON 36 | }.eraseToAnyPublisher() 37 | } 38 | 39 | func decode(jsonDecoder: JSONDecoder = JSONDecoder()) -> AnyPublisher { 40 | tryMap { data -> T in 41 | return try jsonDecoder.decode(T.self, from: data) 42 | }.eraseToAnyPublisher() 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/CommonShared/Utils/Container.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Container.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/18/21. 6 | // 7 | 8 | import Foundation 9 | 10 | /// Wrap a struct to avoid compile error when have a struct as a property in a same type struct. For example, a property forkFromRepo with type Repo in a Repo struct. 11 | struct Container: Codable { 12 | private var values: [T] = [] 13 | 14 | init(value: T) { 15 | self.value = value 16 | } 17 | 18 | var value: T { 19 | get { 20 | values.first! 21 | } 22 | 23 | set { 24 | values = [newValue] 25 | } 26 | } 27 | 28 | init(from decoder: Decoder) throws { 29 | let container = try decoder.singleValueContainer() 30 | value = try container.decode(T.self) 31 | } 32 | 33 | func encode(to encoder: Encoder) throws { 34 | var container = encoder.singleValueContainer() 35 | try container.encode(value) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/CommonShared/Views/EmptyNavigationLink.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EmptyNavigationLink.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/18/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct EmptyNavigationLink: View where Destination: View { 11 | let destination: Destination 12 | let isActive: Binding 13 | 14 | init(destination: Destination, isActive: Binding) { 15 | self.destination = destination 16 | self.isActive = isActive 17 | } 18 | 19 | init(destination: Destination, selectedItem: Binding) { 20 | self.destination = destination 21 | self.isActive = selectedItem.map(valueToMappedValue: { $0 != nil }, mappedValueToValue: { _ in nil }) 22 | } 23 | 24 | var body: some View { 25 | NavigationLink( 26 | destination: destination, 27 | isActive: isActive, 28 | label: { 29 | EmptyView() 30 | }) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | static let username = "huynguyencong" 12 | 13 | var body: some View { 14 | NavigationView { 15 | RepoListCoordinator(username: Self.username) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UISceneConfigurationName 33 | Default Configuration 34 | UISceneDelegateClassName 35 | $(PRODUCT_MODULE_NAME).SceneDelegate 36 | 37 | 38 | 39 | 40 | UIApplicationSupportsIndirectInputEvents 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | UISupportedInterfaceOrientations~ipad 55 | 56 | UIInterfaceOrientationPortrait 57 | UIInterfaceOrientationPortraitUpsideDown 58 | UIInterfaceOrientationLandscapeLeft 59 | UIInterfaceOrientationLandscapeRight 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Modules/Profile/Profile/ProfileView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ProfileView.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/18/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ProfileView: View { 11 | @StateObject private var viewModel = ProfileViewModel() 12 | 13 | let username: String 14 | let tapOnLinkAction: (URL) -> Void 15 | 16 | var user: User? { 17 | viewModel.user 18 | } 19 | 20 | var body: some View { 21 | VStack(spacing: 10) { 22 | Text(viewModel.username ?? "") 23 | .font(.title) 24 | .leadingAlignment() 25 | 26 | Text(viewModel.displayName ?? "") 27 | .font(.title2) 28 | .leadingAlignment() 29 | 30 | Text(viewModel.bio ?? "") 31 | 32 | VStack { 33 | Text(viewModel.publicReposText ?? "") 34 | .leadingAlignment() 35 | Text(viewModel.publicGistsText ?? "") 36 | .leadingAlignment() 37 | Text(viewModel.followersText ?? "") 38 | .leadingAlignment() 39 | Text(viewModel.followingText ?? "") 40 | .leadingAlignment() 41 | } 42 | 43 | Button("Open Github website to see more details") { 44 | if let url = user?.htmlURL { 45 | tapOnLinkAction(url) 46 | } 47 | } 48 | .leadingAlignment() 49 | 50 | Spacer() 51 | } 52 | .padding() 53 | .onAppear(perform: { 54 | viewModel.getUser(username: username) 55 | }) 56 | .navigationBarTitle("Profile", displayMode: .inline) 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Modules/Profile/Profile/ProfileViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ProfileViewModel.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/18/21. 6 | // 7 | 8 | import Foundation 9 | import Combine 10 | 11 | class ProfileViewModel: ObservableObject { 12 | @Published var user: User? 13 | 14 | @Published var username: String? 15 | @Published var displayName: String? 16 | @Published var bio: String? 17 | @Published var publicReposText: String? 18 | @Published var publicGistsText: String? 19 | @Published var followersText: String? 20 | @Published var followingText: String? 21 | 22 | var networkClient: GithubNetworkProvider = GithubNetworkClient() 23 | 24 | init() { 25 | bind() 26 | } 27 | 28 | private func bind() { 29 | $user.map({ $0?.login }).assign(to: &$username) 30 | $user.map({ $0?.name }).assign(to: &$displayName) 31 | $user.map({ $0?.bio }).assign(to: &$bio) 32 | $user.map({ "Public repos: \($0?.publicRepos ?? 0)" }).assign(to: &$publicReposText) 33 | $user.map({ "Public gists: \($0?.publicGists ?? 0)" }).assign(to: &$publicGistsText) 34 | $user.map({ "Followers: \($0?.followers ?? 0)" }).assign(to: &$followersText) 35 | $user.map({ "Following: \($0?.following ?? 0)" }).assign(to: &$followingText) 36 | } 37 | 38 | func getUser(username: String) { 39 | networkClient.getUser(username: username) 40 | .optionalize() 41 | .replaceError(with: nil) 42 | .assign(to: &$user) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Modules/Profile/ProfileCoordinator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ProfileCoordinator.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/18/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ProfileCoordinator: View { 11 | @Environment(\.presentationMode) var presentationMode 12 | @Environment(\.openURL) var openURL 13 | 14 | let username: String 15 | 16 | var body: some View { 17 | NavigationView { 18 | ProfileView(username: username, tapOnLinkAction: { url in 19 | openURL(url) 20 | }) 21 | .navigationBarItems(leading: Button("Close", action: { 22 | presentationMode.wrappedValue.dismiss() 23 | })) 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Modules/RepoList/RepoDetails/RepoDetailsView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RepoDetailsView.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/18/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct RepoDetailsView: View { 11 | @StateObject var viewModel = RepoDetailsViewModel() 12 | let inputRepo: Repo 13 | let tapOnLinkAction: (URL) -> Void 14 | 15 | var body: some View { 16 | ScrollView(.vertical) { 17 | VStack(spacing: 16) { 18 | VStack { 19 | Text(viewModel.repoName ?? "") 20 | .font(.title) 21 | .leadingAlignment() 22 | 23 | if viewModel.isForkTextDisplayed { 24 | Text(viewModel.forkText ?? "") 25 | .font(.caption) 26 | .foregroundColor(.secondary) 27 | .leadingAlignment() 28 | } 29 | } 30 | 31 | if viewModel.isDescriptionTextDisplayed { 32 | Text(viewModel.description ?? "") 33 | .leadingAlignment() 34 | } 35 | 36 | Button("Open Github website to see more details") { 37 | if let url = viewModel.repo?.htmlURL { 38 | tapOnLinkAction(url) 39 | } 40 | } 41 | .leadingAlignment() 42 | } 43 | .padding() 44 | } 45 | .onLoad { 46 | viewModel.repo = inputRepo 47 | 48 | if let username = inputRepo.owner?.login, let name = inputRepo.name { 49 | viewModel.getRepo(username: username, name: name) 50 | } 51 | } 52 | } 53 | 54 | var forkedText: String { 55 | if let sourceRepo = viewModel.repo?.source?.value { 56 | return "Forked from \(sourceRepo.fullName ?? "")" 57 | } else { 58 | return "Forked from other repo" 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Modules/RepoList/RepoDetails/RepoDetailsViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RepoDetailsViewModel.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/18/21. 6 | // 7 | 8 | import Foundation 9 | import Combine 10 | 11 | class RepoDetailsViewModel: ObservableObject { 12 | 13 | @Published var repo: Repo? 14 | 15 | @Published var repoName: String? 16 | @Published var forkText: String? 17 | @Published var isForkTextDisplayed: Bool = false 18 | @Published var description: String? 19 | @Published var isDescriptionTextDisplayed: Bool = false 20 | 21 | var networkClient: GithubNetworkProvider = GithubNetworkClient() 22 | 23 | var s = Set() 24 | 25 | init() { 26 | bind() 27 | } 28 | 29 | private func bind() { 30 | $repo.map({ $0?.name }).assign(to: &$repoName) 31 | $repo.map({ $0?.fork ?? false }).assign(to: &$isForkTextDisplayed) 32 | $repo.map({ [unowned self] in forkedText(repo: $0) }).assign(to: &$forkText) 33 | $repo.map({ $0?.description }).assign(to: &$description) 34 | $repo.map({ $0?.description != nil }).assign(to: &$isDescriptionTextDisplayed) 35 | } 36 | 37 | func getRepo(username: String, name: String) { 38 | networkClient.getRepo(username: username, name: name) 39 | .map({ Optional.some($0) }) 40 | .replaceError(with: nil) 41 | .assign(to: &$repo) 42 | } 43 | 44 | private func forkedText(repo: Repo?) -> String { 45 | if let repo = repo?.source?.value { 46 | return "Forked from \(repo.fullName ?? "")" 47 | } else { 48 | return "Forked from other repo" 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Modules/RepoList/RepoList/RepoCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RepoCell.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct RepoCell: View { 11 | let repo: Repo 12 | 13 | var body: some View { 14 | VStack(spacing: 10) { 15 | VStack { 16 | Text(repo.name ?? "") 17 | .leadingAlignment() 18 | 19 | if (repo.fork ?? false) { 20 | Text("Forked from other repo") 21 | .font(.caption) 22 | .foregroundColor(.secondary) 23 | .leadingAlignment() 24 | } 25 | } 26 | 27 | if let description = repo.description { 28 | Text(description) 29 | .font(.caption) 30 | .foregroundColor(.secondary) 31 | .lineLimit(2) 32 | .leadingAlignment() 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Modules/RepoList/RepoList/RepoListView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RepoListView.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct RepoListView: View { 11 | @StateObject var viewModel = RepoListViewModel() 12 | let tapOnRepoAction: (Repo) -> Void 13 | 14 | var body: some View { 15 | List(viewModel.repos) { repo in 16 | Button(action: { 17 | tapOnRepoAction(repo) 18 | }, label: { 19 | RepoCell(repo: repo) 20 | }) 21 | } 22 | .onAppear { 23 | viewModel.getRepos() 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Modules/RepoList/RepoList/RepoListViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RepoListViewModel.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import Foundation 9 | 10 | class RepoListViewModel: ObservableObject { 11 | @Published var repos: [Repo] = [] 12 | var networkClient: GithubNetworkProvider = GithubNetworkClient() 13 | 14 | func getRepos() { 15 | networkClient 16 | .getRepos(username: "huynguyencong") 17 | .replaceError(with: []) 18 | .assign(to: &$repos) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Modules/RepoList/RepoListCoordinator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RepoListCoordinator.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct RepoListCoordinator: View { 11 | @State private var selectedRepo: Repo? 12 | @State private var isProfilePresented = false 13 | 14 | @Environment(\.openURL) var openURL 15 | 16 | let username: String 17 | 18 | var body: some View { 19 | VStack { 20 | RepoListView(tapOnRepoAction: { repo in 21 | selectedRepo = repo 22 | }) 23 | .listStyle(PlainListStyle()) 24 | .navigationBarTitle("\(username)'s repos", displayMode: .inline) 25 | .navigationBarItems(trailing: Button(action: { 26 | isProfilePresented = true 27 | }, label: { 28 | Image(systemName: "person.crop.circle") 29 | })) 30 | 31 | if let selectedRepo = selectedRepo { 32 | EmptyNavigationLink(destination: RepoDetailsView(inputRepo: selectedRepo, tapOnLinkAction: tapOnLinkAction), selectedItem: $selectedRepo) 33 | } 34 | } 35 | .fullScreenCover(isPresented: $isProfilePresented, content: { 36 | ProfileCoordinator(username: username) 37 | }) 38 | } 39 | 40 | private func tapOnLinkAction(url: URL) { 41 | openURL(url) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import UIKit 9 | import SwiftUI 10 | 11 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 12 | 13 | var window: UIWindow? 14 | 15 | 16 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 17 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 18 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 19 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 20 | 21 | // Create the SwiftUI view that provides the window contents. 22 | let contentView = ContentView() 23 | 24 | // Use a UIHostingController as window root view controller. 25 | if let windowScene = scene as? UIWindowScene { 26 | let window = UIWindow(windowScene: windowScene) 27 | window.rootViewController = UIHostingController(rootView: contentView) 28 | self.window = window 29 | window.makeKeyAndVisible() 30 | } 31 | } 32 | 33 | func sceneDidDisconnect(_ scene: UIScene) { 34 | // Called as the scene is being released by the system. 35 | // This occurs shortly after the scene enters the background, or when its session is discarded. 36 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 37 | // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). 38 | } 39 | 40 | func sceneDidBecomeActive(_ scene: UIScene) { 41 | // Called when the scene has moved from an inactive state to an active state. 42 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 43 | } 44 | 45 | func sceneWillResignActive(_ scene: UIScene) { 46 | // Called when the scene will move from an active state to an inactive state. 47 | // This may occur due to temporary interruptions (ex. an incoming phone call). 48 | } 49 | 50 | func sceneWillEnterForeground(_ scene: UIScene) { 51 | // Called as the scene transitions from the background to the foreground. 52 | // Use this method to undo the changes made on entering the background. 53 | } 54 | 55 | func sceneDidEnterBackground(_ scene: UIScene) { 56 | // Called as the scene transitions from the foreground to the background. 57 | // Use this method to save data, release shared resources, and store enough scene-specific state information 58 | // to restore the scene back to its current state. 59 | } 60 | 61 | 62 | } 63 | 64 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Shared/Models/Repo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Repo.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import Foundation 9 | 10 | struct Repo: Codable, Identifiable { 11 | enum CodingKeys: String, CodingKey { 12 | case id, name, description, owner, fork, source 13 | case fullName = "full_name" 14 | case htmlURL = "html_url" 15 | } 16 | 17 | var id: Int? 18 | var name: String? 19 | var fullName: String? 20 | var description: String? 21 | var htmlURL: URL? 22 | var owner: User? 23 | var fork: Bool? 24 | var source: Container? 25 | } 26 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Shared/Models/User.swift: -------------------------------------------------------------------------------- 1 | // 2 | // User.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/18/21. 6 | // 7 | 8 | import Foundation 9 | 10 | struct User: Codable { 11 | enum CodingKeys: String, CodingKey { 12 | case id, login, name, bio, followers, following 13 | case htmlURL = "html_url" 14 | case publicRepos = "public_repos" 15 | case publicGists = "public_gists" 16 | } 17 | 18 | var id: Int? 19 | var login: String? 20 | var name: String? 21 | var bio: String? 22 | var htmlURL: URL? 23 | var publicRepos: Int? 24 | var publicGists: Int? 25 | var followers: Int? 26 | var following: Int? 27 | } 28 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Shared/Networking/GithubNetworkProvider.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GithubNetworkProvider.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import Foundation 9 | import Combine 10 | 11 | protocol GithubNetworkProvider { 12 | func getRepos(username: String) -> AnyPublisher<[Repo], Error> 13 | func getRepo(username: String, name: String) -> AnyPublisher 14 | func getUser(username: String) -> AnyPublisher 15 | } 16 | 17 | class GithubNetworkClient: GithubNetworkProvider { 18 | var networkClient: NetworkProvider = NetworkClient.instance 19 | 20 | func getRepos(username: String) -> AnyPublisher<[Repo], Error> { 21 | networkClient.request(GithubRouter.repos(username: username)).decode() 22 | } 23 | 24 | func getRepo(username: String, name: String) -> AnyPublisher { 25 | networkClient.request(GithubRouter.repo(username: username, name: name)).decode() 26 | } 27 | 28 | func getUser(username: String) -> AnyPublisher { 29 | networkClient.request(GithubRouter.user(username: username)).decode() 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-C/Shared/Networking/GithubRouter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GithubRouter.swift 3 | // SwiftUI-MVVM-C 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import Foundation 9 | 10 | enum GithubRouter: RequestInfoConvertible { 11 | case repos(username: String) 12 | case repo(username: String, name: String) 13 | case user(username: String) 14 | 15 | var endpoint: String { 16 | "https://api.github.com" 17 | } 18 | 19 | var urlString: String { 20 | "\(endpoint)/\(path)" 21 | } 22 | 23 | var path: String { 24 | switch self { 25 | case .repos(let username): 26 | return "users/\(username)/repos" 27 | case .repo(let username, let name): 28 | return "repos/\(username)/\(name)" 29 | case .user(let username): 30 | return "users/\(username)" 31 | } 32 | } 33 | 34 | func asRequestInfo() -> RequestInfo { 35 | let requestInfo: RequestInfo = RequestInfo(url: urlString) 36 | 37 | // Set other property, like headers, parameters for requestInfo here 38 | 39 | return requestInfo 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-CTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-CTests/MockData/repos.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 317752011, 4 | "node_id": "MDEwOlJlcG9zaXRvcnkzMTc3NTIwMTE=", 5 | "name": "CICDDemo", 6 | "full_name": "huynguyencong/CICDDemo", 7 | "private": false, 8 | "owner": { 9 | "login": "huynguyencong", 10 | "id": 12905487, 11 | "node_id": "MDQ6VXNlcjEyOTA1NDg3", 12 | "avatar_url": "https://avatars.githubusercontent.com/u/12905487?v=4", 13 | "gravatar_id": "", 14 | "url": "https://api.github.com/users/huynguyencong", 15 | "html_url": "https://github.com/huynguyencong", 16 | "followers_url": "https://api.github.com/users/huynguyencong/followers", 17 | "following_url": "https://api.github.com/users/huynguyencong/following{/other_user}", 18 | "gists_url": "https://api.github.com/users/huynguyencong/gists{/gist_id}", 19 | "starred_url": "https://api.github.com/users/huynguyencong/starred{/owner}{/repo}", 20 | "subscriptions_url": "https://api.github.com/users/huynguyencong/subscriptions", 21 | "organizations_url": "https://api.github.com/users/huynguyencong/orgs", 22 | "repos_url": "https://api.github.com/users/huynguyencong/repos", 23 | "events_url": "https://api.github.com/users/huynguyencong/events{/privacy}", 24 | "received_events_url": "https://api.github.com/users/huynguyencong/received_events", 25 | "type": "User", 26 | "site_admin": false 27 | }, 28 | "html_url": "https://github.com/huynguyencong/CICDDemo", 29 | "description": null, 30 | "fork": false, 31 | "url": "https://api.github.com/repos/huynguyencong/CICDDemo", 32 | "forks_url": "https://api.github.com/repos/huynguyencong/CICDDemo/forks", 33 | "keys_url": "https://api.github.com/repos/huynguyencong/CICDDemo/keys{/key_id}", 34 | "collaborators_url": "https://api.github.com/repos/huynguyencong/CICDDemo/collaborators{/collaborator}", 35 | "teams_url": "https://api.github.com/repos/huynguyencong/CICDDemo/teams", 36 | "hooks_url": "https://api.github.com/repos/huynguyencong/CICDDemo/hooks", 37 | "issue_events_url": "https://api.github.com/repos/huynguyencong/CICDDemo/issues/events{/number}", 38 | "events_url": "https://api.github.com/repos/huynguyencong/CICDDemo/events", 39 | "assignees_url": "https://api.github.com/repos/huynguyencong/CICDDemo/assignees{/user}", 40 | "branches_url": "https://api.github.com/repos/huynguyencong/CICDDemo/branches{/branch}", 41 | "tags_url": "https://api.github.com/repos/huynguyencong/CICDDemo/tags", 42 | "blobs_url": "https://api.github.com/repos/huynguyencong/CICDDemo/git/blobs{/sha}", 43 | "git_tags_url": "https://api.github.com/repos/huynguyencong/CICDDemo/git/tags{/sha}", 44 | "git_refs_url": "https://api.github.com/repos/huynguyencong/CICDDemo/git/refs{/sha}", 45 | "trees_url": "https://api.github.com/repos/huynguyencong/CICDDemo/git/trees{/sha}", 46 | "statuses_url": "https://api.github.com/repos/huynguyencong/CICDDemo/statuses/{sha}", 47 | "languages_url": "https://api.github.com/repos/huynguyencong/CICDDemo/languages", 48 | "stargazers_url": "https://api.github.com/repos/huynguyencong/CICDDemo/stargazers", 49 | "contributors_url": "https://api.github.com/repos/huynguyencong/CICDDemo/contributors", 50 | "subscribers_url": "https://api.github.com/repos/huynguyencong/CICDDemo/subscribers", 51 | "subscription_url": "https://api.github.com/repos/huynguyencong/CICDDemo/subscription", 52 | "commits_url": "https://api.github.com/repos/huynguyencong/CICDDemo/commits{/sha}", 53 | "git_commits_url": "https://api.github.com/repos/huynguyencong/CICDDemo/git/commits{/sha}", 54 | "comments_url": "https://api.github.com/repos/huynguyencong/CICDDemo/comments{/number}", 55 | "issue_comment_url": "https://api.github.com/repos/huynguyencong/CICDDemo/issues/comments{/number}", 56 | "contents_url": "https://api.github.com/repos/huynguyencong/CICDDemo/contents/{+path}", 57 | "compare_url": "https://api.github.com/repos/huynguyencong/CICDDemo/compare/{base}...{head}", 58 | "merges_url": "https://api.github.com/repos/huynguyencong/CICDDemo/merges", 59 | "archive_url": "https://api.github.com/repos/huynguyencong/CICDDemo/{archive_format}{/ref}", 60 | "downloads_url": "https://api.github.com/repos/huynguyencong/CICDDemo/downloads", 61 | "issues_url": "https://api.github.com/repos/huynguyencong/CICDDemo/issues{/number}", 62 | "pulls_url": "https://api.github.com/repos/huynguyencong/CICDDemo/pulls{/number}", 63 | "milestones_url": "https://api.github.com/repos/huynguyencong/CICDDemo/milestones{/number}", 64 | "notifications_url": "https://api.github.com/repos/huynguyencong/CICDDemo/notifications{?since,all,participating}", 65 | "labels_url": "https://api.github.com/repos/huynguyencong/CICDDemo/labels{/name}", 66 | "releases_url": "https://api.github.com/repos/huynguyencong/CICDDemo/releases{/id}", 67 | "deployments_url": "https://api.github.com/repos/huynguyencong/CICDDemo/deployments", 68 | "created_at": "2020-12-02T04:44:13Z", 69 | "updated_at": "2021-01-22T07:52:45Z", 70 | "pushed_at": "2021-01-22T07:52:42Z", 71 | "git_url": "git://github.com/huynguyencong/CICDDemo.git", 72 | "ssh_url": "git@github.com:huynguyencong/CICDDemo.git", 73 | "clone_url": "https://github.com/huynguyencong/CICDDemo.git", 74 | "svn_url": "https://github.com/huynguyencong/CICDDemo", 75 | "homepage": null, 76 | "size": 3165, 77 | "stargazers_count": 0, 78 | "watchers_count": 0, 79 | "language": "Ruby", 80 | "has_issues": true, 81 | "has_projects": true, 82 | "has_downloads": true, 83 | "has_wiki": true, 84 | "has_pages": false, 85 | "forks_count": 0, 86 | "mirror_url": null, 87 | "archived": false, 88 | "disabled": false, 89 | "open_issues_count": 1, 90 | "license": null, 91 | "forks": 0, 92 | "open_issues": 1, 93 | "watchers": 0, 94 | "default_branch": "master" 95 | }, 96 | { 97 | "id": 62547266, 98 | "node_id": "MDEwOlJlcG9zaXRvcnk2MjU0NzI2Ng==", 99 | "name": "DataCache", 100 | "full_name": "huynguyencong/DataCache", 101 | "private": false, 102 | "owner": { 103 | "login": "huynguyencong", 104 | "id": 12905487, 105 | "node_id": "MDQ6VXNlcjEyOTA1NDg3", 106 | "avatar_url": "https://avatars.githubusercontent.com/u/12905487?v=4", 107 | "gravatar_id": "", 108 | "url": "https://api.github.com/users/huynguyencong", 109 | "html_url": "https://github.com/huynguyencong", 110 | "followers_url": "https://api.github.com/users/huynguyencong/followers", 111 | "following_url": "https://api.github.com/users/huynguyencong/following{/other_user}", 112 | "gists_url": "https://api.github.com/users/huynguyencong/gists{/gist_id}", 113 | "starred_url": "https://api.github.com/users/huynguyencong/starred{/owner}{/repo}", 114 | "subscriptions_url": "https://api.github.com/users/huynguyencong/subscriptions", 115 | "organizations_url": "https://api.github.com/users/huynguyencong/orgs", 116 | "repos_url": "https://api.github.com/users/huynguyencong/repos", 117 | "events_url": "https://api.github.com/users/huynguyencong/events{/privacy}", 118 | "received_events_url": "https://api.github.com/users/huynguyencong/received_events", 119 | "type": "User", 120 | "site_admin": false 121 | }, 122 | "html_url": "https://github.com/huynguyencong/DataCache", 123 | "description": "Simple disk and memory cache", 124 | "fork": false, 125 | "url": "https://api.github.com/repos/huynguyencong/DataCache", 126 | "forks_url": "https://api.github.com/repos/huynguyencong/DataCache/forks", 127 | "keys_url": "https://api.github.com/repos/huynguyencong/DataCache/keys{/key_id}", 128 | "collaborators_url": "https://api.github.com/repos/huynguyencong/DataCache/collaborators{/collaborator}", 129 | "teams_url": "https://api.github.com/repos/huynguyencong/DataCache/teams", 130 | "hooks_url": "https://api.github.com/repos/huynguyencong/DataCache/hooks", 131 | "issue_events_url": "https://api.github.com/repos/huynguyencong/DataCache/issues/events{/number}", 132 | "events_url": "https://api.github.com/repos/huynguyencong/DataCache/events", 133 | "assignees_url": "https://api.github.com/repos/huynguyencong/DataCache/assignees{/user}", 134 | "branches_url": "https://api.github.com/repos/huynguyencong/DataCache/branches{/branch}", 135 | "tags_url": "https://api.github.com/repos/huynguyencong/DataCache/tags", 136 | "blobs_url": "https://api.github.com/repos/huynguyencong/DataCache/git/blobs{/sha}", 137 | "git_tags_url": "https://api.github.com/repos/huynguyencong/DataCache/git/tags{/sha}", 138 | "git_refs_url": "https://api.github.com/repos/huynguyencong/DataCache/git/refs{/sha}", 139 | "trees_url": "https://api.github.com/repos/huynguyencong/DataCache/git/trees{/sha}", 140 | "statuses_url": "https://api.github.com/repos/huynguyencong/DataCache/statuses/{sha}", 141 | "languages_url": "https://api.github.com/repos/huynguyencong/DataCache/languages", 142 | "stargazers_url": "https://api.github.com/repos/huynguyencong/DataCache/stargazers", 143 | "contributors_url": "https://api.github.com/repos/huynguyencong/DataCache/contributors", 144 | "subscribers_url": "https://api.github.com/repos/huynguyencong/DataCache/subscribers", 145 | "subscription_url": "https://api.github.com/repos/huynguyencong/DataCache/subscription", 146 | "commits_url": "https://api.github.com/repos/huynguyencong/DataCache/commits{/sha}", 147 | "git_commits_url": "https://api.github.com/repos/huynguyencong/DataCache/git/commits{/sha}", 148 | "comments_url": "https://api.github.com/repos/huynguyencong/DataCache/comments{/number}", 149 | "issue_comment_url": "https://api.github.com/repos/huynguyencong/DataCache/issues/comments{/number}", 150 | "contents_url": "https://api.github.com/repos/huynguyencong/DataCache/contents/{+path}", 151 | "compare_url": "https://api.github.com/repos/huynguyencong/DataCache/compare/{base}...{head}", 152 | "merges_url": "https://api.github.com/repos/huynguyencong/DataCache/merges", 153 | "archive_url": "https://api.github.com/repos/huynguyencong/DataCache/{archive_format}{/ref}", 154 | "downloads_url": "https://api.github.com/repos/huynguyencong/DataCache/downloads", 155 | "issues_url": "https://api.github.com/repos/huynguyencong/DataCache/issues{/number}", 156 | "pulls_url": "https://api.github.com/repos/huynguyencong/DataCache/pulls{/number}", 157 | "milestones_url": "https://api.github.com/repos/huynguyencong/DataCache/milestones{/number}", 158 | "notifications_url": "https://api.github.com/repos/huynguyencong/DataCache/notifications{?since,all,participating}", 159 | "labels_url": "https://api.github.com/repos/huynguyencong/DataCache/labels{/name}", 160 | "releases_url": "https://api.github.com/repos/huynguyencong/DataCache/releases{/id}", 161 | "deployments_url": "https://api.github.com/repos/huynguyencong/DataCache/deployments", 162 | "created_at": "2016-07-04T08:59:01Z", 163 | "updated_at": "2021-05-12T01:13:13Z", 164 | "pushed_at": "2019-10-04T03:48:04Z", 165 | "git_url": "git://github.com/huynguyencong/DataCache.git", 166 | "ssh_url": "git@github.com:huynguyencong/DataCache.git", 167 | "clone_url": "https://github.com/huynguyencong/DataCache.git", 168 | "svn_url": "https://github.com/huynguyencong/DataCache", 169 | "homepage": "", 170 | "size": 119, 171 | "stargazers_count": 40, 172 | "watchers_count": 40, 173 | "language": "Swift", 174 | "has_issues": true, 175 | "has_projects": true, 176 | "has_downloads": true, 177 | "has_wiki": true, 178 | "has_pages": false, 179 | "forks_count": 8, 180 | "mirror_url": null, 181 | "archived": false, 182 | "disabled": false, 183 | "open_issues_count": 0, 184 | "license": { 185 | "key": "mit", 186 | "name": "MIT License", 187 | "spdx_id": "MIT", 188 | "url": "https://api.github.com/licenses/mit", 189 | "node_id": "MDc6TGljZW5zZTEz" 190 | }, 191 | "forks": 8, 192 | "open_issues": 0, 193 | "watchers": 40, 194 | "default_branch": "master" 195 | }, 196 | { 197 | "id": 135969931, 198 | "node_id": "MDEwOlJlcG9zaXRvcnkxMzU5Njk5MzE=", 199 | "name": "EzPopup", 200 | "full_name": "huynguyencong/EzPopup", 201 | "private": false, 202 | "owner": { 203 | "login": "huynguyencong", 204 | "id": 12905487, 205 | "node_id": "MDQ6VXNlcjEyOTA1NDg3", 206 | "avatar_url": "https://avatars.githubusercontent.com/u/12905487?v=4", 207 | "gravatar_id": "", 208 | "url": "https://api.github.com/users/huynguyencong", 209 | "html_url": "https://github.com/huynguyencong", 210 | "followers_url": "https://api.github.com/users/huynguyencong/followers", 211 | "following_url": "https://api.github.com/users/huynguyencong/following{/other_user}", 212 | "gists_url": "https://api.github.com/users/huynguyencong/gists{/gist_id}", 213 | "starred_url": "https://api.github.com/users/huynguyencong/starred{/owner}{/repo}", 214 | "subscriptions_url": "https://api.github.com/users/huynguyencong/subscriptions", 215 | "organizations_url": "https://api.github.com/users/huynguyencong/orgs", 216 | "repos_url": "https://api.github.com/users/huynguyencong/repos", 217 | "events_url": "https://api.github.com/users/huynguyencong/events{/privacy}", 218 | "received_events_url": "https://api.github.com/users/huynguyencong/received_events", 219 | "type": "User", 220 | "site_admin": false 221 | }, 222 | "html_url": "https://github.com/huynguyencong/EzPopup", 223 | "description": "EzPopup will help you to show popup in the simplest way", 224 | "fork": false, 225 | "url": "https://api.github.com/repos/huynguyencong/EzPopup", 226 | "forks_url": "https://api.github.com/repos/huynguyencong/EzPopup/forks", 227 | "keys_url": "https://api.github.com/repos/huynguyencong/EzPopup/keys{/key_id}", 228 | "collaborators_url": "https://api.github.com/repos/huynguyencong/EzPopup/collaborators{/collaborator}", 229 | "teams_url": "https://api.github.com/repos/huynguyencong/EzPopup/teams", 230 | "hooks_url": "https://api.github.com/repos/huynguyencong/EzPopup/hooks", 231 | "issue_events_url": "https://api.github.com/repos/huynguyencong/EzPopup/issues/events{/number}", 232 | "events_url": "https://api.github.com/repos/huynguyencong/EzPopup/events", 233 | "assignees_url": "https://api.github.com/repos/huynguyencong/EzPopup/assignees{/user}", 234 | "branches_url": "https://api.github.com/repos/huynguyencong/EzPopup/branches{/branch}", 235 | "tags_url": "https://api.github.com/repos/huynguyencong/EzPopup/tags", 236 | "blobs_url": "https://api.github.com/repos/huynguyencong/EzPopup/git/blobs{/sha}", 237 | "git_tags_url": "https://api.github.com/repos/huynguyencong/EzPopup/git/tags{/sha}", 238 | "git_refs_url": "https://api.github.com/repos/huynguyencong/EzPopup/git/refs{/sha}", 239 | "trees_url": "https://api.github.com/repos/huynguyencong/EzPopup/git/trees{/sha}", 240 | "statuses_url": "https://api.github.com/repos/huynguyencong/EzPopup/statuses/{sha}", 241 | "languages_url": "https://api.github.com/repos/huynguyencong/EzPopup/languages", 242 | "stargazers_url": "https://api.github.com/repos/huynguyencong/EzPopup/stargazers", 243 | "contributors_url": "https://api.github.com/repos/huynguyencong/EzPopup/contributors", 244 | "subscribers_url": "https://api.github.com/repos/huynguyencong/EzPopup/subscribers", 245 | "subscription_url": "https://api.github.com/repos/huynguyencong/EzPopup/subscription", 246 | "commits_url": "https://api.github.com/repos/huynguyencong/EzPopup/commits{/sha}", 247 | "git_commits_url": "https://api.github.com/repos/huynguyencong/EzPopup/git/commits{/sha}", 248 | "comments_url": "https://api.github.com/repos/huynguyencong/EzPopup/comments{/number}", 249 | "issue_comment_url": "https://api.github.com/repos/huynguyencong/EzPopup/issues/comments{/number}", 250 | "contents_url": "https://api.github.com/repos/huynguyencong/EzPopup/contents/{+path}", 251 | "compare_url": "https://api.github.com/repos/huynguyencong/EzPopup/compare/{base}...{head}", 252 | "merges_url": "https://api.github.com/repos/huynguyencong/EzPopup/merges", 253 | "archive_url": "https://api.github.com/repos/huynguyencong/EzPopup/{archive_format}{/ref}", 254 | "downloads_url": "https://api.github.com/repos/huynguyencong/EzPopup/downloads", 255 | "issues_url": "https://api.github.com/repos/huynguyencong/EzPopup/issues{/number}", 256 | "pulls_url": "https://api.github.com/repos/huynguyencong/EzPopup/pulls{/number}", 257 | "milestones_url": "https://api.github.com/repos/huynguyencong/EzPopup/milestones{/number}", 258 | "notifications_url": "https://api.github.com/repos/huynguyencong/EzPopup/notifications{?since,all,participating}", 259 | "labels_url": "https://api.github.com/repos/huynguyencong/EzPopup/labels{/name}", 260 | "releases_url": "https://api.github.com/repos/huynguyencong/EzPopup/releases{/id}", 261 | "deployments_url": "https://api.github.com/repos/huynguyencong/EzPopup/deployments", 262 | "created_at": "2018-06-04T04:18:57Z", 263 | "updated_at": "2021-02-27T09:48:43Z", 264 | "pushed_at": "2021-05-03T10:10:08Z", 265 | "git_url": "git://github.com/huynguyencong/EzPopup.git", 266 | "ssh_url": "git@github.com:huynguyencong/EzPopup.git", 267 | "clone_url": "https://github.com/huynguyencong/EzPopup.git", 268 | "svn_url": "https://github.com/huynguyencong/EzPopup", 269 | "homepage": null, 270 | "size": 150, 271 | "stargazers_count": 58, 272 | "watchers_count": 58, 273 | "language": "Swift", 274 | "has_issues": true, 275 | "has_projects": true, 276 | "has_downloads": true, 277 | "has_wiki": true, 278 | "has_pages": false, 279 | "forks_count": 15, 280 | "mirror_url": null, 281 | "archived": false, 282 | "disabled": false, 283 | "open_issues_count": 10, 284 | "license": { 285 | "key": "mit", 286 | "name": "MIT License", 287 | "spdx_id": "MIT", 288 | "url": "https://api.github.com/licenses/mit", 289 | "node_id": "MDc6TGljZW5zZTEz" 290 | }, 291 | "forks": 15, 292 | "open_issues": 10, 293 | "watchers": 58, 294 | "default_branch": "master" 295 | }, 296 | { 297 | "id": 100192984, 298 | "node_id": "MDEwOlJlcG9zaXRvcnkxMDAxOTI5ODQ=", 299 | "name": "GCDWebServer", 300 | "full_name": "huynguyencong/GCDWebServer", 301 | "private": false, 302 | "owner": { 303 | "login": "huynguyencong", 304 | "id": 12905487, 305 | "node_id": "MDQ6VXNlcjEyOTA1NDg3", 306 | "avatar_url": "https://avatars.githubusercontent.com/u/12905487?v=4", 307 | "gravatar_id": "", 308 | "url": "https://api.github.com/users/huynguyencong", 309 | "html_url": "https://github.com/huynguyencong", 310 | "followers_url": "https://api.github.com/users/huynguyencong/followers", 311 | "following_url": "https://api.github.com/users/huynguyencong/following{/other_user}", 312 | "gists_url": "https://api.github.com/users/huynguyencong/gists{/gist_id}", 313 | "starred_url": "https://api.github.com/users/huynguyencong/starred{/owner}{/repo}", 314 | "subscriptions_url": "https://api.github.com/users/huynguyencong/subscriptions", 315 | "organizations_url": "https://api.github.com/users/huynguyencong/orgs", 316 | "repos_url": "https://api.github.com/users/huynguyencong/repos", 317 | "events_url": "https://api.github.com/users/huynguyencong/events{/privacy}", 318 | "received_events_url": "https://api.github.com/users/huynguyencong/received_events", 319 | "type": "User", 320 | "site_admin": false 321 | }, 322 | "html_url": "https://github.com/huynguyencong/GCDWebServer", 323 | "description": "Lightweight GCD based HTTP server for OS X & iOS (includes web based uploader & WebDAV server)", 324 | "fork": true, 325 | "url": "https://api.github.com/repos/huynguyencong/GCDWebServer", 326 | "forks_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/forks", 327 | "keys_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/keys{/key_id}", 328 | "collaborators_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/collaborators{/collaborator}", 329 | "teams_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/teams", 330 | "hooks_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/hooks", 331 | "issue_events_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/issues/events{/number}", 332 | "events_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/events", 333 | "assignees_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/assignees{/user}", 334 | "branches_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/branches{/branch}", 335 | "tags_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/tags", 336 | "blobs_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/git/blobs{/sha}", 337 | "git_tags_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/git/tags{/sha}", 338 | "git_refs_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/git/refs{/sha}", 339 | "trees_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/git/trees{/sha}", 340 | "statuses_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/statuses/{sha}", 341 | "languages_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/languages", 342 | "stargazers_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/stargazers", 343 | "contributors_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/contributors", 344 | "subscribers_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/subscribers", 345 | "subscription_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/subscription", 346 | "commits_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/commits{/sha}", 347 | "git_commits_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/git/commits{/sha}", 348 | "comments_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/comments{/number}", 349 | "issue_comment_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/issues/comments{/number}", 350 | "contents_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/contents/{+path}", 351 | "compare_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/compare/{base}...{head}", 352 | "merges_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/merges", 353 | "archive_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/{archive_format}{/ref}", 354 | "downloads_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/downloads", 355 | "issues_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/issues{/number}", 356 | "pulls_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/pulls{/number}", 357 | "milestones_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/milestones{/number}", 358 | "notifications_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/notifications{?since,all,participating}", 359 | "labels_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/labels{/name}", 360 | "releases_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/releases{/id}", 361 | "deployments_url": "https://api.github.com/repos/huynguyencong/GCDWebServer/deployments", 362 | "created_at": "2017-08-13T17:24:51Z", 363 | "updated_at": "2017-08-13T17:24:54Z", 364 | "pushed_at": "2017-08-13T18:06:50Z", 365 | "git_url": "git://github.com/huynguyencong/GCDWebServer.git", 366 | "ssh_url": "git@github.com:huynguyencong/GCDWebServer.git", 367 | "clone_url": "https://github.com/huynguyencong/GCDWebServer.git", 368 | "svn_url": "https://github.com/huynguyencong/GCDWebServer", 369 | "homepage": "", 370 | "size": 12141, 371 | "stargazers_count": 0, 372 | "watchers_count": 0, 373 | "language": "Objective-C", 374 | "has_issues": false, 375 | "has_projects": true, 376 | "has_downloads": true, 377 | "has_wiki": false, 378 | "has_pages": false, 379 | "forks_count": 0, 380 | "mirror_url": null, 381 | "archived": false, 382 | "disabled": false, 383 | "open_issues_count": 0, 384 | "license": { 385 | "key": "other", 386 | "name": "Other", 387 | "spdx_id": "NOASSERTION", 388 | "url": null, 389 | "node_id": "MDc6TGljZW5zZTA=" 390 | }, 391 | "forks": 0, 392 | "open_issues": 0, 393 | "watchers": 0, 394 | "default_branch": "master" 395 | }, 396 | { 397 | "id": 70170864, 398 | "node_id": "MDEwOlJlcG9zaXRvcnk3MDE3MDg2NA==", 399 | "name": "HMSegmentedControl", 400 | "full_name": "huynguyencong/HMSegmentedControl", 401 | "private": false, 402 | "owner": { 403 | "login": "huynguyencong", 404 | "id": 12905487, 405 | "node_id": "MDQ6VXNlcjEyOTA1NDg3", 406 | "avatar_url": "https://avatars.githubusercontent.com/u/12905487?v=4", 407 | "gravatar_id": "", 408 | "url": "https://api.github.com/users/huynguyencong", 409 | "html_url": "https://github.com/huynguyencong", 410 | "followers_url": "https://api.github.com/users/huynguyencong/followers", 411 | "following_url": "https://api.github.com/users/huynguyencong/following{/other_user}", 412 | "gists_url": "https://api.github.com/users/huynguyencong/gists{/gist_id}", 413 | "starred_url": "https://api.github.com/users/huynguyencong/starred{/owner}{/repo}", 414 | "subscriptions_url": "https://api.github.com/users/huynguyencong/subscriptions", 415 | "organizations_url": "https://api.github.com/users/huynguyencong/orgs", 416 | "repos_url": "https://api.github.com/users/huynguyencong/repos", 417 | "events_url": "https://api.github.com/users/huynguyencong/events{/privacy}", 418 | "received_events_url": "https://api.github.com/users/huynguyencong/received_events", 419 | "type": "User", 420 | "site_admin": false 421 | }, 422 | "html_url": "https://github.com/huynguyencong/HMSegmentedControl", 423 | "description": "A drop-in replacement for UISegmentedControl mimicking the style of the segmented control used in Google Currents and various other Google products.", 424 | "fork": true, 425 | "url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl", 426 | "forks_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/forks", 427 | "keys_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/keys{/key_id}", 428 | "collaborators_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/collaborators{/collaborator}", 429 | "teams_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/teams", 430 | "hooks_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/hooks", 431 | "issue_events_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/issues/events{/number}", 432 | "events_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/events", 433 | "assignees_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/assignees{/user}", 434 | "branches_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/branches{/branch}", 435 | "tags_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/tags", 436 | "blobs_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/git/blobs{/sha}", 437 | "git_tags_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/git/tags{/sha}", 438 | "git_refs_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/git/refs{/sha}", 439 | "trees_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/git/trees{/sha}", 440 | "statuses_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/statuses/{sha}", 441 | "languages_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/languages", 442 | "stargazers_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/stargazers", 443 | "contributors_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/contributors", 444 | "subscribers_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/subscribers", 445 | "subscription_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/subscription", 446 | "commits_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/commits{/sha}", 447 | "git_commits_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/git/commits{/sha}", 448 | "comments_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/comments{/number}", 449 | "issue_comment_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/issues/comments{/number}", 450 | "contents_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/contents/{+path}", 451 | "compare_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/compare/{base}...{head}", 452 | "merges_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/merges", 453 | "archive_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/{archive_format}{/ref}", 454 | "downloads_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/downloads", 455 | "issues_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/issues{/number}", 456 | "pulls_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/pulls{/number}", 457 | "milestones_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/milestones{/number}", 458 | "notifications_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/notifications{?since,all,participating}", 459 | "labels_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/labels{/name}", 460 | "releases_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/releases{/id}", 461 | "deployments_url": "https://api.github.com/repos/huynguyencong/HMSegmentedControl/deployments", 462 | "created_at": "2016-10-06T16:13:14Z", 463 | "updated_at": "2016-10-06T16:13:16Z", 464 | "pushed_at": "2016-10-06T16:23:06Z", 465 | "git_url": "git://github.com/huynguyencong/HMSegmentedControl.git", 466 | "ssh_url": "git@github.com:huynguyencong/HMSegmentedControl.git", 467 | "clone_url": "https://github.com/huynguyencong/HMSegmentedControl.git", 468 | "svn_url": "https://github.com/huynguyencong/HMSegmentedControl", 469 | "homepage": "", 470 | "size": 949, 471 | "stargazers_count": 0, 472 | "watchers_count": 0, 473 | "language": "Objective-C", 474 | "has_issues": false, 475 | "has_projects": true, 476 | "has_downloads": true, 477 | "has_wiki": true, 478 | "has_pages": false, 479 | "forks_count": 0, 480 | "mirror_url": null, 481 | "archived": false, 482 | "disabled": false, 483 | "open_issues_count": 0, 484 | "license": { 485 | "key": "other", 486 | "name": "Other", 487 | "spdx_id": "NOASSERTION", 488 | "url": null, 489 | "node_id": "MDc6TGljZW5zZTA=" 490 | }, 491 | "forks": 0, 492 | "open_issues": 0, 493 | "watchers": 0, 494 | "default_branch": "master" 495 | }, 496 | { 497 | "id": 352006399, 498 | "node_id": "MDEwOlJlcG9zaXRvcnkzNTIwMDYzOTk=", 499 | "name": "HSStockChart", 500 | "full_name": "huynguyencong/HSStockChart", 501 | "private": false, 502 | "owner": { 503 | "login": "huynguyencong", 504 | "id": 12905487, 505 | "node_id": "MDQ6VXNlcjEyOTA1NDg3", 506 | "avatar_url": "https://avatars.githubusercontent.com/u/12905487?v=4", 507 | "gravatar_id": "", 508 | "url": "https://api.github.com/users/huynguyencong", 509 | "html_url": "https://github.com/huynguyencong", 510 | "followers_url": "https://api.github.com/users/huynguyencong/followers", 511 | "following_url": "https://api.github.com/users/huynguyencong/following{/other_user}", 512 | "gists_url": "https://api.github.com/users/huynguyencong/gists{/gist_id}", 513 | "starred_url": "https://api.github.com/users/huynguyencong/starred{/owner}{/repo}", 514 | "subscriptions_url": "https://api.github.com/users/huynguyencong/subscriptions", 515 | "organizations_url": "https://api.github.com/users/huynguyencong/orgs", 516 | "repos_url": "https://api.github.com/users/huynguyencong/repos", 517 | "events_url": "https://api.github.com/users/huynguyencong/events{/privacy}", 518 | "received_events_url": "https://api.github.com/users/huynguyencong/received_events", 519 | "type": "User", 520 | "site_admin": false 521 | }, 522 | "html_url": "https://github.com/huynguyencong/HSStockChart", 523 | "description": "Stock Chart include CandleStickChart,TimeLineChart. 股票走势图,包括 K 线图,分时图,手势缩放,拖动", 524 | "fork": true, 525 | "url": "https://api.github.com/repos/huynguyencong/HSStockChart", 526 | "forks_url": "https://api.github.com/repos/huynguyencong/HSStockChart/forks", 527 | "keys_url": "https://api.github.com/repos/huynguyencong/HSStockChart/keys{/key_id}", 528 | "collaborators_url": "https://api.github.com/repos/huynguyencong/HSStockChart/collaborators{/collaborator}", 529 | "teams_url": "https://api.github.com/repos/huynguyencong/HSStockChart/teams", 530 | "hooks_url": "https://api.github.com/repos/huynguyencong/HSStockChart/hooks", 531 | "issue_events_url": "https://api.github.com/repos/huynguyencong/HSStockChart/issues/events{/number}", 532 | "events_url": "https://api.github.com/repos/huynguyencong/HSStockChart/events", 533 | "assignees_url": "https://api.github.com/repos/huynguyencong/HSStockChart/assignees{/user}", 534 | "branches_url": "https://api.github.com/repos/huynguyencong/HSStockChart/branches{/branch}", 535 | "tags_url": "https://api.github.com/repos/huynguyencong/HSStockChart/tags", 536 | "blobs_url": "https://api.github.com/repos/huynguyencong/HSStockChart/git/blobs{/sha}", 537 | "git_tags_url": "https://api.github.com/repos/huynguyencong/HSStockChart/git/tags{/sha}", 538 | "git_refs_url": "https://api.github.com/repos/huynguyencong/HSStockChart/git/refs{/sha}", 539 | "trees_url": "https://api.github.com/repos/huynguyencong/HSStockChart/git/trees{/sha}", 540 | "statuses_url": "https://api.github.com/repos/huynguyencong/HSStockChart/statuses/{sha}", 541 | "languages_url": "https://api.github.com/repos/huynguyencong/HSStockChart/languages", 542 | "stargazers_url": "https://api.github.com/repos/huynguyencong/HSStockChart/stargazers", 543 | "contributors_url": "https://api.github.com/repos/huynguyencong/HSStockChart/contributors", 544 | "subscribers_url": "https://api.github.com/repos/huynguyencong/HSStockChart/subscribers", 545 | "subscription_url": "https://api.github.com/repos/huynguyencong/HSStockChart/subscription", 546 | "commits_url": "https://api.github.com/repos/huynguyencong/HSStockChart/commits{/sha}", 547 | "git_commits_url": "https://api.github.com/repos/huynguyencong/HSStockChart/git/commits{/sha}", 548 | "comments_url": "https://api.github.com/repos/huynguyencong/HSStockChart/comments{/number}", 549 | "issue_comment_url": "https://api.github.com/repos/huynguyencong/HSStockChart/issues/comments{/number}", 550 | "contents_url": "https://api.github.com/repos/huynguyencong/HSStockChart/contents/{+path}", 551 | "compare_url": "https://api.github.com/repos/huynguyencong/HSStockChart/compare/{base}...{head}", 552 | "merges_url": "https://api.github.com/repos/huynguyencong/HSStockChart/merges", 553 | "archive_url": "https://api.github.com/repos/huynguyencong/HSStockChart/{archive_format}{/ref}", 554 | "downloads_url": "https://api.github.com/repos/huynguyencong/HSStockChart/downloads", 555 | "issues_url": "https://api.github.com/repos/huynguyencong/HSStockChart/issues{/number}", 556 | "pulls_url": "https://api.github.com/repos/huynguyencong/HSStockChart/pulls{/number}", 557 | "milestones_url": "https://api.github.com/repos/huynguyencong/HSStockChart/milestones{/number}", 558 | "notifications_url": "https://api.github.com/repos/huynguyencong/HSStockChart/notifications{?since,all,participating}", 559 | "labels_url": "https://api.github.com/repos/huynguyencong/HSStockChart/labels{/name}", 560 | "releases_url": "https://api.github.com/repos/huynguyencong/HSStockChart/releases{/id}", 561 | "deployments_url": "https://api.github.com/repos/huynguyencong/HSStockChart/deployments", 562 | "created_at": "2021-03-27T07:07:38Z", 563 | "updated_at": "2021-03-27T15:54:58Z", 564 | "pushed_at": "2021-03-27T15:54:56Z", 565 | "git_url": "git://github.com/huynguyencong/HSStockChart.git", 566 | "ssh_url": "git@github.com:huynguyencong/HSStockChart.git", 567 | "clone_url": "https://github.com/huynguyencong/HSStockChart.git", 568 | "svn_url": "https://github.com/huynguyencong/HSStockChart", 569 | "homepage": "", 570 | "size": 3102, 571 | "stargazers_count": 0, 572 | "watchers_count": 0, 573 | "language": "Swift", 574 | "has_issues": false, 575 | "has_projects": true, 576 | "has_downloads": true, 577 | "has_wiki": true, 578 | "has_pages": false, 579 | "forks_count": 0, 580 | "mirror_url": null, 581 | "archived": false, 582 | "disabled": false, 583 | "open_issues_count": 0, 584 | "license": { 585 | "key": "mit", 586 | "name": "MIT License", 587 | "spdx_id": "MIT", 588 | "url": "https://api.github.com/licenses/mit", 589 | "node_id": "MDc6TGljZW5zZTEz" 590 | }, 591 | "forks": 0, 592 | "open_issues": 0, 593 | "watchers": 0, 594 | "default_branch": "master" 595 | }, 596 | { 597 | "id": 53144036, 598 | "node_id": "MDEwOlJlcG9zaXRvcnk1MzE0NDAzNg==", 599 | "name": "ImageScrollView", 600 | "full_name": "huynguyencong/ImageScrollView", 601 | "private": false, 602 | "owner": { 603 | "login": "huynguyencong", 604 | "id": 12905487, 605 | "node_id": "MDQ6VXNlcjEyOTA1NDg3", 606 | "avatar_url": "https://avatars.githubusercontent.com/u/12905487?v=4", 607 | "gravatar_id": "", 608 | "url": "https://api.github.com/users/huynguyencong", 609 | "html_url": "https://github.com/huynguyencong", 610 | "followers_url": "https://api.github.com/users/huynguyencong/followers", 611 | "following_url": "https://api.github.com/users/huynguyencong/following{/other_user}", 612 | "gists_url": "https://api.github.com/users/huynguyencong/gists{/gist_id}", 613 | "starred_url": "https://api.github.com/users/huynguyencong/starred{/owner}{/repo}", 614 | "subscriptions_url": "https://api.github.com/users/huynguyencong/subscriptions", 615 | "organizations_url": "https://api.github.com/users/huynguyencong/orgs", 616 | "repos_url": "https://api.github.com/users/huynguyencong/repos", 617 | "events_url": "https://api.github.com/users/huynguyencong/events{/privacy}", 618 | "received_events_url": "https://api.github.com/users/huynguyencong/received_events", 619 | "type": "User", 620 | "site_admin": false 621 | }, 622 | "html_url": "https://github.com/huynguyencong/ImageScrollView", 623 | "description": "Scrollable and zoomable image view for iOS in Swift", 624 | "fork": false, 625 | "url": "https://api.github.com/repos/huynguyencong/ImageScrollView", 626 | "forks_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/forks", 627 | "keys_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/keys{/key_id}", 628 | "collaborators_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/collaborators{/collaborator}", 629 | "teams_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/teams", 630 | "hooks_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/hooks", 631 | "issue_events_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/issues/events{/number}", 632 | "events_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/events", 633 | "assignees_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/assignees{/user}", 634 | "branches_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/branches{/branch}", 635 | "tags_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/tags", 636 | "blobs_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/git/blobs{/sha}", 637 | "git_tags_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/git/tags{/sha}", 638 | "git_refs_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/git/refs{/sha}", 639 | "trees_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/git/trees{/sha}", 640 | "statuses_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/statuses/{sha}", 641 | "languages_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/languages", 642 | "stargazers_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/stargazers", 643 | "contributors_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/contributors", 644 | "subscribers_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/subscribers", 645 | "subscription_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/subscription", 646 | "commits_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/commits{/sha}", 647 | "git_commits_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/git/commits{/sha}", 648 | "comments_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/comments{/number}", 649 | "issue_comment_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/issues/comments{/number}", 650 | "contents_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/contents/{+path}", 651 | "compare_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/compare/{base}...{head}", 652 | "merges_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/merges", 653 | "archive_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/{archive_format}{/ref}", 654 | "downloads_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/downloads", 655 | "issues_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/issues{/number}", 656 | "pulls_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/pulls{/number}", 657 | "milestones_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/milestones{/number}", 658 | "notifications_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/notifications{?since,all,participating}", 659 | "labels_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/labels{/name}", 660 | "releases_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/releases{/id}", 661 | "deployments_url": "https://api.github.com/repos/huynguyencong/ImageScrollView/deployments", 662 | "created_at": "2016-03-04T15:15:28Z", 663 | "updated_at": "2021-05-16T11:15:51Z", 664 | "pushed_at": "2021-03-02T12:00:14Z", 665 | "git_url": "git://github.com/huynguyencong/ImageScrollView.git", 666 | "ssh_url": "git@github.com:huynguyencong/ImageScrollView.git", 667 | "clone_url": "https://github.com/huynguyencong/ImageScrollView.git", 668 | "svn_url": "https://github.com/huynguyencong/ImageScrollView", 669 | "homepage": "", 670 | "size": 16084, 671 | "stargazers_count": 250, 672 | "watchers_count": 250, 673 | "language": "Swift", 674 | "has_issues": true, 675 | "has_projects": true, 676 | "has_downloads": true, 677 | "has_wiki": true, 678 | "has_pages": false, 679 | "forks_count": 75, 680 | "mirror_url": null, 681 | "archived": false, 682 | "disabled": false, 683 | "open_issues_count": 1, 684 | "license": { 685 | "key": "mit", 686 | "name": "MIT License", 687 | "spdx_id": "MIT", 688 | "url": "https://api.github.com/licenses/mit", 689 | "node_id": "MDc6TGljZW5zZTEz" 690 | }, 691 | "forks": 75, 692 | "open_issues": 1, 693 | "watchers": 250, 694 | "default_branch": "master" 695 | }, 696 | { 697 | "id": 50266831, 698 | "node_id": "MDEwOlJlcG9zaXRvcnk1MDI2NjgzMQ==", 699 | "name": "iOS-CircleProgressView", 700 | "full_name": "huynguyencong/iOS-CircleProgressView", 701 | "private": false, 702 | "owner": { 703 | "login": "huynguyencong", 704 | "id": 12905487, 705 | "node_id": "MDQ6VXNlcjEyOTA1NDg3", 706 | "avatar_url": "https://avatars.githubusercontent.com/u/12905487?v=4", 707 | "gravatar_id": "", 708 | "url": "https://api.github.com/users/huynguyencong", 709 | "html_url": "https://github.com/huynguyencong", 710 | "followers_url": "https://api.github.com/users/huynguyencong/followers", 711 | "following_url": "https://api.github.com/users/huynguyencong/following{/other_user}", 712 | "gists_url": "https://api.github.com/users/huynguyencong/gists{/gist_id}", 713 | "starred_url": "https://api.github.com/users/huynguyencong/starred{/owner}{/repo}", 714 | "subscriptions_url": "https://api.github.com/users/huynguyencong/subscriptions", 715 | "organizations_url": "https://api.github.com/users/huynguyencong/orgs", 716 | "repos_url": "https://api.github.com/users/huynguyencong/repos", 717 | "events_url": "https://api.github.com/users/huynguyencong/events{/privacy}", 718 | "received_events_url": "https://api.github.com/users/huynguyencong/received_events", 719 | "type": "User", 720 | "site_admin": false 721 | }, 722 | "html_url": "https://github.com/huynguyencong/iOS-CircleProgressView", 723 | "description": "CircleProgressView", 724 | "fork": true, 725 | "url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView", 726 | "forks_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/forks", 727 | "keys_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/keys{/key_id}", 728 | "collaborators_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/collaborators{/collaborator}", 729 | "teams_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/teams", 730 | "hooks_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/hooks", 731 | "issue_events_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/issues/events{/number}", 732 | "events_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/events", 733 | "assignees_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/assignees{/user}", 734 | "branches_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/branches{/branch}", 735 | "tags_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/tags", 736 | "blobs_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/git/blobs{/sha}", 737 | "git_tags_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/git/tags{/sha}", 738 | "git_refs_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/git/refs{/sha}", 739 | "trees_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/git/trees{/sha}", 740 | "statuses_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/statuses/{sha}", 741 | "languages_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/languages", 742 | "stargazers_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/stargazers", 743 | "contributors_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/contributors", 744 | "subscribers_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/subscribers", 745 | "subscription_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/subscription", 746 | "commits_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/commits{/sha}", 747 | "git_commits_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/git/commits{/sha}", 748 | "comments_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/comments{/number}", 749 | "issue_comment_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/issues/comments{/number}", 750 | "contents_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/contents/{+path}", 751 | "compare_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/compare/{base}...{head}", 752 | "merges_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/merges", 753 | "archive_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/{archive_format}{/ref}", 754 | "downloads_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/downloads", 755 | "issues_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/issues{/number}", 756 | "pulls_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/pulls{/number}", 757 | "milestones_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/milestones{/number}", 758 | "notifications_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/notifications{?since,all,participating}", 759 | "labels_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/labels{/name}", 760 | "releases_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/releases{/id}", 761 | "deployments_url": "https://api.github.com/repos/huynguyencong/iOS-CircleProgressView/deployments", 762 | "created_at": "2016-01-24T01:18:02Z", 763 | "updated_at": "2018-05-09T13:46:38Z", 764 | "pushed_at": "2016-01-24T01:23:18Z", 765 | "git_url": "git://github.com/huynguyencong/iOS-CircleProgressView.git", 766 | "ssh_url": "git@github.com:huynguyencong/iOS-CircleProgressView.git", 767 | "clone_url": "https://github.com/huynguyencong/iOS-CircleProgressView.git", 768 | "svn_url": "https://github.com/huynguyencong/iOS-CircleProgressView", 769 | "homepage": null, 770 | "size": 656, 771 | "stargazers_count": 4, 772 | "watchers_count": 4, 773 | "language": "Swift", 774 | "has_issues": false, 775 | "has_projects": true, 776 | "has_downloads": true, 777 | "has_wiki": true, 778 | "has_pages": false, 779 | "forks_count": 0, 780 | "mirror_url": null, 781 | "archived": false, 782 | "disabled": false, 783 | "open_issues_count": 0, 784 | "license": { 785 | "key": "mit", 786 | "name": "MIT License", 787 | "spdx_id": "MIT", 788 | "url": "https://api.github.com/licenses/mit", 789 | "node_id": "MDc6TGljZW5zZTEz" 790 | }, 791 | "forks": 0, 792 | "open_issues": 0, 793 | "watchers": 4, 794 | "default_branch": "master" 795 | }, 796 | { 797 | "id": 43664127, 798 | "node_id": "MDEwOlJlcG9zaXRvcnk0MzY2NDEyNw==", 799 | "name": "ios-ntp", 800 | "full_name": "huynguyencong/ios-ntp", 801 | "private": false, 802 | "owner": { 803 | "login": "huynguyencong", 804 | "id": 12905487, 805 | "node_id": "MDQ6VXNlcjEyOTA1NDg3", 806 | "avatar_url": "https://avatars.githubusercontent.com/u/12905487?v=4", 807 | "gravatar_id": "", 808 | "url": "https://api.github.com/users/huynguyencong", 809 | "html_url": "https://github.com/huynguyencong", 810 | "followers_url": "https://api.github.com/users/huynguyencong/followers", 811 | "following_url": "https://api.github.com/users/huynguyencong/following{/other_user}", 812 | "gists_url": "https://api.github.com/users/huynguyencong/gists{/gist_id}", 813 | "starred_url": "https://api.github.com/users/huynguyencong/starred{/owner}{/repo}", 814 | "subscriptions_url": "https://api.github.com/users/huynguyencong/subscriptions", 815 | "organizations_url": "https://api.github.com/users/huynguyencong/orgs", 816 | "repos_url": "https://api.github.com/users/huynguyencong/repos", 817 | "events_url": "https://api.github.com/users/huynguyencong/events{/privacy}", 818 | "received_events_url": "https://api.github.com/users/huynguyencong/received_events", 819 | "type": "User", 820 | "site_admin": false 821 | }, 822 | "html_url": "https://github.com/huynguyencong/ios-ntp", 823 | "description": "SNTP implementation for iOS", 824 | "fork": true, 825 | "url": "https://api.github.com/repos/huynguyencong/ios-ntp", 826 | "forks_url": "https://api.github.com/repos/huynguyencong/ios-ntp/forks", 827 | "keys_url": "https://api.github.com/repos/huynguyencong/ios-ntp/keys{/key_id}", 828 | "collaborators_url": "https://api.github.com/repos/huynguyencong/ios-ntp/collaborators{/collaborator}", 829 | "teams_url": "https://api.github.com/repos/huynguyencong/ios-ntp/teams", 830 | "hooks_url": "https://api.github.com/repos/huynguyencong/ios-ntp/hooks", 831 | "issue_events_url": "https://api.github.com/repos/huynguyencong/ios-ntp/issues/events{/number}", 832 | "events_url": "https://api.github.com/repos/huynguyencong/ios-ntp/events", 833 | "assignees_url": "https://api.github.com/repos/huynguyencong/ios-ntp/assignees{/user}", 834 | "branches_url": "https://api.github.com/repos/huynguyencong/ios-ntp/branches{/branch}", 835 | "tags_url": "https://api.github.com/repos/huynguyencong/ios-ntp/tags", 836 | "blobs_url": "https://api.github.com/repos/huynguyencong/ios-ntp/git/blobs{/sha}", 837 | "git_tags_url": "https://api.github.com/repos/huynguyencong/ios-ntp/git/tags{/sha}", 838 | "git_refs_url": "https://api.github.com/repos/huynguyencong/ios-ntp/git/refs{/sha}", 839 | "trees_url": "https://api.github.com/repos/huynguyencong/ios-ntp/git/trees{/sha}", 840 | "statuses_url": "https://api.github.com/repos/huynguyencong/ios-ntp/statuses/{sha}", 841 | "languages_url": "https://api.github.com/repos/huynguyencong/ios-ntp/languages", 842 | "stargazers_url": "https://api.github.com/repos/huynguyencong/ios-ntp/stargazers", 843 | "contributors_url": "https://api.github.com/repos/huynguyencong/ios-ntp/contributors", 844 | "subscribers_url": "https://api.github.com/repos/huynguyencong/ios-ntp/subscribers", 845 | "subscription_url": "https://api.github.com/repos/huynguyencong/ios-ntp/subscription", 846 | "commits_url": "https://api.github.com/repos/huynguyencong/ios-ntp/commits{/sha}", 847 | "git_commits_url": "https://api.github.com/repos/huynguyencong/ios-ntp/git/commits{/sha}", 848 | "comments_url": "https://api.github.com/repos/huynguyencong/ios-ntp/comments{/number}", 849 | "issue_comment_url": "https://api.github.com/repos/huynguyencong/ios-ntp/issues/comments{/number}", 850 | "contents_url": "https://api.github.com/repos/huynguyencong/ios-ntp/contents/{+path}", 851 | "compare_url": "https://api.github.com/repos/huynguyencong/ios-ntp/compare/{base}...{head}", 852 | "merges_url": "https://api.github.com/repos/huynguyencong/ios-ntp/merges", 853 | "archive_url": "https://api.github.com/repos/huynguyencong/ios-ntp/{archive_format}{/ref}", 854 | "downloads_url": "https://api.github.com/repos/huynguyencong/ios-ntp/downloads", 855 | "issues_url": "https://api.github.com/repos/huynguyencong/ios-ntp/issues{/number}", 856 | "pulls_url": "https://api.github.com/repos/huynguyencong/ios-ntp/pulls{/number}", 857 | "milestones_url": "https://api.github.com/repos/huynguyencong/ios-ntp/milestones{/number}", 858 | "notifications_url": "https://api.github.com/repos/huynguyencong/ios-ntp/notifications{?since,all,participating}", 859 | "labels_url": "https://api.github.com/repos/huynguyencong/ios-ntp/labels{/name}", 860 | "releases_url": "https://api.github.com/repos/huynguyencong/ios-ntp/releases{/id}", 861 | "deployments_url": "https://api.github.com/repos/huynguyencong/ios-ntp/deployments", 862 | "created_at": "2015-10-05T03:47:21Z", 863 | "updated_at": "2015-10-05T03:47:22Z", 864 | "pushed_at": "2015-10-05T03:51:47Z", 865 | "git_url": "git://github.com/huynguyencong/ios-ntp.git", 866 | "ssh_url": "git@github.com:huynguyencong/ios-ntp.git", 867 | "clone_url": "https://github.com/huynguyencong/ios-ntp.git", 868 | "svn_url": "https://github.com/huynguyencong/ios-ntp", 869 | "homepage": "http://code.google.com/p/ios-ntp/", 870 | "size": 1642, 871 | "stargazers_count": 0, 872 | "watchers_count": 0, 873 | "language": "Objective-C", 874 | "has_issues": false, 875 | "has_projects": true, 876 | "has_downloads": true, 877 | "has_wiki": true, 878 | "has_pages": false, 879 | "forks_count": 0, 880 | "mirror_url": null, 881 | "archived": false, 882 | "disabled": false, 883 | "open_issues_count": 0, 884 | "license": { 885 | "key": "mit", 886 | "name": "MIT License", 887 | "spdx_id": "MIT", 888 | "url": "https://api.github.com/licenses/mit", 889 | "node_id": "MDc6TGljZW5zZTEz" 890 | }, 891 | "forks": 0, 892 | "open_issues": 0, 893 | "watchers": 0, 894 | "default_branch": "master" 895 | }, 896 | { 897 | "id": 137669247, 898 | "node_id": "MDEwOlJlcG9zaXRvcnkxMzc2NjkyNDc=", 899 | "name": "MyNotes", 900 | "full_name": "huynguyencong/MyNotes", 901 | "private": false, 902 | "owner": { 903 | "login": "huynguyencong", 904 | "id": 12905487, 905 | "node_id": "MDQ6VXNlcjEyOTA1NDg3", 906 | "avatar_url": "https://avatars.githubusercontent.com/u/12905487?v=4", 907 | "gravatar_id": "", 908 | "url": "https://api.github.com/users/huynguyencong", 909 | "html_url": "https://github.com/huynguyencong", 910 | "followers_url": "https://api.github.com/users/huynguyencong/followers", 911 | "following_url": "https://api.github.com/users/huynguyencong/following{/other_user}", 912 | "gists_url": "https://api.github.com/users/huynguyencong/gists{/gist_id}", 913 | "starred_url": "https://api.github.com/users/huynguyencong/starred{/owner}{/repo}", 914 | "subscriptions_url": "https://api.github.com/users/huynguyencong/subscriptions", 915 | "organizations_url": "https://api.github.com/users/huynguyencong/orgs", 916 | "repos_url": "https://api.github.com/users/huynguyencong/repos", 917 | "events_url": "https://api.github.com/users/huynguyencong/events{/privacy}", 918 | "received_events_url": "https://api.github.com/users/huynguyencong/received_events", 919 | "type": "User", 920 | "site_admin": false 921 | }, 922 | "html_url": "https://github.com/huynguyencong/MyNotes", 923 | "description": "It's only my notes for something that I read and be interested in", 924 | "fork": false, 925 | "url": "https://api.github.com/repos/huynguyencong/MyNotes", 926 | "forks_url": "https://api.github.com/repos/huynguyencong/MyNotes/forks", 927 | "keys_url": "https://api.github.com/repos/huynguyencong/MyNotes/keys{/key_id}", 928 | "collaborators_url": "https://api.github.com/repos/huynguyencong/MyNotes/collaborators{/collaborator}", 929 | "teams_url": "https://api.github.com/repos/huynguyencong/MyNotes/teams", 930 | "hooks_url": "https://api.github.com/repos/huynguyencong/MyNotes/hooks", 931 | "issue_events_url": "https://api.github.com/repos/huynguyencong/MyNotes/issues/events{/number}", 932 | "events_url": "https://api.github.com/repos/huynguyencong/MyNotes/events", 933 | "assignees_url": "https://api.github.com/repos/huynguyencong/MyNotes/assignees{/user}", 934 | "branches_url": "https://api.github.com/repos/huynguyencong/MyNotes/branches{/branch}", 935 | "tags_url": "https://api.github.com/repos/huynguyencong/MyNotes/tags", 936 | "blobs_url": "https://api.github.com/repos/huynguyencong/MyNotes/git/blobs{/sha}", 937 | "git_tags_url": "https://api.github.com/repos/huynguyencong/MyNotes/git/tags{/sha}", 938 | "git_refs_url": "https://api.github.com/repos/huynguyencong/MyNotes/git/refs{/sha}", 939 | "trees_url": "https://api.github.com/repos/huynguyencong/MyNotes/git/trees{/sha}", 940 | "statuses_url": "https://api.github.com/repos/huynguyencong/MyNotes/statuses/{sha}", 941 | "languages_url": "https://api.github.com/repos/huynguyencong/MyNotes/languages", 942 | "stargazers_url": "https://api.github.com/repos/huynguyencong/MyNotes/stargazers", 943 | "contributors_url": "https://api.github.com/repos/huynguyencong/MyNotes/contributors", 944 | "subscribers_url": "https://api.github.com/repos/huynguyencong/MyNotes/subscribers", 945 | "subscription_url": "https://api.github.com/repos/huynguyencong/MyNotes/subscription", 946 | "commits_url": "https://api.github.com/repos/huynguyencong/MyNotes/commits{/sha}", 947 | "git_commits_url": "https://api.github.com/repos/huynguyencong/MyNotes/git/commits{/sha}", 948 | "comments_url": "https://api.github.com/repos/huynguyencong/MyNotes/comments{/number}", 949 | "issue_comment_url": "https://api.github.com/repos/huynguyencong/MyNotes/issues/comments{/number}", 950 | "contents_url": "https://api.github.com/repos/huynguyencong/MyNotes/contents/{+path}", 951 | "compare_url": "https://api.github.com/repos/huynguyencong/MyNotes/compare/{base}...{head}", 952 | "merges_url": "https://api.github.com/repos/huynguyencong/MyNotes/merges", 953 | "archive_url": "https://api.github.com/repos/huynguyencong/MyNotes/{archive_format}{/ref}", 954 | "downloads_url": "https://api.github.com/repos/huynguyencong/MyNotes/downloads", 955 | "issues_url": "https://api.github.com/repos/huynguyencong/MyNotes/issues{/number}", 956 | "pulls_url": "https://api.github.com/repos/huynguyencong/MyNotes/pulls{/number}", 957 | "milestones_url": "https://api.github.com/repos/huynguyencong/MyNotes/milestones{/number}", 958 | "notifications_url": "https://api.github.com/repos/huynguyencong/MyNotes/notifications{?since,all,participating}", 959 | "labels_url": "https://api.github.com/repos/huynguyencong/MyNotes/labels{/name}", 960 | "releases_url": "https://api.github.com/repos/huynguyencong/MyNotes/releases{/id}", 961 | "deployments_url": "https://api.github.com/repos/huynguyencong/MyNotes/deployments", 962 | "created_at": "2018-06-17T16:25:24Z", 963 | "updated_at": "2020-09-15T20:12:09Z", 964 | "pushed_at": "2020-09-15T20:12:07Z", 965 | "git_url": "git://github.com/huynguyencong/MyNotes.git", 966 | "ssh_url": "git@github.com:huynguyencong/MyNotes.git", 967 | "clone_url": "https://github.com/huynguyencong/MyNotes.git", 968 | "svn_url": "https://github.com/huynguyencong/MyNotes", 969 | "homepage": null, 970 | "size": 4, 971 | "stargazers_count": 0, 972 | "watchers_count": 0, 973 | "language": "Swift", 974 | "has_issues": true, 975 | "has_projects": true, 976 | "has_downloads": true, 977 | "has_wiki": true, 978 | "has_pages": false, 979 | "forks_count": 0, 980 | "mirror_url": null, 981 | "archived": false, 982 | "disabled": false, 983 | "open_issues_count": 0, 984 | "license": null, 985 | "forks": 0, 986 | "open_issues": 0, 987 | "watchers": 0, 988 | "default_branch": "master" 989 | }, 990 | { 991 | "id": 42801161, 992 | "node_id": "MDEwOlJlcG9zaXRvcnk0MjgwMTE2MQ==", 993 | "name": "NHNetworkTime", 994 | "full_name": "huynguyencong/NHNetworkTime", 995 | "private": false, 996 | "owner": { 997 | "login": "huynguyencong", 998 | "id": 12905487, 999 | "node_id": "MDQ6VXNlcjEyOTA1NDg3", 1000 | "avatar_url": "https://avatars.githubusercontent.com/u/12905487?v=4", 1001 | "gravatar_id": "", 1002 | "url": "https://api.github.com/users/huynguyencong", 1003 | "html_url": "https://github.com/huynguyencong", 1004 | "followers_url": "https://api.github.com/users/huynguyencong/followers", 1005 | "following_url": "https://api.github.com/users/huynguyencong/following{/other_user}", 1006 | "gists_url": "https://api.github.com/users/huynguyencong/gists{/gist_id}", 1007 | "starred_url": "https://api.github.com/users/huynguyencong/starred{/owner}{/repo}", 1008 | "subscriptions_url": "https://api.github.com/users/huynguyencong/subscriptions", 1009 | "organizations_url": "https://api.github.com/users/huynguyencong/orgs", 1010 | "repos_url": "https://api.github.com/users/huynguyencong/repos", 1011 | "events_url": "https://api.github.com/users/huynguyencong/events{/privacy}", 1012 | "received_events_url": "https://api.github.com/users/huynguyencong/received_events", 1013 | "type": "User", 1014 | "site_admin": false 1015 | }, 1016 | "html_url": "https://github.com/huynguyencong/NHNetworkTime", 1017 | "description": "A network time protocol (NTP) client for Objective C - iOS, update the correct time.", 1018 | "fork": false, 1019 | "url": "https://api.github.com/repos/huynguyencong/NHNetworkTime", 1020 | "forks_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/forks", 1021 | "keys_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/keys{/key_id}", 1022 | "collaborators_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/collaborators{/collaborator}", 1023 | "teams_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/teams", 1024 | "hooks_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/hooks", 1025 | "issue_events_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/issues/events{/number}", 1026 | "events_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/events", 1027 | "assignees_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/assignees{/user}", 1028 | "branches_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/branches{/branch}", 1029 | "tags_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/tags", 1030 | "blobs_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/git/blobs{/sha}", 1031 | "git_tags_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/git/tags{/sha}", 1032 | "git_refs_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/git/refs{/sha}", 1033 | "trees_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/git/trees{/sha}", 1034 | "statuses_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/statuses/{sha}", 1035 | "languages_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/languages", 1036 | "stargazers_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/stargazers", 1037 | "contributors_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/contributors", 1038 | "subscribers_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/subscribers", 1039 | "subscription_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/subscription", 1040 | "commits_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/commits{/sha}", 1041 | "git_commits_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/git/commits{/sha}", 1042 | "comments_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/comments{/number}", 1043 | "issue_comment_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/issues/comments{/number}", 1044 | "contents_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/contents/{+path}", 1045 | "compare_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/compare/{base}...{head}", 1046 | "merges_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/merges", 1047 | "archive_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/{archive_format}{/ref}", 1048 | "downloads_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/downloads", 1049 | "issues_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/issues{/number}", 1050 | "pulls_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/pulls{/number}", 1051 | "milestones_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/milestones{/number}", 1052 | "notifications_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/notifications{?since,all,participating}", 1053 | "labels_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/labels{/name}", 1054 | "releases_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/releases{/id}", 1055 | "deployments_url": "https://api.github.com/repos/huynguyencong/NHNetworkTime/deployments", 1056 | "created_at": "2015-09-20T05:14:43Z", 1057 | "updated_at": "2020-12-14T09:07:22Z", 1058 | "pushed_at": "2018-04-16T08:46:14Z", 1059 | "git_url": "git://github.com/huynguyencong/NHNetworkTime.git", 1060 | "ssh_url": "git@github.com:huynguyencong/NHNetworkTime.git", 1061 | "clone_url": "https://github.com/huynguyencong/NHNetworkTime.git", 1062 | "svn_url": "https://github.com/huynguyencong/NHNetworkTime", 1063 | "homepage": "", 1064 | "size": 68, 1065 | "stargazers_count": 102, 1066 | "watchers_count": 102, 1067 | "language": "Objective-C", 1068 | "has_issues": true, 1069 | "has_projects": true, 1070 | "has_downloads": true, 1071 | "has_wiki": true, 1072 | "has_pages": false, 1073 | "forks_count": 20, 1074 | "mirror_url": null, 1075 | "archived": false, 1076 | "disabled": false, 1077 | "open_issues_count": 3, 1078 | "license": { 1079 | "key": "apache-2.0", 1080 | "name": "Apache License 2.0", 1081 | "spdx_id": "Apache-2.0", 1082 | "url": "https://api.github.com/licenses/apache-2.0", 1083 | "node_id": "MDc6TGljZW5zZTI=" 1084 | }, 1085 | "forks": 20, 1086 | "open_issues": 3, 1087 | "watchers": 102, 1088 | "default_branch": "master" 1089 | }, 1090 | { 1091 | "id": 39987100, 1092 | "node_id": "MDEwOlJlcG9zaXRvcnkzOTk4NzEwMA==", 1093 | "name": "NHReturnReminder", 1094 | "full_name": "huynguyencong/NHReturnReminder", 1095 | "private": false, 1096 | "owner": { 1097 | "login": "huynguyencong", 1098 | "id": 12905487, 1099 | "node_id": "MDQ6VXNlcjEyOTA1NDg3", 1100 | "avatar_url": "https://avatars.githubusercontent.com/u/12905487?v=4", 1101 | "gravatar_id": "", 1102 | "url": "https://api.github.com/users/huynguyencong", 1103 | "html_url": "https://github.com/huynguyencong", 1104 | "followers_url": "https://api.github.com/users/huynguyencong/followers", 1105 | "following_url": "https://api.github.com/users/huynguyencong/following{/other_user}", 1106 | "gists_url": "https://api.github.com/users/huynguyencong/gists{/gist_id}", 1107 | "starred_url": "https://api.github.com/users/huynguyencong/starred{/owner}{/repo}", 1108 | "subscriptions_url": "https://api.github.com/users/huynguyencong/subscriptions", 1109 | "organizations_url": "https://api.github.com/users/huynguyencong/orgs", 1110 | "repos_url": "https://api.github.com/users/huynguyencong/repos", 1111 | "events_url": "https://api.github.com/users/huynguyencong/events{/privacy}", 1112 | "received_events_url": "https://api.github.com/users/huynguyencong/received_events", 1113 | "type": "User", 1114 | "site_admin": false 1115 | }, 1116 | "html_url": "https://github.com/huynguyencong/NHReturnReminder", 1117 | "description": "NHReturnReminder", 1118 | "fork": false, 1119 | "url": "https://api.github.com/repos/huynguyencong/NHReturnReminder", 1120 | "forks_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/forks", 1121 | "keys_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/keys{/key_id}", 1122 | "collaborators_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/collaborators{/collaborator}", 1123 | "teams_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/teams", 1124 | "hooks_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/hooks", 1125 | "issue_events_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/issues/events{/number}", 1126 | "events_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/events", 1127 | "assignees_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/assignees{/user}", 1128 | "branches_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/branches{/branch}", 1129 | "tags_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/tags", 1130 | "blobs_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/git/blobs{/sha}", 1131 | "git_tags_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/git/tags{/sha}", 1132 | "git_refs_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/git/refs{/sha}", 1133 | "trees_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/git/trees{/sha}", 1134 | "statuses_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/statuses/{sha}", 1135 | "languages_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/languages", 1136 | "stargazers_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/stargazers", 1137 | "contributors_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/contributors", 1138 | "subscribers_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/subscribers", 1139 | "subscription_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/subscription", 1140 | "commits_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/commits{/sha}", 1141 | "git_commits_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/git/commits{/sha}", 1142 | "comments_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/comments{/number}", 1143 | "issue_comment_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/issues/comments{/number}", 1144 | "contents_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/contents/{+path}", 1145 | "compare_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/compare/{base}...{head}", 1146 | "merges_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/merges", 1147 | "archive_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/{archive_format}{/ref}", 1148 | "downloads_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/downloads", 1149 | "issues_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/issues{/number}", 1150 | "pulls_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/pulls{/number}", 1151 | "milestones_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/milestones{/number}", 1152 | "notifications_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/notifications{?since,all,participating}", 1153 | "labels_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/labels{/name}", 1154 | "releases_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/releases{/id}", 1155 | "deployments_url": "https://api.github.com/repos/huynguyencong/NHReturnReminder/deployments", 1156 | "created_at": "2015-07-31T04:47:18Z", 1157 | "updated_at": "2016-01-31T17:31:52Z", 1158 | "pushed_at": "2016-02-02T17:42:38Z", 1159 | "git_url": "git://github.com/huynguyencong/NHReturnReminder.git", 1160 | "ssh_url": "git@github.com:huynguyencong/NHReturnReminder.git", 1161 | "clone_url": "https://github.com/huynguyencong/NHReturnReminder.git", 1162 | "svn_url": "https://github.com/huynguyencong/NHReturnReminder", 1163 | "homepage": null, 1164 | "size": 32, 1165 | "stargazers_count": 0, 1166 | "watchers_count": 0, 1167 | "language": "Objective-C", 1168 | "has_issues": true, 1169 | "has_projects": true, 1170 | "has_downloads": true, 1171 | "has_wiki": true, 1172 | "has_pages": false, 1173 | "forks_count": 1, 1174 | "mirror_url": null, 1175 | "archived": false, 1176 | "disabled": false, 1177 | "open_issues_count": 0, 1178 | "license": { 1179 | "key": "apache-2.0", 1180 | "name": "Apache License 2.0", 1181 | "spdx_id": "Apache-2.0", 1182 | "url": "https://api.github.com/licenses/apache-2.0", 1183 | "node_id": "MDc6TGljZW5zZTI=" 1184 | }, 1185 | "forks": 1, 1186 | "open_issues": 0, 1187 | "watchers": 0, 1188 | "default_branch": "master" 1189 | }, 1190 | { 1191 | "id": 368056656, 1192 | "node_id": "MDEwOlJlcG9zaXRvcnkzNjgwNTY2NTY=", 1193 | "name": "SwiftUI-MVVM-C", 1194 | "full_name": "huynguyencong/SwiftUI-MVVM-C", 1195 | "private": false, 1196 | "owner": { 1197 | "login": "huynguyencong", 1198 | "id": 12905487, 1199 | "node_id": "MDQ6VXNlcjEyOTA1NDg3", 1200 | "avatar_url": "https://avatars.githubusercontent.com/u/12905487?v=4", 1201 | "gravatar_id": "", 1202 | "url": "https://api.github.com/users/huynguyencong", 1203 | "html_url": "https://github.com/huynguyencong", 1204 | "followers_url": "https://api.github.com/users/huynguyencong/followers", 1205 | "following_url": "https://api.github.com/users/huynguyencong/following{/other_user}", 1206 | "gists_url": "https://api.github.com/users/huynguyencong/gists{/gist_id}", 1207 | "starred_url": "https://api.github.com/users/huynguyencong/starred{/owner}{/repo}", 1208 | "subscriptions_url": "https://api.github.com/users/huynguyencong/subscriptions", 1209 | "organizations_url": "https://api.github.com/users/huynguyencong/orgs", 1210 | "repos_url": "https://api.github.com/users/huynguyencong/repos", 1211 | "events_url": "https://api.github.com/users/huynguyencong/events{/privacy}", 1212 | "received_events_url": "https://api.github.com/users/huynguyencong/received_events", 1213 | "type": "User", 1214 | "site_admin": false 1215 | }, 1216 | "html_url": "https://github.com/huynguyencong/SwiftUI-MVVM-C", 1217 | "description": "A template project that uses SwiftUI for UI, Combine for event handling, MVVM-C for architecture", 1218 | "fork": false, 1219 | "url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C", 1220 | "forks_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/forks", 1221 | "keys_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/keys{/key_id}", 1222 | "collaborators_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/collaborators{/collaborator}", 1223 | "teams_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/teams", 1224 | "hooks_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/hooks", 1225 | "issue_events_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/issues/events{/number}", 1226 | "events_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/events", 1227 | "assignees_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/assignees{/user}", 1228 | "branches_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/branches{/branch}", 1229 | "tags_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/tags", 1230 | "blobs_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/git/blobs{/sha}", 1231 | "git_tags_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/git/tags{/sha}", 1232 | "git_refs_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/git/refs{/sha}", 1233 | "trees_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/git/trees{/sha}", 1234 | "statuses_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/statuses/{sha}", 1235 | "languages_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/languages", 1236 | "stargazers_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/stargazers", 1237 | "contributors_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/contributors", 1238 | "subscribers_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/subscribers", 1239 | "subscription_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/subscription", 1240 | "commits_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/commits{/sha}", 1241 | "git_commits_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/git/commits{/sha}", 1242 | "comments_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/comments{/number}", 1243 | "issue_comment_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/issues/comments{/number}", 1244 | "contents_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/contents/{+path}", 1245 | "compare_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/compare/{base}...{head}", 1246 | "merges_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/merges", 1247 | "archive_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/{archive_format}{/ref}", 1248 | "downloads_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/downloads", 1249 | "issues_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/issues{/number}", 1250 | "pulls_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/pulls{/number}", 1251 | "milestones_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/milestones{/number}", 1252 | "notifications_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/notifications{?since,all,participating}", 1253 | "labels_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/labels{/name}", 1254 | "releases_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/releases{/id}", 1255 | "deployments_url": "https://api.github.com/repos/huynguyencong/SwiftUI-MVVM-C/deployments", 1256 | "created_at": "2021-05-17T04:40:51Z", 1257 | "updated_at": "2021-05-17T04:40:53Z", 1258 | "pushed_at": "2021-05-17T04:40:51Z", 1259 | "git_url": "git://github.com/huynguyencong/SwiftUI-MVVM-C.git", 1260 | "ssh_url": "git@github.com:huynguyencong/SwiftUI-MVVM-C.git", 1261 | "clone_url": "https://github.com/huynguyencong/SwiftUI-MVVM-C.git", 1262 | "svn_url": "https://github.com/huynguyencong/SwiftUI-MVVM-C", 1263 | "homepage": null, 1264 | "size": 2, 1265 | "stargazers_count": 0, 1266 | "watchers_count": 0, 1267 | "language": null, 1268 | "has_issues": true, 1269 | "has_projects": true, 1270 | "has_downloads": true, 1271 | "has_wiki": true, 1272 | "has_pages": false, 1273 | "forks_count": 0, 1274 | "mirror_url": null, 1275 | "archived": false, 1276 | "disabled": false, 1277 | "open_issues_count": 0, 1278 | "license": { 1279 | "key": "mit", 1280 | "name": "MIT License", 1281 | "spdx_id": "MIT", 1282 | "url": "https://api.github.com/licenses/mit", 1283 | "node_id": "MDc6TGljZW5zZTEz" 1284 | }, 1285 | "forks": 0, 1286 | "open_issues": 0, 1287 | "watchers": 0, 1288 | "default_branch": "main" 1289 | }, 1290 | { 1291 | "id": 295966632, 1292 | "node_id": "MDEwOlJlcG9zaXRvcnkyOTU5NjY2MzI=", 1293 | "name": "ToastSwiftUI", 1294 | "full_name": "huynguyencong/ToastSwiftUI", 1295 | "private": false, 1296 | "owner": { 1297 | "login": "huynguyencong", 1298 | "id": 12905487, 1299 | "node_id": "MDQ6VXNlcjEyOTA1NDg3", 1300 | "avatar_url": "https://avatars.githubusercontent.com/u/12905487?v=4", 1301 | "gravatar_id": "", 1302 | "url": "https://api.github.com/users/huynguyencong", 1303 | "html_url": "https://github.com/huynguyencong", 1304 | "followers_url": "https://api.github.com/users/huynguyencong/followers", 1305 | "following_url": "https://api.github.com/users/huynguyencong/following{/other_user}", 1306 | "gists_url": "https://api.github.com/users/huynguyencong/gists{/gist_id}", 1307 | "starred_url": "https://api.github.com/users/huynguyencong/starred{/owner}{/repo}", 1308 | "subscriptions_url": "https://api.github.com/users/huynguyencong/subscriptions", 1309 | "organizations_url": "https://api.github.com/users/huynguyencong/orgs", 1310 | "repos_url": "https://api.github.com/users/huynguyencong/repos", 1311 | "events_url": "https://api.github.com/users/huynguyencong/events{/privacy}", 1312 | "received_events_url": "https://api.github.com/users/huynguyencong/received_events", 1313 | "type": "User", 1314 | "site_admin": false 1315 | }, 1316 | "html_url": "https://github.com/huynguyencong/ToastSwiftUI", 1317 | "description": "A simple way to show a toast message in SwiftUI", 1318 | "fork": false, 1319 | "url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI", 1320 | "forks_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/forks", 1321 | "keys_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/keys{/key_id}", 1322 | "collaborators_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/collaborators{/collaborator}", 1323 | "teams_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/teams", 1324 | "hooks_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/hooks", 1325 | "issue_events_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/issues/events{/number}", 1326 | "events_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/events", 1327 | "assignees_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/assignees{/user}", 1328 | "branches_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/branches{/branch}", 1329 | "tags_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/tags", 1330 | "blobs_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/git/blobs{/sha}", 1331 | "git_tags_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/git/tags{/sha}", 1332 | "git_refs_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/git/refs{/sha}", 1333 | "trees_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/git/trees{/sha}", 1334 | "statuses_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/statuses/{sha}", 1335 | "languages_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/languages", 1336 | "stargazers_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/stargazers", 1337 | "contributors_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/contributors", 1338 | "subscribers_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/subscribers", 1339 | "subscription_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/subscription", 1340 | "commits_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/commits{/sha}", 1341 | "git_commits_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/git/commits{/sha}", 1342 | "comments_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/comments{/number}", 1343 | "issue_comment_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/issues/comments{/number}", 1344 | "contents_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/contents/{+path}", 1345 | "compare_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/compare/{base}...{head}", 1346 | "merges_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/merges", 1347 | "archive_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/{archive_format}{/ref}", 1348 | "downloads_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/downloads", 1349 | "issues_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/issues{/number}", 1350 | "pulls_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/pulls{/number}", 1351 | "milestones_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/milestones{/number}", 1352 | "notifications_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/notifications{?since,all,participating}", 1353 | "labels_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/labels{/name}", 1354 | "releases_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/releases{/id}", 1355 | "deployments_url": "https://api.github.com/repos/huynguyencong/ToastSwiftUI/deployments", 1356 | "created_at": "2020-09-16T08:09:23Z", 1357 | "updated_at": "2021-04-18T03:37:45Z", 1358 | "pushed_at": "2021-04-10T06:41:32Z", 1359 | "git_url": "git://github.com/huynguyencong/ToastSwiftUI.git", 1360 | "ssh_url": "git@github.com:huynguyencong/ToastSwiftUI.git", 1361 | "clone_url": "https://github.com/huynguyencong/ToastSwiftUI.git", 1362 | "svn_url": "https://github.com/huynguyencong/ToastSwiftUI", 1363 | "homepage": null, 1364 | "size": 8169, 1365 | "stargazers_count": 11, 1366 | "watchers_count": 11, 1367 | "language": "Swift", 1368 | "has_issues": true, 1369 | "has_projects": true, 1370 | "has_downloads": true, 1371 | "has_wiki": true, 1372 | "has_pages": false, 1373 | "forks_count": 0, 1374 | "mirror_url": null, 1375 | "archived": false, 1376 | "disabled": false, 1377 | "open_issues_count": 0, 1378 | "license": { 1379 | "key": "mit", 1380 | "name": "MIT License", 1381 | "spdx_id": "MIT", 1382 | "url": "https://api.github.com/licenses/mit", 1383 | "node_id": "MDc6TGljZW5zZTEz" 1384 | }, 1385 | "forks": 0, 1386 | "open_issues": 0, 1387 | "watchers": 11, 1388 | "default_branch": "master" 1389 | } 1390 | ] 1391 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-CTests/Networking/MockNetworkClient.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MockNetworkClient.swift 3 | // SwiftUI-MVVM-CTests 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import Foundation 9 | import Combine 10 | @testable import SwiftUI_MVVM_C 11 | 12 | class MockNetworkClient: NetworkProvider { 13 | var response: (Data?, Error?) = (nil, NetworkError.invalidResponse) 14 | 15 | init(response: (Data?, Error?)) { 16 | self.response = response 17 | } 18 | 19 | func request(_ info: RequestInfoConvertible) -> AnyPublisher { 20 | if let error = response.1 { 21 | return Fail(error: error) 22 | .eraseToAnyPublisher() 23 | } else if let data = response.0 { 24 | return Just(data) 25 | .setFailureType(to: Error.self) 26 | .eraseToAnyPublisher() 27 | } else { 28 | return Fail(error: NetworkError.invalidResponse) 29 | .eraseToAnyPublisher() 30 | } 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-CTests/SwiftUI_MVVM_CTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftUI_MVVM_CTests.swift 3 | // SwiftUI-MVVM-CTests 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import XCTest 9 | import Combine 10 | @testable import SwiftUI_MVVM_C 11 | 12 | class SwiftUI_MVVM_CTests: XCTestCase { 13 | 14 | override func setUpWithError() throws { 15 | } 16 | 17 | override func tearDownWithError() throws { 18 | } 19 | 20 | // An example of network provider testing 21 | func testGithubNetworkProviderGetRepos() { 22 | let exp = expectation(description: "Parse repos success") 23 | var subscriptions = Set() 24 | 25 | let networkClient = TestUtils.mockNetworkClient(file: "repos.json") 26 | let githubNetworkClient = GithubNetworkClient() 27 | githubNetworkClient.networkClient = networkClient 28 | 29 | githubNetworkClient.getRepos(username: "huynguyencong").sink { _ in } receiveValue: { repos in 30 | let firstRepo = repos.first 31 | let isCorrectParsing = firstRepo?.id != nil && firstRepo?.name != nil 32 | 33 | XCTAssert(isCorrectParsing) 34 | 35 | exp.fulfill() 36 | }.store(in: &subscriptions) 37 | 38 | wait(for: [exp], timeout: 0.5) 39 | } 40 | 41 | // An example of view model testing 42 | func testForkedRepoTextInRepoDetailsViewModel() { 43 | var repo = Repo() 44 | 45 | var sourceRepo = Repo() 46 | sourceRepo.fullName = "sourceOwnerName/SourceRepo" 47 | repo.source = Container(value: sourceRepo) 48 | 49 | let viewModel = RepoDetailsViewModel() 50 | viewModel.repo = repo 51 | XCTAssertEqual(viewModel.forkText, "Forked from \(sourceRepo.fullName ?? "")") 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /SwiftUI-MVVM-C/SwiftUI-MVVM-CTests/TestUtils.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestUtils.swift 3 | // SwiftUI-MVVM-CTests 4 | // 5 | // Created by Nguyen Cong Huy on 5/17/21. 6 | // 7 | 8 | import Foundation 9 | 10 | class TestUtils { 11 | static func loadData(file: String) -> Data? { 12 | guard let url = Bundle(for: Self.self).url(forResource: file, withExtension: nil), let data = try? Data(contentsOf: url) else { return nil } 13 | return data 14 | } 15 | 16 | static func mockNetworkClient(file: String) -> MockNetworkClient { 17 | let data = loadData(file: file) 18 | return MockNetworkClient(response: (data, nil)) 19 | } 20 | } 21 | --------------------------------------------------------------------------------