Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

parsing weblinks

  • Loading branch information...
commit 38e26ed25d2a363e0beaf69d7018c4147a4dca44 1 parent 6bb1005
@robertwijas robertwijas authored
View
6 Classes/SDKFiles/Private Files/Models/Builders/BoxFolderXMLBuilder.m
@@ -16,6 +16,7 @@
//
#import "BoxFolderXMLBuilder.h"
+#import "BoxWebLink.h"
@implementation BoxFolderXMLBuilder
@@ -184,9 +185,12 @@ - (void)parser:(NSXMLParser *)parser
}
} else if ([elementName isEqualToString: @"status"] && !inCollaborationTag) {
contentHolder = [NSMutableString string ];
- } else if ([elementName isEqualToString: @"file"]){
+ } else if ([elementName isEqualToString: @"file"]) {
BoxFile *info = [[[BoxFile alloc] initWithDictionary:attributeDict] autorelease];
[curModel.objectsInFolder addObject:info];
+ } else if ([elementName isEqualToString: @"web_link"]) {
+ BoxWebLink *info = [[[BoxWebLink alloc] initWithDictionary:attributeDict] autorelease];
+ [curModel.objectsInFolder addObject:info];
} else if ([elementName isEqualToString: @"folder"]){
if(inOuterFolderTag == YES) {
inInnerFolderTag = YES;
View
13 Classes/SDKFiles/Public Models/BoxWebLink.h
@@ -0,0 +1,13 @@
+//
+// Created by Robert Wijas on 8/6/12.
+//
+
+
+#import <Foundation/Foundation.h>
+#import "BoxFile.h"
+
+@interface BoxWebLink : BoxFile
+
+@property (nonatomic, readwrite, retain) NSString *url;
+
+@end
View
30 Classes/SDKFiles/Public Models/BoxWebLink.m
@@ -0,0 +1,30 @@
+//
+// Created by Robert Wijas on 8/6/12.
+//
+
+
+#import "BoxWebLink.h"
+
+
+@implementation BoxWebLink {
+
+}
+
+
+
+@synthesize url = _url;
+
+- (void)setValuesWithDictionary:(NSDictionary *)values {
+ [super setValuesWithDictionary:values];
+ if ([values objectForKey:@"url"]) {
+ self.url = [values objectForKey:@"url"];
+ }
+}
+
+
+- (void)dealloc {
+ [_url release];
+ [super dealloc];
+}
+
+@end
Please sign in to comment.
Something went wrong with that request. Please try again.