//
//  MyInformationHttpGetCmd.m
//  MobilePortal
//
//  Created by xiejiangbo on 2019/3/15.
//  Copyright © 2019 yin chen. All rights reserved.
//

#import "MyInformationHttpGetCmd.h"
#import "MyInformationHttpGetResult.h"

static NSString *kActionUrl = @"/user/getCurrentUserInfo/";
@implementation MyInformationHttpGetCmd
-(instancetype)initWithVersion:(NSString *)version{
    if ([version isEqualToString:PHttpVersion_v1]) {
        return [[MyInformationHttpGetCmd alloc]initWithAuthorizationState:AuthorizationNull];
    }else{
        NSAssert(NO, @"Invalid version");
    }
    return nil;
}

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

- (NSString *)getActionUrl{
    
    return  [NSString stringWithFormat:@"%@%@",kActionUrl,requestInfo_[kHttpMyInformationHttpGetCmd_userid]];
}
@end
NSString *const kHttpMyInformationHttpGetCmd_userid = @"userid";
NSString *const kHttpMyInformationHttpGetCmd_name = @"name";
NSString *const kHttpMyInformationHttpGetCmd_attr = @"attr";

