Skip to content

Commit

Permalink
feat(api): add basic endpoints (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hector Rondon authored and ajsb85 committed Oct 20, 2017
1 parent 81fbe96 commit aea5f75
Show file tree
Hide file tree
Showing 11 changed files with 489 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ playground.xcworkspace
# Carthage/Checkouts

Carthage/Build
Carthage/Checkouts

# fastlane
#
Expand Down
1 change: 1 addition & 0 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github "Alamofire/Alamofire"
1 change: 1 addition & 0 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github "Alamofire/Alamofire" "4.5.1"
8 changes: 8 additions & 0 deletions Example/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
disabled_rules: # rule identifiers to exclude from running
- function_body_length
- line_length
- identifier_name
- empty_enum_arguments
- trailing_whitespace
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Pods
4 changes: 0 additions & 4 deletions Example/Source/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

window = UIWindow(frame: UIScreen.main.bounds)
Expand Down Expand Up @@ -65,7 +64,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


}

11 changes: 7 additions & 4 deletions Example/Source/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@ import Glpi
class ViewController: UIViewController {

override func viewDidLoad() {

GlpiRequest.initSession(userToken: "user_token") { result in
if let data = result {
print(data)
}
}

super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}


}

48 changes: 48 additions & 0 deletions Glpi.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
0A06BB211F913C2C001D53B5 /* Glpi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A06BB171F913C2C001D53B5 /* Glpi.framework */; };
0A06BB261F913C2C001D53B5 /* GlpiTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A06BB251F913C2C001D53B5 /* GlpiTests.swift */; };
0A06BB281F913C2C001D53B5 /* Glpi.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A06BB1A1F913C2C001D53B5 /* Glpi.h */; settings = {ATTRIBUTES = (Public, ); }; };
0A1CF5AC1F97ADF90048E866 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A1CF5AB1F97ADF90048E866 /* Alamofire.framework */; };
0A1CF5B31F97B3D00048E866 /* Routers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A1CF5B21F97B3D00048E866 /* Routers.swift */; };
0A1CF5B61F97BBF60048E866 /* GlpiRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A1CF5B51F97BBF60048E866 /* GlpiRequest.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -30,13 +33,17 @@
0A06BB251F913C2C001D53B5 /* GlpiTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlpiTests.swift; sourceTree = "<group>"; };
0A06BB271F913C2C001D53B5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
0A06BB361F91401D001D53B5 /* Glpi.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = Glpi.podspec; sourceTree = "<group>"; };
0A1CF5AB1F97ADF90048E866 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/iOS/Alamofire.framework; sourceTree = "<group>"; };
0A1CF5B21F97B3D00048E866 /* Routers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Routers.swift; sourceTree = "<group>"; };
0A1CF5B51F97BBF60048E866 /* GlpiRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlpiRequest.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
0A06BB131F913C2C001D53B5 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0A1CF5AC1F97ADF90048E866 /* Alamofire.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -59,6 +66,7 @@
0A06BB191F913C2C001D53B5 /* Source */,
0A06BB241F913C2C001D53B5 /* Tests */,
0A06BB181F913C2C001D53B5 /* Products */,
0A1CF5AA1F97ADF90048E866 /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -121,9 +129,19 @@
name = Documentation;
sourceTree = "<group>";
};
0A1CF5AA1F97ADF90048E866 /* Frameworks */ = {
isa = PBXGroup;
children = (
0A1CF5AB1F97ADF90048E866 /* Alamofire.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
0A87A3151F916A000080622B /* Core */ = {
isa = PBXGroup;
children = (
0A1CF5B21F97B3D00048E866 /* Routers.swift */,
0A1CF5B51F97BBF60048E866 /* GlpiRequest.swift */,
);
name = Core;
sourceTree = "<group>";
Expand All @@ -150,6 +168,7 @@
0A06BB131F913C2C001D53B5 /* Frameworks */,
0A06BB141F913C2C001D53B5 /* Headers */,
0A06BB151F913C2C001D53B5 /* Resources */,
0A1CF5AE1F97AE440048E866 /* ShellScript */,
);
buildRules = (
);
Expand Down Expand Up @@ -234,11 +253,30 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
0A1CF5AE1F97AE440048E866 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(SRCROOT)/Carthage/Build/iOS/Alamofire.framework",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/usr/local/bin/carthage copy-frameworks";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
0A06BB121F913C2C001D53B5 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0A1CF5B31F97B3D00048E866 /* Routers.swift in Sources */,
0A1CF5B61F97BBF60048E866 /* GlpiRequest.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -385,6 +423,10 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
INFOPLIST_FILE = Source/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
Expand All @@ -409,6 +451,10 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
INFOPLIST_FILE = Source/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
Expand All @@ -424,6 +470,7 @@
0A06BB2F1F913C2C001D53B5 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = H7XJV96LX2;
INFOPLIST_FILE = Tests/Info.plist;
Expand All @@ -438,6 +485,7 @@
0A06BB301F913C2C001D53B5 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = H7XJV96LX2;
INFOPLIST_FILE = Tests/Info.plist;
Expand Down
Loading

0 comments on commit aea5f75

Please sign in to comment.