added entry and film model
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
3068700719B2D6B1007E4A0E /* FESSCheduleEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 3068700619B2D6B1007E4A0E /* FESSCheduleEntry.m */; };
|
||||
3068700A19B2F826007E4A0E /* FESScheduleFilm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3068700919B2F826007E4A0E /* FESScheduleFilm.m */; };
|
||||
3CEA73BD19B1A86D00076FC5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3CEA73BC19B1A86C00076FC5 /* Foundation.framework */; };
|
||||
3CEA73BF19B1A86D00076FC5 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3CEA73BE19B1A86D00076FC5 /* CoreGraphics.framework */; };
|
||||
3CEA73C119B1A86D00076FC5 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3CEA73C019B1A86D00076FC5 /* UIKit.framework */; };
|
||||
@@ -33,6 +35,10 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
3068700519B2D6B1007E4A0E /* FESSCheduleEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FESSCheduleEntry.h; path = schedule/FESSCheduleEntry.h; sourceTree = "<group>"; };
|
||||
3068700619B2D6B1007E4A0E /* FESSCheduleEntry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FESSCheduleEntry.m; path = schedule/FESSCheduleEntry.m; sourceTree = "<group>"; };
|
||||
3068700819B2F826007E4A0E /* FESScheduleFilm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FESScheduleFilm.h; path = schedule/FESScheduleFilm.h; sourceTree = "<group>"; };
|
||||
3068700919B2F826007E4A0E /* FESScheduleFilm.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FESScheduleFilm.m; path = schedule/FESScheduleFilm.m; sourceTree = "<group>"; };
|
||||
3CEA73B919B1A86C00076FC5 /* FestivalHelper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FestivalHelper.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3CEA73BC19B1A86C00076FC5 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
3CEA73BE19B1A86D00076FC5 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
@@ -76,6 +82,17 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
3068700419B2D4C7007E4A0E /* schedule */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3068700519B2D6B1007E4A0E /* FESSCheduleEntry.h */,
|
||||
3068700619B2D6B1007E4A0E /* FESSCheduleEntry.m */,
|
||||
3068700819B2F826007E4A0E /* FESScheduleFilm.h */,
|
||||
3068700919B2F826007E4A0E /* FESScheduleFilm.m */,
|
||||
);
|
||||
name = schedule;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3CEA73B019B1A86C00076FC5 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -109,6 +126,7 @@
|
||||
3CEA73C219B1A86D00076FC5 /* FestivalHelper */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3068700419B2D4C7007E4A0E /* schedule */,
|
||||
3CEA73CB19B1A86D00076FC5 /* FESAppDelegate.h */,
|
||||
3CEA73CC19B1A86D00076FC5 /* FESAppDelegate.m */,
|
||||
3CEA73CE19B1A86D00076FC5 /* Main.storyboard */,
|
||||
@@ -246,7 +264,9 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3CEA73C919B1A86D00076FC5 /* main.m in Sources */,
|
||||
3068700719B2D6B1007E4A0E /* FESSCheduleEntry.m in Sources */,
|
||||
3CEA73CD19B1A86D00076FC5 /* FESAppDelegate.m in Sources */,
|
||||
3068700A19B2F826007E4A0E /* FESScheduleFilm.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
|
||||
<false/>
|
||||
<key>IDESourceControlProjectIdentifier</key>
|
||||
<string>BE618C35-7535-4EF3-9E1E-10020CDC9E0B</string>
|
||||
<key>IDESourceControlProjectName</key>
|
||||
<string>FestivalHelper</string>
|
||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||
<dict>
|
||||
<key>E5385474-9C99-4B80-A01D-35E39CA3F5A7</key>
|
||||
<string>ssh://github.com/senaduka/festivalhelper.git</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectPath</key>
|
||||
<string>FestivalHelper.xcodeproj/project.xcworkspace</string>
|
||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||
<dict>
|
||||
<key>E5385474-9C99-4B80-A01D-35E39CA3F5A7</key>
|
||||
<string>../..</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectURL</key>
|
||||
<string>ssh://github.com/senaduka/festivalhelper.git</string>
|
||||
<key>IDESourceControlProjectVersion</key>
|
||||
<integer>110</integer>
|
||||
<key>IDESourceControlProjectWCCIdentifier</key>
|
||||
<string>E5385474-9C99-4B80-A01D-35E39CA3F5A7</string>
|
||||
<key>IDESourceControlProjectWCConfigurations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
||||
<string>public.vcs.git</string>
|
||||
<key>IDESourceControlWCCIdentifierKey</key>
|
||||
<string>E5385474-9C99-4B80-A01D-35E39CA3F5A7</string>
|
||||
<key>IDESourceControlWCCName</key>
|
||||
<string>FestivalHelper</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0510"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "3CEA73B819B1A86C00076FC5"
|
||||
BuildableName = "FestivalHelper.app"
|
||||
BlueprintName = "FestivalHelper"
|
||||
ReferencedContainer = "container:FestivalHelper.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "3CEA73DC19B1A86D00076FC5"
|
||||
BuildableName = "FestivalHelperTests.xctest"
|
||||
BlueprintName = "FestivalHelperTests"
|
||||
ReferencedContainer = "container:FestivalHelper.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "3CEA73B819B1A86C00076FC5"
|
||||
BuildableName = "FestivalHelper.app"
|
||||
BlueprintName = "FestivalHelper"
|
||||
ReferencedContainer = "container:FestivalHelper.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "3CEA73B819B1A86C00076FC5"
|
||||
BuildableName = "FestivalHelper.app"
|
||||
BlueprintName = "FestivalHelper"
|
||||
ReferencedContainer = "container:FestivalHelper.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "3CEA73B819B1A86C00076FC5"
|
||||
BuildableName = "FestivalHelper.app"
|
||||
BlueprintName = "FestivalHelper"
|
||||
ReferencedContainer = "container:FestivalHelper.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>FestivalHelper.xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>3CEA73B819B1A86C00076FC5</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>3CEA73DC19B1A86D00076FC5</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
24
FestivalHelper/schedule/FESSCheduleEntry.h
Normal file
24
FestivalHelper/schedule/FESSCheduleEntry.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// FESSCheduleEntry.h
|
||||
// FestivalHelper
|
||||
//
|
||||
// Created by Hamo Hapic on 31/08/14.
|
||||
// Copyright (c) 2014 Senad Uka. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class FESScheduleFilm;
|
||||
|
||||
@interface FESSCheduleEntry : NSObject
|
||||
|
||||
-(id)initWithJSONData:(NSDictionary*)data;
|
||||
|
||||
@property (assign) NSInteger scheduleEntryId;
|
||||
@property (strong) NSString *scheduleDayOfWeek;
|
||||
@property (strong) NSString *scheduleDate;
|
||||
@property (strong) NSString *scheduleYear;
|
||||
@property (strong) NSMutableArray *scheduleFilms;
|
||||
|
||||
|
||||
@end
|
||||
43
FestivalHelper/schedule/FESSCheduleEntry.m
Normal file
43
FestivalHelper/schedule/FESSCheduleEntry.m
Normal file
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// FESSCheduleEntry.m
|
||||
// FestivalHelper
|
||||
//
|
||||
// Created by Hamo Hapic on 31/08/14.
|
||||
// Copyright (c) 2014 Senad Uka. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FESSCheduleEntry.h"
|
||||
#import "FESScheduleFilm.h"
|
||||
|
||||
@implementation FESSCheduleEntry
|
||||
|
||||
@synthesize scheduleEntryId;
|
||||
@synthesize scheduleDate;
|
||||
@synthesize scheduleDayOfWeek;
|
||||
@synthesize scheduleYear;
|
||||
@synthesize scheduleFilms;
|
||||
|
||||
|
||||
-(id)initWithJSONData:(NSDictionary*)data{
|
||||
self = [super init];
|
||||
if(self){
|
||||
//NSLog(@"initWithJSONData method called");
|
||||
self.scheduleEntryId = [[data objectForKey:@"id"] integerValue];
|
||||
self.scheduleDate = [data objectForKey:@"date"];
|
||||
self.scheduleDayOfWeek = [data objectForKey:@"dayOfWeek"];
|
||||
self.scheduleYear = [data objectForKey:@"year"];
|
||||
self.scheduleFilms = [self extractFilms:[data objectForKey:@"films"]];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(NSMutableArray *)extractFilms:(NSArray *)films {
|
||||
NSMutableArray *result = [[NSMutableArray alloc] initWithCapacity:[films count]];
|
||||
for (NSDictionary *filmData in films) {
|
||||
FESScheduleFilm *film = [[FESScheduleFilm alloc] initWithJSONData:filmData];
|
||||
[result addObject:film];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@end
|
||||
21
FestivalHelper/schedule/FESScheduleFilm.h
Normal file
21
FestivalHelper/schedule/FESScheduleFilm.h
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// FESScheduleFilm.h
|
||||
// FestivalHelper
|
||||
//
|
||||
// Created by Hamo Hapic on 31/08/14.
|
||||
// Copyright (c) 2014 Senad Uka. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface FESScheduleFilm : NSObject
|
||||
|
||||
@property (assign) NSInteger scheduleFilmId;
|
||||
@property (strong) NSString *scheduleFilmTitle;
|
||||
@property (strong) NSString *scheduleFilmVenue;
|
||||
@property (strong) NSString *scheduleFilmTime;
|
||||
@property (strong) NSString *scheduleFilmDuration;
|
||||
|
||||
-(id)initWithJSONData:(NSDictionary*)data;
|
||||
|
||||
@end
|
||||
32
FestivalHelper/schedule/FESScheduleFilm.m
Normal file
32
FestivalHelper/schedule/FESScheduleFilm.m
Normal file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// FESScheduleFilm.m
|
||||
// FestivalHelper
|
||||
//
|
||||
// Created by Hamo Hapic on 31/08/14.
|
||||
// Copyright (c) 2014 Senad Uka. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FESScheduleFilm.h"
|
||||
|
||||
@implementation FESScheduleFilm
|
||||
|
||||
@synthesize scheduleFilmId;
|
||||
@synthesize scheduleFilmDuration;
|
||||
@synthesize scheduleFilmTime;
|
||||
@synthesize scheduleFilmTitle;
|
||||
@synthesize scheduleFilmVenue;
|
||||
|
||||
-(id)initWithJSONData:(NSDictionary*)filmData{
|
||||
self = [super init];
|
||||
if(self){
|
||||
//NSLog(@"initWithJSONData method called");
|
||||
self.scheduleFilmId = [[filmData objectForKey:@"id"] integerValue];
|
||||
self.scheduleFilmTitle = [filmData objectForKey:@"title"];
|
||||
self.scheduleFilmVenue = [filmData objectForKey:@"venue"];
|
||||
self.scheduleFilmTime = [filmData objectForKey:@"time"];
|
||||
self.scheduleFilmDuration = [filmData objectForKey:@"duration"];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
18
tools/testbackend/sff2014/schedule.json
Normal file
18
tools/testbackend/sff2014/schedule.json
Normal file
@@ -0,0 +1,18 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"dayOfWeek": "Fri",
|
||||
"date": "15. Aug",
|
||||
"year": "2014",
|
||||
"films": [
|
||||
{
|
||||
"id": 1,
|
||||
"title": "Amores Perros",
|
||||
"venue": "Summer Theatre HT Eronet",
|
||||
"time": "20:30",
|
||||
"duration": "154'"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
10
tools/testbackend/simplewebserver.rb
Executable file
10
tools/testbackend/simplewebserver.rb
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env ruby
|
||||
require 'webrick'
|
||||
|
||||
include WEBrick
|
||||
|
||||
port = 8080
|
||||
puts "Starting server: http://#{Socket.gethostname}:#{port}"
|
||||
server = HTTPServer.new(:Port=>port,:DocumentRoot=>Dir::pwd )
|
||||
trap("INT"){ server.shutdown }
|
||||
server.start
|
||||
Reference in New Issue
Block a user