TuyaSmartHomeDeviceShare Class Reference

Inherits from NSObject
Declared in TuyaSmartHomeDeviceShare.h

Overview

Sharing device related functions (based on device dimension sharing) 共享设备相关功能 (基于家庭的设备维度的共享)

– addShareWithHomeId:countryCode:userAccount:devIds:success:failure:

Add Shares 添加共享

- (void)addShareWithHomeId:(long long)homeId countryCode:(NSString *)countryCode userAccount:(NSString *)userAccount devIds:(NSArray<NSString*> *)devIds success:(void ( ^ ) ( TuyaSmartShareMemberModel *model ))success failure:(TYFailureError)failure

Parameters

homeId

homeId

countryCode

countryCode

userAccount

userAccount

devIds

devId list

success

Success block

failure

Failure block

Discussion

Add Shares 添加共享

Declared In

TuyaSmartHomeDeviceShare.h

– addShareWithMemberId:devIds:success:failure:

Add Shares (new, not overwriting old Shares) 添加共享 (新增,不覆盖旧的分享)

- (void)addShareWithMemberId:(NSInteger)memberId devIds:(NSArray<NSString*> *)devIds success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

memberId

memberId

devIds

devId list

success

Success block

failure

Failure block

Discussion

Add Shares (new, not overwriting old Shares) 添加共享 (新增,不覆盖旧的分享)

Declared In

TuyaSmartHomeDeviceShare.h

– getShareMemberListWithHomeId:success:failure:

Get a list of all active shared users in the home 获取家庭下所有主动共享的用户列表

- (void)getShareMemberListWithHomeId:(long long)homeId success:(void ( ^ ) ( NSArray<TuyaSmartShareMemberModel*> *list ))success failure:(TYFailureError)failure

Parameters

homeId

homeId

success

Success block

failure

Failure block

Discussion

Get a list of all active shared users in the home 获取家庭下所有主动共享的用户列表

Declared In

TuyaSmartHomeDeviceShare.h

– getReceiveMemberListWithSuccess:failure:

Get a list of all shared users received 获取所有收到共享的用户列表

- (void)getReceiveMemberListWithSuccess:(void ( ^ ) ( NSArray<TuyaSmartShareMemberModel*> *list ))success failure:(TYFailureError)failure

Parameters

success

Success block

failure

Failure block

Discussion

Get a list of all shared users received 获取所有收到共享的用户列表

Declared In

TuyaSmartHomeDeviceShare.h

– getShareMemberDetailWithMemberId:success:failure:

Obtaining shared data that is actively shared by user 获取单个 主动共享 的用户共享数据

- (void)getShareMemberDetailWithMemberId:(NSInteger)memberId success:(void ( ^ ) ( TuyaSmartShareMemberDetailModel *model ))success failure:(TYFailureError)failure

Parameters

memberId

memberId

success

Success block

failure

Failure block

Discussion

Obtaining shared data that is actively shared by user 获取单个 主动共享 的用户共享数据

Declared In

TuyaSmartHomeDeviceShare.h

– getReceiveMemberDetailWithMemberId:success:failure:

Getting shared data from a Sharer 获取单个 收到共享 的用户共享数据

- (void)getReceiveMemberDetailWithMemberId:(NSInteger)memberId success:(void ( ^ ) ( TuyaSmartReceiveMemberDetailModel *model ))success failure:(TYFailureError)failure

Parameters

memberId

memberId

success

Success block

failure

Failure block

Discussion

Getting shared data from a Sharer 获取单个 收到共享 的用户共享数据

Declared In

TuyaSmartHomeDeviceShare.h

– removeShareMemberWithMemberId:success:failure:

Remove active Sharers 删除主动共享者

- (void)removeShareMemberWithMemberId:(NSInteger)memberId success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

memberId

memberId

success

Success block

failure

Failure block

Discussion

Remove active Sharers 删除主动共享者

Declared In

TuyaSmartHomeDeviceShare.h

– removeReceiveShareMemberWithMemberId:success:failure:

Remove Received Sharer 删除收到共享者

- (void)removeReceiveShareMemberWithMemberId:(NSInteger)memberId success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

memberId

共享成员ID

success

Success block

failure

Failure block

Discussion

Remove Received Sharer 删除收到共享者

Declared In

TuyaSmartHomeDeviceShare.h

– renameShareMemberNameWithMemberId:name:success:failure:

Modify the nickname of an active shared user 修改某个主动共享用户的昵称

- (void)renameShareMemberNameWithMemberId:(NSInteger)memberId name:(NSString *)name success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

memberId

memberId

name

nickname

success

Success block

failure

Failure block

Discussion

Modify the nickname of an active shared user 修改某个主动共享用户的昵称

Declared In

TuyaSmartHomeDeviceShare.h

– renameReceiveShareMemberNameWithMemberId:name:success:failure:

Modify the nickname of the Received sharer 修改收到共享者的昵称

- (void)renameReceiveShareMemberNameWithMemberId:(NSInteger)memberId name:(NSString *)name success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

memberId

memberId

name

nickname

success

Success block

failure

Failure block

Discussion

Modify the nickname of the Received sharer 修改收到共享者的昵称

Declared In

TuyaSmartHomeDeviceShare.h

– addDeviceShareWithHomeId:countryCode:userAccount:devId:success:failure:

Device Add Sharing 单设备添加共享

- (void)addDeviceShareWithHomeId:(long long)homeId countryCode:(NSString *)countryCode userAccount:(NSString *)userAccount devId:(NSString *)devId success:(void ( ^ ) ( TuyaSmartShareMemberModel *model ))success failure:(TYFailureError)failure

