//
//  NSMutableDictionary+GMShareSDK.m
//  Gengmei
//
//  Created by licong on 2017/8/18.
//  Copyright © 2017年 更美互动信息科技有限公司. All rights reserved.
//

#import "NSMutableDictionary+GMShareSDK.h"
#import <WechatOpenSDK/WXApiObject.h>

@implementation NSMutableDictionary (GMShareSDK)

- (void)shareSetupShareParamsByText:(NSString *)text
                            images:(id)images
                               url:(NSURL *)url
                             title:(NSString *)title
                              type:(GMShareContentType)type{
    self[@"text"] = text;
    self[@"images"] = images;
    self[@"url"] = url;
    self[@"title"] = title;
    self[@"type"] = @(type);
}

- (void)shareSetupShareParamsByText:(NSString *)text
                             images:(id)images
                                url:(NSURL *)url
                              title:(NSString *)title
                           videoUrl:(NSURL *)videoUrl
                               type:(GMShareContentType)type {
    self[@"text"] = text;
    self[@"images"] = images;
    self[@"url"] = url;
    self[@"title"] = title;
    self[@"type"] = @(type);
    self[@"videoUrl"] = videoUrl;
}

- (void)shareSetupMiniProgramShareParamsByUrl:(NSString *)url
                                     userName:(NSString *)userName
                                         path:(NSString *)path
                                        title:(NSString *)title
                                  description:(NSString *)description
                                   thumbImage:(id)thumbImage
                                  hdImageData:(id)hdImageData{
    self[@"url"] = url;
    self[@"userName"] = userName;
    self[@"path"] = path;
    self[@"title"] = title;
    self[@"description"] = description;
    self[@"thumbImage"] = thumbImage;
    self[@"hdImageData"] = hdImageData;
    self[@"type"] = @(GMShareContentTypeMiniProgram);
}


@end
