You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
session-ios/Signal/src/textsecure/Network/API/Requests/TSAttachementRequest.m

29 lines
697 B
Objective-C

//
// TSRequestAttachment.m
// TextSecureiOS
//
// Created by Christine Corbett Moran on 12/1/13.
// Copyright (c) 2013 Open Whisper Systems. All rights reserved.
//
#import "TSAttachementRequest.h"
#import "TSConstants.h"
@implementation TSAttachementRequest
-(TSRequest*) initWithId:(NSNumber*) attachmentId relay:(NSString*)relay {
NSString *path = [NSString stringWithFormat:@"%@/%@", textSecureAttachmentsAPI, attachmentId];
if (relay && ![relay isEqualToString:@""]) {
path = [path stringByAppendingFormat:@"?relay=%@", relay];
}
self = [super initWithURL:[NSURL URLWithString:path]];
self.HTTPMethod = @"GET";
return self;
}
@end