public static async Task <PostPlantingSummaryResponse> PostTelematicsNodePlantingSummaryExample(int nodeId, PostPlantingSummaryRequest postPlantingSummaryRequest) { TelematicsV2 telematicsV2 = new TelematicsV2(publicKey, privateKey, userKey); PostPlantingSummaryResponse response = await telematicsV2.PostTelematicsNodePlantingSummary(nodeId, postPlantingSummaryRequest); return(response); }
/// <summary> /// The POST TelematicsNodeV2/{telematicsNodeID}/PlantingSummary endpoint will /// allow the user to request a summary of their planting information based on a set of passed parameters. /// </summary> /// <param name="nodeId"></param> /// <param name="postPlantingSummaryRequest"></param> /// <returns></returns> public async Task <PostPlantingSummaryResponse> PostTelematicsNodePlantingSummary(int nodeId, PostPlantingSummaryRequest postPlantingSummaryRequest) { Dictionary <string, string> headers = ApiUtilities.BuildHeaders(UserKey, PublicKey, PrivateKey, $"telematicsnodev2/{nodeId}/plantingsummary", "POST"); string json = JsonConvert.SerializeObject(postPlantingSummaryRequest); HttpContent content = new StringContent(json, Encoding.UTF8, "application/json"); HttpResponseMessage response = await Api.Post($"telematicsnodev2/{nodeId}/plantingsummary", headers, content); PostPlantingSummaryResponse result = await Api.DeserializeContent <PostPlantingSummaryResponse>(response); return(result); }
public static async Task <PostPlantingSummaryResponse> PostTelematicsNodePlantingSummaryExample(int nodeId, PostPlantingSummaryRequest postPlantingSummaryRequest) { PostPlantingSummaryResponse response = await DataExchangeAPI.PostTelematicsNodePlantingSummary(nodeId, postPlantingSummaryRequest); return(response); }