GET api/v1/weatherforecast/basic/{id}

Buscar previsão do tempo de uma cidade com Autenticação Basic

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

integer

Required

Requires Authorization!

Roles:

Body Parameters

None.

Response Information

Resource Description

ResultOfWeatherForecastDto
NameDescriptionTypeAdditional information
Data

WeatherForecastDto

None.

Errors

Collection of string

None.

Response Formats

application/json, text/json

Sample:
{
  "Data": {
    "DataSource": "Desconhecido",
    "Source": "sample string 1",
    "Date": "2025-04-29T11:45:57.9995793-03:00",
    "Days": [
      {
        "Date": "2025-04-29T11:45:57.9995793-03:00",
        "Humity": [
          {
            "DayPeriod": "Day"
          },
          {
            "DayPeriod": "Day"
          }
        ],
        "Temperature": [
          {
            "DayPeriod": "Day"
          },
          {
            "DayPeriod": "Day"
          }
        ],
        "RainProbability": 1,
        "RainPrecipitation": 1,
        "FrostProbability": 1,
        "Uv": 1,
        "Icons": [
          {
            "DayPeriod": "Day",
            "IconType": "sample string 1"
          },
          {
            "DayPeriod": "Day",
            "IconType": "sample string 1"
          }
        ],
        "Texts": [
          {
            "DayPeriod": "Day",
            "Text": "sample string 1"
          },
          {
            "DayPeriod": "Day",
            "Text": "sample string 1"
          }
        ],
        "Wind": [
          {
            "VelocityMin": 1,
            "DayPeriod": "Day",
            "VelocityMax": 1,
            "VelocityAvg": 1,
            "GustMax": 1,
            "DirectionDegrees": 1,
            "Direction": "sample string 1"
          },
          {
            "VelocityMin": 1,
            "DayPeriod": "Day",
            "VelocityMax": 1,
            "VelocityAvg": 1,
            "GustMax": 1,
            "DirectionDegrees": 1,
            "Direction": "sample string 1"
          }
        ],
        "SunRise": "sample string 2",
        "SunSet": "sample string 3"
      },
      {
        "Date": "2025-04-29T11:45:57.9995793-03:00",
        "Humity": [
          {
            "DayPeriod": "Day"
          },
          {
            "DayPeriod": "Day"
          }
        ],
        "Temperature": [
          {
            "DayPeriod": "Day"
          },
          {
            "DayPeriod": "Day"
          }
        ],
        "RainProbability": 1,
        "RainPrecipitation": 1,
        "FrostProbability": 1,
        "Uv": 1,
        "Icons": [
          {
            "DayPeriod": "Day",
            "IconType": "sample string 1"
          },
          {
            "DayPeriod": "Day",
            "IconType": "sample string 1"
          }
        ],
        "Texts": [
          {
            "DayPeriod": "Day",
            "Text": "sample string 1"
          },
          {
            "DayPeriod": "Day",
            "Text": "sample string 1"
          }
        ],
        "Wind": [
          {
            "VelocityMin": 1,
            "DayPeriod": "Day",
            "VelocityMax": 1,
            "VelocityAvg": 1,
            "GustMax": 1,
            "DirectionDegrees": 1,
            "Direction": "sample string 1"
          },
          {
            "VelocityMin": 1,
            "DayPeriod": "Day",
            "VelocityMax": 1,
            "VelocityAvg": 1,
            "GustMax": 1,
            "DirectionDegrees": 1,
            "Direction": "sample string 1"
          }
        ],
        "SunRise": "sample string 2",
        "SunSet": "sample string 3"
      }
    ],
    "ForecastCity": {
      "City": "sample string 1",
      "Id": 2,
      "State": "sample string 3",
      "LarBranchId": 4,
      "Branchs": [
        1,
        2
      ]
    },
    "ForecastJson": "sample string 3"
  },
  "Errors": [
    "sample string 1",
    "sample string 2"
  ]
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Type 'Lar.SicopPlus.Entities.DTOs.WeatherForecastMinMax' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Type 'Lar.SicopPlus.Entities.DTOs.WeatherForecastMinMax' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types.