Example #1
0
        public async Task <ModelBase> MakeCall(NotificationModel model)
        {
            var result = new ModelBase();

            var settingsResult = GetSettings();

            if (!settingsResult.IsValid)
            {
                return(settingsResult);
            }

            var settings = settingsResult.ProviderSettings;

            try
            {
                var address   = $"/trigger/{model.Action}/with/key/{settings.AuthToken}";
                var resultAPI = await iFTTTClient.MakeCall(address).ConfigureAwait(false);

                result.AddInfo(resultAPI);
            }
            catch (Exception ex)
            {
                result.AddError(ex.Message);
            }

            return(result);
        }