Skip to content

Instantly share code, notes, and snippets.

View gmarcial's full-sized avatar
🐉

Guilherme Marcial gmarcial

🐉
View GitHub Profile
//Criação de um evento.
{
"Nome":"Evento XPTO",
"Descrição":"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
"Periodo":{
"DataInicial":"10/03/2020 10:00:00",
"DataFinal":"10/04/2020 15:00:00"
},
"AtracoesIds":[
1,
{
"CollectedDate":"01-28-2019 14:30:00", //date time
"StationId":50, //int
"DataGroup":[
{
"Value":0.5, //decimal
"Name":"Pluviometria", //string
"MeasureType":"mm" //string
},
{
//EndPoint: /api/values
//Verbo Http: Post
//O header Content-Type deve ser application/json
//Servidor precisa receber assim.
{ "DataHora": "5/16/2018 5:04:20 PM", "Precipitacao": "15.5" }
//Você como desenvolvedor deve montar e enviar o payload assim.
//Onde esta {NomeAqui}, substitua pela variavel, sem as chaves, dentro dos parentes.
string payloadJson = "{ \"DataHora\": " + "\"" + DataHora + "\"" + ", \"Precipitacao\": " + "\"" + Precipitacao + "\" }";