Exemple #1
0
 // Refresh intents data
 private static void RefreshIntentsData(WitConfiguration configuration, Action <string> onRefreshComplete)
 {
     PerformConfigRequest(configuration, configuration.ListIntentsRequest(), ApplyIntentList, (error) =>
     {
         if (!string.IsNullOrEmpty(error))
         {
             RefreshDataComplete(configuration, error, onRefreshComplete);
         }
         else
         {
             RefreshEntitiesData(configuration, onRefreshComplete);
         }
     });
 }
Exemple #2
0
        private static void DoUpdateData(WitConfiguration configuration, Action onUpdateComplete)
        {
            EditorForegroundRunner.Run(() =>
            {
                if (!string.IsNullOrEmpty(
                        WitAuthUtility.GetAppServerToken(configuration.application.id)))
                {
                    var intentsRequest        = configuration.ListIntentsRequest();
                    intentsRequest.onResponse =
                        (r) => ListEntities(r, configuration, onUpdateComplete);

                    configuration.application?.UpdateData(intentsRequest.Request);
                }
            });
        }