public static async Task <Webhook> CreateApplicationWebhook(this TheThingsStackIntegrationClient thingsStackIntegrationClient, string applicationId, SetWebhookCriteria setWebhookCriteria) { var fieldMasks = new[] { "base_url", "downlink_ack", "downlink_api_key", "downlink_failed", "downlink_nack", "downlink_queue_invalidated", "downlink_queued", "downlink_sent", "format", "headers", "ids", "ids.application_ids", "ids.application_ids.application_id", "ids.webhook_id", "join_accept", "location_solved", "service_data", "uplink_message", "uplink_message.path" }; var data = new SetWebhookRequestCriteria(setWebhookCriteria: setWebhookCriteria, fieldMask: new FieldMaskCriteria(fieldMasks)); return(await thingsStackIntegrationClient.PostAsync <Webhook>(resourceUrl : $"{resourceUrl}/{applicationId}", data : data)); }
public static async Task <Devices> GetApplicationDevices(this TheThingsStackIntegrationClient thingsStackIntegrationClient, string applicationId) { return(await thingsStackIntegrationClient.GetAsync <Devices>(resourceUrl : $"{resourceUrl}/{applicationId}/devices", queryString : "field_mask=name,description")); }
/// <summary> /// List the applications /// </summary> public static async Task <Applications> GetApplications(this TheThingsStackIntegrationClient thingsStackIntegrationClient) { return(await thingsStackIntegrationClient.GetAsync <Applications>(resourceUrl : resourceUrl, queryString : "field_mask=name,description")); }
/// <summary> /// List the api keys on this application. /// </summary> public static async Task <ApiKeys> GetApplicationApiKeys(this TheThingsStackIntegrationClient thingsStackIntegrationClient, string applicationId) { return(await thingsStackIntegrationClient.GetAsync <ApiKeys>(resourceUrl : $"{resourceUrl}/{applicationId}/api-keys", queryString : null)); }
/// <summary> /// List the rights the caller has on this application. /// </summary> public static async Task <Right> GetApplicationRights(this TheThingsStackIntegrationClient thingsStackIntegrationClient, string applicationId) { return(await thingsStackIntegrationClient.GetAsync <Right>(resourceUrl : $"{resourceUrl}/{applicationId}/rights", queryString : null)); }
public static async Task <bool> DeleteApplicationWebhook(this TheThingsStackIntegrationClient thingsStackIntegrationClient, string webhookId, string applicationId) { return(await thingsStackIntegrationClient.DeleteAsync(resourceUrl : $"{resourceUrl}/{applicationId}/{webhookId}")); }
public static async Task <Webhook> GetApplicationWebhook(this TheThingsStackIntegrationClient thingsStackIntegrationClient, string webhookId, string applicationId) { var queryString = "field_mask=headers,downlink_api_key,uplink_message,join_accept,downlink_ack,downlink_nack,downlink_sent,downlink_failed,downlink_queued,downlink_queue_invalidated,location_solved,service_data"; return(await thingsStackIntegrationClient.GetAsync <Webhook>(resourceUrl : $"{resourceUrl}/{applicationId}/{webhookId}", queryString : queryString)); }
/// <summary> /// List the applications on this organization. /// </summary> public static async Task <Applications> GetOrganizationApplications(this TheThingsStackIntegrationClient thingsStackIntegrationClient, string organizationId) { return(await thingsStackIntegrationClient.GetAsync <Applications>(resourceUrl : $"{resourceUrl}/{organizationId}/applications", queryString : "field_mask=name,description")); }