コード例 #1
0
 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"));
 }
コード例 #2
0
 /// <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"));
 }
コード例 #3
0
 /// <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));
 }
コード例 #4
0
 /// <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));
 }
コード例 #5
0
        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));
        }
コード例 #6
0
 /// <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"));
 }