WebhooksApi:
  createWebhook: |-
    const AsanaPreview = require('asana-preview');
    
    let client = AsanaPreview.ApiClient.instance;
    let token = client.authentications['token'];
    token.accessToken = '<YOUR_ACCESS_TOKEN>';
    
    let webhooksApiInstance = new AsanaPreview.WebhooksApi();
    let body = {"data": {"<PARAM_1>": "<VALUE_1>", "<PARAM_2>": "<VALUE_2>",}}; // Object | The webhook workspace and target.
    let opts = { 
        'opt_fields': "active,created_at,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,resource,resource.name,target"
    };
    webhooksApiInstance.createWebhook(body, opts).then((result) => {
        console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
    }, (error) => {
        console.error(error.response.body);
    });
    
  deleteWebhook: |-
    const AsanaPreview = require('asana-preview');
    
    let client = AsanaPreview.ApiClient.instance;
    let token = client.authentications['token'];
    token.accessToken = '<YOUR_ACCESS_TOKEN>';
    
    let webhooksApiInstance = new AsanaPreview.WebhooksApi();
    let webhook_gid = "12345"; // String | Globally unique identifier for the webhook.

    webhooksApiInstance.deleteWebhook(webhook_gid).then((result) => {
        console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
    }, (error) => {
        console.error(error.response.body);
    });
    
  getWebhook: |-
    const AsanaPreview = require('asana-preview');
    
    let client = AsanaPreview.ApiClient.instance;
    let token = client.authentications['token'];
    token.accessToken = '<YOUR_ACCESS_TOKEN>';
    
    let webhooksApiInstance = new AsanaPreview.WebhooksApi();
    let webhook_gid = "12345"; // String | Globally unique identifier for the webhook.
    let opts = { 
        'opt_fields': "active,created_at,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,resource,resource.name,target"
    };
    webhooksApiInstance.getWebhook(webhook_gid, opts).then((result) => {
        console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
    }, (error) => {
        console.error(error.response.body);
    });
    
  getWebhooks: |-
    const AsanaPreview = require('asana-preview');
    
    let client = AsanaPreview.ApiClient.instance;
    let token = client.authentications['token'];
    token.accessToken = '<YOUR_ACCESS_TOKEN>';
    
    let webhooksApiInstance = new AsanaPreview.WebhooksApi();
    let workspace = "1331"; // String | The workspace to query for webhooks in.
    let opts = { 
        'limit': 50, 
        'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9", 
        'resource': "51648", 
        'opt_fields': "active,created_at,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,offset,path,resource,resource.name,target,uri"
    };
    webhooksApiInstance.getWebhooks(workspace, opts).then((result) => {
        console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
    }, (error) => {
        console.error(error.response.body);
    });
    
  updateWebhook: |-
    const AsanaPreview = require('asana-preview');
    
    let client = AsanaPreview.ApiClient.instance;
    let token = client.authentications['token'];
    token.accessToken = '<YOUR_ACCESS_TOKEN>';
    
    let webhooksApiInstance = new AsanaPreview.WebhooksApi();
    let body = {"data": {"<PARAM_1>": "<VALUE_1>", "<PARAM_2>": "<VALUE_2>",}}; // Object | The updated filters for the webhook.
    let webhook_gid = "12345"; // String | Globally unique identifier for the webhook.
    let opts = { 
        'opt_fields': "active,created_at,filters,filters.action,filters.fields,filters.resource_subtype,last_failure_at,last_failure_content,last_success_at,resource,resource.name,target"
    };
    webhooksApiInstance.updateWebhook(body, webhook_gid, opts).then((result) => {
        console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
    }, (error) => {
        console.error(error.response.body);
    });
    
