//
//  ApplicationByBelongHttpGetCmd.m
//  MobilePortal
//
//  Created by caiyang on 2022/6/7.
//  Copyright © 2022 yin chen. All rights reserved.
//

#import "ApplicationByBelongHttpGetCmd.h"
#import "ApplicationByBelongHttpResult.h"

static NSString *kActionUrl1 = @"/newapp/portal/getApplicationByBelong/";

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

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

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