#!/usr/bin/php 默认从配置文件TimRestApiConfig.json读取配置信息,其中: identifier 为APP管理员账户 private_pem_path 为独立模式下私钥本地路径,托管模式请填"" user_sig 为托管模式用户下载到的用户凭证,独立模式请填"" usage: php TimRestApiGear.php (server_name) (command) args... eg: php TimRestApiGear.php openim sendmsg (account_id) (receiver) (text_content) 单发消息 php TimRestApiGear.php openim sendmsg_pic (account_id) (receiver) (pic_path) 单发图片(图片不超过5M) php TimRestApiGear.php openim batchsendmsg (account_id1,account_id2,...) (text_content) 批量发消息(接收者id组以逗号分隔) php TimRestApiGear.php openim batchsendmsg_pic (account_id1,account_id2,...) (pic_path) 批量发图片(接收者id组以逗号分隔,图片不超过5M) php TimRestApiGear.php im_open_login_svc account_import (identifier) (nick) (face_url) 独立模式同步帐号 php TimRestApiGear.php registration_service register_account (identifier) (identifierType) (password) 托管模式存量帐号导入 php TimRestApiGear.php profile portrait_get (account_id) 获取用户资料 php TimRestApiGear.php profile portrait_set (account_id) (new_name) 修改用户名称 php TimRestApiGear.php sns friend_import (account_id) (receiver) 建立好友关系 php TimRestApiGear.php sns friend_delete (account_id) (frd_id) 双向解除好友关系 php TimRestApiGear.php sns friend_delete_all (account_id) 解除用户所有好友关系 php TimRestApiGear.php sns friend_check (account_id) (to_account) 验证好友关系(默认双向验证) php TimRestApiGear.php sns friend_get_all (account_id) 获取用户所有好友 php TimRestApiGear.php sns friend_get_list (account_id) (frd_id) 获取用户指定好友 php TimRestApiGear.php group_open_http_svc get_appid_group_list 获取APP中所有群组信息(默认获取50个) php TimRestApiGear.php group_open_http_svc create_group (group_type) (group_name) (owner_id) 创建群组(max_member_num默认为500) php TimRestApiGear.php group_open_http_svc change_group_owner (group_id) (new_owner) 转让群组 Public类型群组验证方式默认为需要验证,Private类型默认为禁止申请,ChatRoom类型默认为自由加入) php TimRestApiGear.php group_open_http_svc get_group_info (group_id) 获取指定群组信息 php TimRestApiGear.php group_open_http_svc get_group_member_info (group_id) (limit) (offset) 获取群组成员信息 php TimRestApiGear.php group_open_http_svc modify_group_base_info (group_id) (group_name) 修改群组名称 php TimRestApiGear.php group_open_http_svc add_group_member (group_id) (member_id) (silence) 添加群组成员 php TimRestApiGear.php group_open_http_svc delete_group_member (group_id) (member_id) (silence) 删除群组成员 php TimRestApiGear.php group_open_http_svc modify_group_member_info (group_id) (account_id) (role) 修改群组某成员身份 php TimRestApiGear.php group_open_http_svc destroy_group (group_id) 解散群组 php TimRestApiGear.php group_open_http_svc get_joined_group_list (account_id) 获取用户所加入的所有群组 php TimRestApiGear.php group_open_http_svc get_role_in_group (group_id) (member_id) 获取用户在群组中身份 php TimRestApiGear.php group_open_http_svc forbid_send_msg (group_id) (member_id) (second) 在群组中禁言用户 php TimRestApiGear.php group_open_http_svc send_group_msg (account_id) (group_id) (text_content) 群组中发送普通消息 php TimRestApiGear.php group_open_http_svc send_group_msg_pic (account_id) (group_id) (pic_path) 群组中发送图片(图片不超过5M) php TimRestApiGear.php group_open_http_svc send_group_system_notification (group_id) (text_content) (receive_id) 群组中发送系统消息 php TimRestApiGear.php group_open_http_svc import_group_member (group_id) (member_id) (role) 导入群组成员(Role不填为Member,唯一可填值为Admin) php TimRestApiGear.php group_open_http_svc import_group_msg (group_id) (from_account) (text) 导入群消息 php TimRestApiGear.php group_open_http_svc set_unread_msg_num (group_id) (member_account) (unread_msg_num) 设置成员未读计数