Skip to content

Commit

Permalink
HTTP Request to SpaceX API
Browse files Browse the repository at this point in the history
  • Loading branch information
victorshinya committed Aug 28, 2019
1 parent f6c3403 commit 5e0e5c7
Show file tree
Hide file tree
Showing 14 changed files with 383 additions and 52 deletions.
91 changes: 91 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

## Obj-C/Swift specific
*.hmap

## App packaging
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm

.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control

Pods/

# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build/

# Accio dependency management
Dependencies/
.accio/

# fastlane
#
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

36 changes: 28 additions & 8 deletions SpaceX.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
2297000923159B6800890B17 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2297000723159B6800890B17 /* LaunchScreen.storyboard */; };
2297001423159B6800890B17 /* SpaceXTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2297001323159B6800890B17 /* SpaceXTests.swift */; };
2297001F23159B6800890B17 /* SpaceXUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2297001E23159B6800890B17 /* SpaceXUITests.swift */; };
2297002E2315B12800890B17 /* RocketTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2297002D2315B12800890B17 /* RocketTableViewCell.swift */; };
229700302315B38D00890B17 /* Rocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2297002F2315B38D00890B17 /* Rocket.swift */; };
229700322315B55B00890B17 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 229700312315B55B00890B17 /* Constants.swift */; };
2297FFFA23159B6700890B17 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2297FFF923159B6700890B17 /* AppDelegate.swift */; };
2297FFFC23159B6700890B17 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2297FFFB23159B6700890B17 /* SceneDelegate.swift */; };
2297FFFE23159B6700890B17 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2297FFFD23159B6700890B17 /* ViewController.swift */; };
2297FFFE23159B6700890B17 /* RocketViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2297FFFD23159B6700890B17 /* RocketViewController.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -47,10 +50,13 @@
2297001A23159B6800890B17 /* SpaceXUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SpaceXUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
2297001E23159B6800890B17 /* SpaceXUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpaceXUITests.swift; sourceTree = "<group>"; };
2297002023159B6800890B17 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
2297002D2315B12800890B17 /* RocketTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RocketTableViewCell.swift; sourceTree = "<group>"; };
2297002F2315B38D00890B17 /* Rocket.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Rocket.swift; sourceTree = "<group>"; };
229700312315B55B00890B17 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
2297FFF623159B6700890B17 /* SpaceX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpaceX.app; sourceTree = BUILT_PRODUCTS_DIR; };
2297FFF923159B6700890B17 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
2297FFFB23159B6700890B17 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
2297FFFD23159B6700890B17 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
2297FFFD23159B6700890B17 /* RocketViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RocketViewController.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -96,6 +102,17 @@
path = SpaceXUITests;
sourceTree = "<group>";
};
2297002C23159B8D00890B17 /* Resources */ = {
isa = PBXGroup;
children = (
2297FFFF23159B6700890B17 /* Main.storyboard */,
2297000523159B6800890B17 /* Assets.xcassets */,
2297000723159B6800890B17 /* LaunchScreen.storyboard */,
2297000223159B6700890B17 /* SpaceX.xcdatamodeld */,
);
path = Resources;
sourceTree = "<group>";
};
2297FFED23159B6700890B17 = {
isa = PBXGroup;
children = (
Expand All @@ -121,12 +138,12 @@
children = (
2297FFF923159B6700890B17 /* AppDelegate.swift */,
2297FFFB23159B6700890B17 /* SceneDelegate.swift */,
2297FFFD23159B6700890B17 /* ViewController.swift */,
2297FFFF23159B6700890B17 /* Main.storyboard */,
2297000523159B6800890B17 /* Assets.xcassets */,
2297000723159B6800890B17 /* LaunchScreen.storyboard */,
2297FFFD23159B6700890B17 /* RocketViewController.swift */,
2297002F2315B38D00890B17 /* Rocket.swift */,
2297002D2315B12800890B17 /* RocketTableViewCell.swift */,
229700312315B55B00890B17 /* Constants.swift */,
2297002C23159B8D00890B17 /* Resources */,
2297000A23159B6800890B17 /* Info.plist */,
2297000223159B6700890B17 /* SpaceX.xcdatamodeld */,
);
path = SpaceX;
sourceTree = "<group>";
Expand Down Expand Up @@ -278,8 +295,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2297FFFE23159B6700890B17 /* ViewController.swift in Sources */,
2297002E2315B12800890B17 /* RocketTableViewCell.swift in Sources */,
2297FFFE23159B6700890B17 /* RocketViewController.swift in Sources */,
2297FFFA23159B6700890B17 /* AppDelegate.swift in Sources */,
229700302315B38D00890B17 /* Rocket.swift in Sources */,
229700322315B55B00890B17 /* Constants.swift in Sources */,
2297FFFC23159B6700890B17 /* SceneDelegate.swift in Sources */,
2297000423159B6700890B17 /* SpaceX.xcdatamodeld in Sources */,
);
Expand Down
24 changes: 0 additions & 24 deletions SpaceX/Base.lproj/Main.storyboard

This file was deleted.

17 changes: 17 additions & 0 deletions SpaceX/Constants.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// Constants.swift
// SpaceX
//
// Created by Victor Shinya on 27/08/19.
// Copyright © 2019 Victor Shinya. All rights reserved.
//

import Foundation

struct Constants {

// MARK: - APIs URL

static let base_api = "https://api.spacexdata.com/v3"
static let api_rockets = "/rockets"
}
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 5e0e5c7

Please sign in to comment.