public VkCoreApiBase Get(long groupId) { if (_vkApi.ContainsKey(groupId)) { return(_vkApi[groupId]); } var api = new VkCoreApiBase(Core, groupId); var accesToken = Core.Configuration.GetValue <string>($"Config:Groups:{groupId}:AccessToken", null); if (accesToken == null) { return(this); } api.Authorize(new ApiAuthParams { AccessToken = accesToken }); _vkApi.Add(groupId, api); return(api); }
public MessageHandler(VkCoreApiBase vkApi) { VkApi = vkApi; }
public Chat(VkCoreApiBase vkApi, long peerId) { VkApi = vkApi; PeerId = peerId; }
public LogChat(VkCoreApiBase vkApi) : base(vkApi, vkApi.Core.Configuration.GetValue <long>("Config:Log:ChatId", -1)) { MinValue = Enum.Parse <LogValueType>(VkApi.Core.Configuration["Config:Log:MinValue"]); MaxValue = Enum.Parse <LogValueType>(VkApi.Core.Configuration["Config:Log:MaxValue"]); }