public SearchProjectClient(string intercomApiAuthKey, KontentFunctionsSettings kontentSettings, AlgoliaSettings algoliaSettings) { intercom = new IntercomFunctions(intercomApiAuthKey); kontent = new KontentFunctions(kontentSettings); algolia = new AlgoliaFunctions(algoliaSettings); processedItems = new Dictionary <string, bool>(); emptyProject = kontentSettings.CleanProject; bannedConversations = kontentSettings.BannedConversations.Split(','); searchConversations = new Dictionary <string, SearchConversation>() { }; searchUsers = new Dictionary <string, SearchUser>() { }; }
public KontentFunctions(KontentFunctionsSettings settings) { options = new ContentManagementOptions { ProjectId = settings.ProjectId, ApiKey = settings.CMApiKey }; managementClient = new ContentManagementClient(options); cleanProject = settings.CleanProject; userItemVariants = new Dictionary <string, ContentItemVariantModel <UserModel> > { }; conversationTypeGuid = Guid.Parse(settings.ConversationTypeGuid); userTypeGuid = Guid.Parse(settings.UserTypeGuid); bannedConversations = settings.BannedConversations.Split(','); if (!EnsureProject().Result) { throw new Exception(""); } }