//
//  DetailsHttpGetCmd.m
//  MobilePortal
//
//  Created by caiyang on 2020/4/8.
//  Copyright © 2020 yin chen. All rights reserved.
//

#import "DetailsHttpGetCmd.h"
#import "DetailsHttpGetResult.h"

static NSString *kActionUrl1 = @"/enterprise/activity/get/";

@implementation DetailsHttpGetCmd
-(instancetype)initWithVersion:(NSString *)version{
    if ([version isEqualToString:PHttpVersion_v1]) {
        return [[DetailsHttpGetCmd alloc]initWithAuthorizationState:AuthorizationNull];
    }else{
        NSAssert(NO, @"Invalid version");
    }
    return nil;
}

- (instancetype)initWithAuthorizationState:(AuthorizationState)state{
    self = [super initWithAuthorizationState:state];
    if (self != nil) {
        self.result = [[DetailsHttpGetResult alloc]init];
    }
    return self;
}

- (NSString *)getActionUrl{
    return [NSString stringWithFormat:@"%@%@",kActionUrl1,self.requestInfo[kHttpDetailsHttpGetCmd_id]];
//    return kActionUrl1;
}
@end
NSString * _Nonnull const kHttpDetailsHttpGetCmd_id = @"id";
