//
//  NSMutableDictionary+GMShareSDK.m
//  Gengmei
//
//  Created by licong on 2017/8/18.
//  Copyright © 2017年 更美互动信息科技有限公司. All rights reserved.
//
#import "GMShareConstant.h"
#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[ShareText] = text;
    self[ShareImage] = images;
    self[ShareUrl] = url;
    self[ShareTitle] = title;
    self[ShareContentType] = @(type);
}

- (void)shareSetupShareParamsByText:(NSString *)text
                             images:(id)images
                                url:(NSURL *)url
                              title:(NSString *)title
                           videoUrl:(NSURL *)videoUrl
                               type:(GMShareContentType)type {
    self[ShareText] = text;
    self[ShareImage] = images;
    self[ShareUrl] = url;
    self[ShareTitle] = title;
    self[ShareContentType] = @(type);
    self[ShareVideoUrl] = videoUrl;
}

- (void)shareSetupMiniProgramShareParamsByUrl:(NSString *)url
                                     userName:(NSString *)userName
                                         path:(NSString *)path
                                        title:(NSString *)title
                                  description:(NSString *)description
                                   thumbImage:(id)thumbImage
                                  hdImageData:(id)hdImageData{
    self[ShareUrl] = url;
    self[ShareUserName] = userName;
    self[SharePath] = path;
    self[ShareTitle] = title;
    self[ShareDescription] = description;
    self[ShareThumbImage] = thumbImage;
    self[ShareHdImageData] = hdImageData;
    self[ShareContentType] = @(GMShareContentTypeMiniProgram);
}


@end
