-
-
Notifications
You must be signed in to change notification settings - Fork 312
Webhooks
Joshua Harms edited this page Dec 20, 2023
·
1 revision
var service = new WebhookService(myShopifyUrl, shopAccessToken);
Webhook hook = new Webhook()
{
Address = "https://my.webhook.url.com/path",
CreatedAt = DateTime.Now,
Fields = new List<string>() { "field1", "field2" },
Format = "json",
MetafieldNamespaces = new List<string>() { "metafield1", "metafield2" },
Topic = "app/uninstalled",
};
hook = await service.CreateAsync(hook);
var service = new WebhookService(myShopifyUrl, shopAccessToken);
var webhook = await service.GetAsync(webhookId);
var service = new WebhookService(myShopifyUrl, shopAccessToken);
var webhook = await service.UpdateAsync(webhookId, new Webhook()
{
Address = "https://my.webhook.url.com/new/path
});
var service = new WebhookService(myShopifyUrl, shopAccessToken);
await service.DeleteAsync(webhookId);
var service = new WebhookService(myShopifyUrl, shopAccessToken);
int webhookCount = await service.CountAsync();
var service = new WebhookService(myShopifyUrl, shopAccessToken);
IEnumerable<Webhook> webhooks = await service.ListAsync();