You can get a list of all the weather effects of a calendar by using the following endpoint.
{warning} Don't forget that all endpoints documented here need to be prefixed with
1.0/campaigns/{campaign.id}/
.
Method | URI | Headers |
---|---|---|
GET/HEAD | calendars/{calendar.id}/calendar_weather |
Default |
{
"data": [
{
"id": 2,
"calendar_id": 3,
"created_by": 1,
"weather": "bolt",
"temperature": "asdasd",
"precipitation": "",
"wind": "",
"effect": "",
"day": 3,
"month": 2,
"year": 110,
"created_at": "2020-01-27 14:32:59",
"updated_at": "2020-01-27 14:33:22",
"visibility_id": 1,
}
],
"links": {
"first": "https://api.kanka.io/1.0/campaigns/1/calendars/1/calendar_weather?page=1",
"last": "https://api.kanka.io/1.0/campaigns/1/calendars/1/calendar_weather?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://api.kanka.io/1.0/campaigns/1/calendars/1/calendar_weather",
"per_page": 15,
"to": 1,
"total": 1
}
}
To get the details of a single weather effect, use the following endpoint.
Method | URI | Headers |
---|---|---|
GET/HEAD | calendars/{calendar.id}/calendar_weather/{calendar_weather.id} |
Default |
{
"data": {
"id": 2,
"calendar_id": 3,
"created_by": 1,
"weather": "bolt",
"temperature": "asdasd",
"precipitation": "",
"wind": "",
"effect": "",
"day": 3,
"month": 2,
"year": 110,
"created_at": "2020-01-27 14:32:59",
"updated_at": "2020-01-27 14:33:22",
"visibility_id": 1
}
}
To create a calendar weather, use the following endpoint.
Method | URI | Headers |
---|---|---|
POST | calendars/{calendar.id}/calendar_weather |
Default |
Parameter | Type | Detail |
---|---|---|
year |
integer (Required) |
Year for the weather |
month |
integer (Required) |
Month for the weather |
day |
integer (Required) |
Day for the weather |
weather |
string (Required) |
Weather type |
temperature |
string |
The Temperature |
precipitation |
string |
The precipitation |
wind |
string |
The wind |
effect |
string |
The effect |
visibility_id |
integer |
The visibility: 1 for all , 2 self , 3 admin , 4 self-admin or 5 members . |
{success} Code 200 with JSON body of the new calendar weather.
To update a calendar, use the following endpoint.
Method | URI | Headers |
---|---|---|
PUT/PATCH | calendars/{calendar.id}/calendar_weather/{calendar_weather.id} |
Default |
The same body parameters are available as for when creating a calendar weather.
{success} Code 200 with JSON body of the updated calendar weather.
To delete a calendar weather, use the following endpoint.
Method | URI | Headers |
---|---|---|
DELETE | calendars/{calendar.id}/calendar_weather/{calendar_weather.id} |
Default |
{success} Code 200 with JSON.