Parameters

homeId

homeId

countryCode

countryCode

userAccount

userAccount

devId

devId

success

Success block

failure

Failure block

Discussion

Device Add Sharing 单设备添加共享

Declared In

TuyaSmartHomeDeviceShare.h

– removeReceiveDeviceShareWithDevId:success:failure:

Remove Received Shared 删除收到的共享设备

- (void)removeReceiveDeviceShareWithDevId:(NSString *)devId success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

devId

DevId

success

Success block

failure

Failure block

Discussion

Remove Received Shared 删除收到的共享设备

Declared In

TuyaSmartHomeDeviceShare.h

– removeDeviceShareWithMemberId:devId:success:failure:

remove shares to members 删除分享出去的设备

- (void)removeDeviceShareWithMemberId:(NSInteger)memberId devId:(NSString *)devId success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

memberId

member Id

devId

devdId

success

Success block

failure

Failure block

Discussion

remove shares to members 删除分享出去的设备

Declared In

TuyaSmartHomeDeviceShare.h

– getDeviceShareMemberListWithDevId:success:failure:

获取设备共享用户列表

- (void)getDeviceShareMemberListWithDevId:(NSString *)devId success:(void ( ^ ) ( NSArray<TuyaSmartShareMemberModel*> *list ))success failure:(TYFailureError)failure

Parameters

devId

设备号

success

Success block

failure

Failure block

Discussion

获取设备共享用户列表

Declared In

TuyaSmartHomeDeviceShare.h

– getShareInfoWithDevId:success:failure:

Get Device Sharing from 获取设备分享来自哪里

- (void)getShareInfoWithDevId:(NSString *)devId success:(void ( ^ ) ( TuyaSmartReceivedShareUserModel *model ))success failure:(TYFailureError)failure

Parameters

devId

devId

success

Success block

failure

Failure block

Discussion

Get Device Sharing from 获取设备分享来自哪里

Declared In

TuyaSmartHomeDeviceShare.h

– inviteShareWithCountryCode:userAccount:devId:success:failure:

Invite to share with other users 邀请分享给其他用户

- (void)inviteShareWithCountryCode:(NSString *)countryCode userAccount:(NSString *)userAccount devId:(NSString *)devId success:(TYSuccessInt)success failure:(TYFailureError)failure

Parameters

countryCode

countryCode

userAccount

userAccount

devId

devId

success

Success block

failure

Failure block

Discussion

Invite to share with other users 邀请分享给其他用户

Declared In

TuyaSmartHomeDeviceShare.h

– confirmInviteShareWithShareId:success:failure:

Confirm invite share 确认分享接口

- (void)confirmInviteShareWithShareId:(NSInteger)shareId success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

shareId

邀请分享接口返回的shareId

success

Success block

failure

Failure block

Discussion

Confirm invite share 确认分享接口

Declared In

TuyaSmartHomeDeviceShare.h

– getGroupShareMemberListWithGroupId:success:failure:

Get a list of shared users for group (reflected in the panel) 获取单个群组共享用户列表(面板中体现)

- (void)getGroupShareMemberListWithGroupId:(NSString *)groupId success:(void ( ^ ) ( NSArray<TuyaSmartShareMemberModel*> *list ))success failure:(TYFailureError)failure

Parameters

groupId

groupId

success

Success block

failure

Failure block

Discussion

Get a list of shared users for group (reflected in the panel) 获取单个群组共享用户列表(面板中体现)

Declared In

TuyaSmartHomeDeviceShare.h

– addGroupShareToMemberWithHomeId:countyCode:userAccount:groupId:success:failure:

Sharing Groups to Other Users 分享群组给其他用户

- (void)addGroupShareToMemberWithHomeId:(long long)homeId countyCode:(NSString *)countryCode userAccount:(NSString *)userAccount groupId:(NSString *)groupId success:(TYSuccessID)success failure:(TYFailureError)failure

Parameters

homeId

HomeId

countryCode

Country Code

userAccount

User Account

groupId

GroupId

success

Success block

failure

Failure block

Discussion

Sharing Groups to Other Users 分享群组给其他用户

Declared In

TuyaSmartHomeDeviceShare.h

– getShareGroupFromInfoWithGroupId:success:failure:

Get group share information 获取群组的分享信息

- (void)getShareGroupFromInfoWithGroupId:(NSString *)groupId success:(TYSuccessID)success failure:(TYFailureError)failure

Parameters

groupId

groupId

success

Success block

failure

Failure block

Discussion

Get group share information 获取群组的分享信息

Declared In

TuyaSmartHomeDeviceShare.h

– removeShareGroupWithGroupId:success:failure:

Group Remove Sharing 移除分享群组

- (void)removeShareGroupWithGroupId:(NSString *)groupId success:(TYSuccessID)success failure:(TYFailureError)failure

Parameters

groupId

群组号

success

Success block

failure

Failure block

Discussion

Group Remove Sharing 移除分享群组

Declared In

TuyaSmartHomeDeviceShare.h

– removeGroupShareWithRelationId:groupId:success:failure:

Remove group sharing of other members 移除其他成员的群组分享

- (void)removeGroupShareWithRelationId:(NSInteger)relationId groupId:(NSString *)groupId success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

relationId

relationId

groupId

groupId

success

Success block

failure

Failure block

Discussion

Remove group sharing of other members 移除其他成员的群组分享

Declared In

TuyaSmartHomeDeviceShare.h