+api = require './qqapi'
+api.defaults_read()
 
 log = console.log
+jsons = JSON.stringify
 
 class QQBot
-    constructor: (@name) ->
+    constructor: (@name ,@auth) ->
         @buddy_info = {}
         @group_info = {}
         @groupmember_info = {}
+        
     
     # @format PROTOCOL `用户分组信息格式`
     save_buddy_info: (@buddy_info)->
     
     # @format PROTOCOL `群分组信息格式`
     save_group_info: (@group_info) ->
+        
+    # @format PROTOCOL `群用户信息`
+    save_group_member: (group,info)->
+        @groupmember_info[group.gid] = info
     
     # 获取用户信息
     # @return {nick,uin,flag,face}

            for key ,value of options
                return item[key] == value
        groups.pop()
        
    handle_poll_responce: (resp)->
        code = resp.retcode
        return if code != 0

        # TODO:加速查询
        users = @buddy_info.info.filter (item)-> item.uin == uin            
        users.pop()
    
    # 获取群用户信息
    get_user_ingroup: (uin, gid)->
        info = @groupmember_info[gid]
        users = info.minfo.filter (item)-> item.uin == uin
        users.pop()
        
        
    # 获取群信息，只支持群 ，支持多关键词搜索
    # @options {key:value} 
