コード例 #1
0
        public async Task <string> Allhooks()
        {
            var service  = new WebhookService(shopifyurl, token);
            var webhooks = await service.ListAsync();

            return("");
        }
コード例 #2
0
        public async Task <string> CreateUninstallHook(string shopifyurl, string token)
        {
            var service  = new WebhookService(shopifyurl, token);
            var webhooks = await service.ListAsync();

            if (webhooks.Items?.FirstOrDefault() != null)
            {
                foreach (var item in webhooks.Items)
                {
                    long itemid = Convert.ToInt64(item.Id);
                    await service.DeleteAsync(itemid);
                }
            }
            return("");
        }