Skip to content

Commit 346d293

Browse files
committed
Added Devices endpoint
1 parent 80bae26 commit 346d293

File tree

80 files changed

+3021
-403
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+3021
-403
lines changed

.openapi-generator/FILES

+24-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ docs/CreateNotification.md
2121
docs/CreateUser.md
2222
docs/CreateUserRequest.md
2323
docs/Device.md
24+
docs/DeviceOs.md
25+
docs/DeviceOsRequest.md
2426
docs/DeviceRequest.md
27+
docs/DeviceUpdate.md
28+
docs/DeviceUpdateRequest.md
29+
docs/DevicesApi.md
2530
docs/Fix.md
2631
docs/FixLocation.md
2732
docs/FixLocationRequest.md
@@ -31,6 +36,8 @@ docs/Location.md
3136
docs/LocationPoint.md
3237
docs/LocationRequest.md
3338
docs/MetaNotificationRequest.md
39+
docs/MobileApp.md
40+
docs/MobileAppRequest.md
3441
docs/Notification.md
3542
docs/NotificationRequest.md
3643
docs/NotificationsApi.md
@@ -39,8 +46,6 @@ docs/ObservationPrediction.md
3946
docs/ObservationPredictionRequest.md
4047
docs/ObservationRequest.md
4148
docs/ObservationsApi.md
42-
docs/Package.md
43-
docs/PackageRequest.md
4449
docs/PaginatedBiteList.md
4550
docs/PaginatedBreedingSiteList.md
4651
docs/PaginatedCampaignList.md
@@ -50,6 +55,7 @@ docs/PaginatedPartnerList.md
5055
docs/Partner.md
5156
docs/PartnerPoint.md
5257
docs/PartnersApi.md
58+
docs/PatchedDeviceUpdateRequest.md
5359
docs/PatchedNotificationRequest.md
5460
docs/PatchedUserRequest.md
5561
docs/Photo.md
@@ -75,6 +81,7 @@ mosquito_alert/api/bites_api.py
7581
mosquito_alert/api/breeding_sites_api.py
7682
mosquito_alert/api/campaigns_api.py
7783
mosquito_alert/api/countries_api.py
84+
mosquito_alert/api/devices_api.py
7885
mosquito_alert/api/fixes_api.py
7986
mosquito_alert/api/notifications_api.py
8087
mosquito_alert/api/observations_api.py
@@ -101,7 +108,11 @@ mosquito_alert/models/create_notification.py
101108
mosquito_alert/models/create_user.py
102109
mosquito_alert/models/create_user_request.py
103110
mosquito_alert/models/device.py
111+
mosquito_alert/models/device_os.py
112+
mosquito_alert/models/device_os_request.py
104113
mosquito_alert/models/device_request.py
114+
mosquito_alert/models/device_update.py
115+
mosquito_alert/models/device_update_request.py
105116
mosquito_alert/models/fix.py
106117
mosquito_alert/models/fix_location.py
107118
mosquito_alert/models/fix_location_request.py
@@ -110,14 +121,14 @@ mosquito_alert/models/location.py
110121
mosquito_alert/models/location_point.py
111122
mosquito_alert/models/location_request.py
112123
mosquito_alert/models/meta_notification_request.py
124+
mosquito_alert/models/mobile_app.py
125+
mosquito_alert/models/mobile_app_request.py
113126
mosquito_alert/models/notification.py
114127
mosquito_alert/models/notification_request.py
115128
mosquito_alert/models/observation.py
116129
mosquito_alert/models/observation_prediction.py
117130
mosquito_alert/models/observation_prediction_request.py
118131
mosquito_alert/models/observation_request.py
119-
mosquito_alert/models/package.py
120-
mosquito_alert/models/package_request.py
121132
mosquito_alert/models/paginated_bite_list.py
122133
mosquito_alert/models/paginated_breeding_site_list.py
123134
mosquito_alert/models/paginated_campaign_list.py
@@ -126,6 +137,7 @@ mosquito_alert/models/paginated_observation_list.py
126137
mosquito_alert/models/paginated_partner_list.py
127138
mosquito_alert/models/partner.py
128139
mosquito_alert/models/partner_point.py
140+
mosquito_alert/models/patched_device_update_request.py
129141
mosquito_alert/models/patched_notification_request.py
130142
mosquito_alert/models/patched_user_request.py
131143
mosquito_alert/models/photo.py
@@ -167,7 +179,12 @@ test/test_create_notification.py
167179
test/test_create_user.py
168180
test/test_create_user_request.py
169181
test/test_device.py
182+
test/test_device_os.py
183+
test/test_device_os_request.py
170184
test/test_device_request.py
185+
test/test_device_update.py
186+
test/test_device_update_request.py
187+
test/test_devices_api.py
171188
test/test_fix.py
172189
test/test_fix_location.py
173190
test/test_fix_location_request.py
@@ -177,6 +194,8 @@ test/test_location.py
177194
test/test_location_point.py
178195
test/test_location_request.py
179196
test/test_meta_notification_request.py
197+
test/test_mobile_app.py
198+
test/test_mobile_app_request.py
180199
test/test_notification.py
181200
test/test_notification_request.py
182201
test/test_notifications_api.py
@@ -185,8 +204,6 @@ test/test_observation_prediction.py
185204
test/test_observation_prediction_request.py
186205
test/test_observation_request.py
187206
test/test_observations_api.py
188-
test/test_package.py
189-
test/test_package_request.py
190207
test/test_paginated_bite_list.py
191208
test/test_paginated_breeding_site_list.py
192209
test/test_paginated_campaign_list.py
@@ -196,6 +213,7 @@ test/test_paginated_partner_list.py
196213
test/test_partner.py
197214
test/test_partner_point.py
198215
test/test_partners_api.py
216+
test/test_patched_device_update_request.py
199217
test/test_patched_notification_request.py
200218
test/test_patched_user_request.py
201219
test/test_photo.py

README.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ Class | Method | HTTP request | Description
116116
*CampaignsApi* | [**campaigns_list**](docs/CampaignsApi.md#campaigns_list) | **GET** /campaigns/ |
117117
*CampaignsApi* | [**campaigns_retrieve**](docs/CampaignsApi.md#campaigns_retrieve) | **GET** /campaigns/{id}/ |
118118
*CountriesApi* | [**countries_retrieve**](docs/CountriesApi.md#countries_retrieve) | **GET** /countries/{id}/ |
119+
*DevicesApi* | [**devices_create**](docs/DevicesApi.md#devices_create) | **POST** /devices/ |
120+
*DevicesApi* | [**devices_partial_update**](docs/DevicesApi.md#devices_partial_update) | **PATCH** /devices/{device_id}/ |
121+
*DevicesApi* | [**devices_retrieve**](docs/DevicesApi.md#devices_retrieve) | **GET** /devices/{device_id}/ |
122+
*DevicesApi* | [**devices_update**](docs/DevicesApi.md#devices_update) | **PUT** /devices/{device_id}/ |
119123
*FixesApi* | [**fixes_create**](docs/FixesApi.md#fixes_create) | **POST** /fixes/ |
120124
*NotificationsApi* | [**notifications_create**](docs/NotificationsApi.md#notifications_create) | **POST** /notifications/ |
121125
*NotificationsApi* | [**notifications_list**](docs/NotificationsApi.md#notifications_list) | **GET** /notifications/ |
@@ -159,7 +163,11 @@ Class | Method | HTTP request | Description
159163
- [CreateUser](docs/CreateUser.md)
160164
- [CreateUserRequest](docs/CreateUserRequest.md)
161165
- [Device](docs/Device.md)
166+
- [DeviceOs](docs/DeviceOs.md)
167+
- [DeviceOsRequest](docs/DeviceOsRequest.md)
162168
- [DeviceRequest](docs/DeviceRequest.md)
169+
- [DeviceUpdate](docs/DeviceUpdate.md)
170+
- [DeviceUpdateRequest](docs/DeviceUpdateRequest.md)
163171
- [Fix](docs/Fix.md)
164172
- [FixLocation](docs/FixLocation.md)
165173
- [FixLocationRequest](docs/FixLocationRequest.md)
@@ -168,14 +176,14 @@ Class | Method | HTTP request | Description
168176
- [LocationPoint](docs/LocationPoint.md)
169177
- [LocationRequest](docs/LocationRequest.md)
170178
- [MetaNotificationRequest](docs/MetaNotificationRequest.md)
179+
- [MobileApp](docs/MobileApp.md)
180+
- [MobileAppRequest](docs/MobileAppRequest.md)
171181
- [Notification](docs/Notification.md)
172182
- [NotificationRequest](docs/NotificationRequest.md)
173183
- [Observation](docs/Observation.md)
174184
- [ObservationPrediction](docs/ObservationPrediction.md)
175185
- [ObservationPredictionRequest](docs/ObservationPredictionRequest.md)
176186
- [ObservationRequest](docs/ObservationRequest.md)
177-
- [Package](docs/Package.md)
178-
- [PackageRequest](docs/PackageRequest.md)
179187
- [PaginatedBiteList](docs/PaginatedBiteList.md)
180188
- [PaginatedBreedingSiteList](docs/PaginatedBreedingSiteList.md)
181189
- [PaginatedCampaignList](docs/PaginatedCampaignList.md)
@@ -184,6 +192,7 @@ Class | Method | HTTP request | Description
184192
- [PaginatedPartnerList](docs/PaginatedPartnerList.md)
185193
- [Partner](docs/Partner.md)
186194
- [PartnerPoint](docs/PartnerPoint.md)
195+
- [PatchedDeviceUpdateRequest](docs/PatchedDeviceUpdateRequest.md)
187196
- [PatchedNotificationRequest](docs/PatchedNotificationRequest.md)
188197
- [PatchedUserRequest](docs/PatchedUserRequest.md)
189198
- [Photo](docs/Photo.md)

docs/AppUserTokenObtainPairRequest.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**uuid** | **str** | |
99
**password** | **str** | |
10+
**device_id** | **str** | | [optional]
1011

1112
## Example
1213

docs/BiteRequest.md

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Name | Type | Description | Notes
1010
**location** | [**LocationRequest**](LocationRequest.md) | |
1111
**note** | **str** | Note user attached to report. | [optional]
1212
**tags** | **List[str]** | | [optional]
13-
**package** | [**PackageRequest**](PackageRequest.md) | | [optional]
14-
**device** | [**DeviceRequest**](DeviceRequest.md) | | [optional]
1513
**event_environment** | **str** | The environment where the event took place. | [optional]
1614
**event_moment** | **str** | The moment of the day when the event took place. | [optional]
1715
**head_bite_count** | **int** | Number of bites reported in the head. | [optional] [default to 0]

docs/BitesApi.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ with mosquito_alert.ApiClient(configuration) as api_client:
240240
location_country_id = 56 # int | (optional)
241241
location_nuts_2 = 'location_nuts_2_example' # str | (optional)
242242
location_nuts_3 = 'location_nuts_3_example' # str | (optional)
243-
order_by = ['order_by_example'] # List[str] | Ordenamiento (optional)
243+
order_by = ['order_by_example'] # List[str] | Ordenado (optional)
244244
page = 56 # int | A page number within the paginated result set. (optional)
245245
page_size = 56 # int | Number of results to return per page. (optional)
246246
received_at_after = '2013-10-20T19:20:30+01:00' # datetime | Received at (optional)
@@ -270,7 +270,7 @@ Name | Type | Description | Notes
270270
**location_country_id** | **int**| | [optional]
271271
**location_nuts_2** | **str**| | [optional]
272272
**location_nuts_3** | **str**| | [optional]
273-
**order_by** | [**List[str]**](str.md)| Ordenamiento | [optional]
273+
**order_by** | [**List[str]**](str.md)| Ordenado | [optional]
274274
**page** | **int**| A page number within the paginated result set. | [optional]
275275
**page_size** | **int**| Number of results to return per page. | [optional]
276276
**received_at_after** | **datetime**| Received at | [optional]

docs/BreedingSiteRequest.md

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Name | Type | Description | Notes
1010
**location** | [**LocationRequest**](LocationRequest.md) | |
1111
**note** | **str** | Note user attached to report. | [optional]
1212
**tags** | **List[str]** | | [optional]
13-
**package** | [**PackageRequest**](PackageRequest.md) | | [optional]
14-
**device** | [**DeviceRequest**](DeviceRequest.md) | | [optional]
1513
**photos** | [**List[SimplePhotoRequest]**](SimplePhotoRequest.md) | |
1614
**site_type** | **str** | Breeding site type. | [optional]
1715
**has_water** | **bool** | Either if the user perceived water in the breeding site. | [optional]

docs/BreedingSitesApi.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ with mosquito_alert.ApiClient(configuration) as api_client:
241241
location_country_id = 56 # int | (optional)
242242
location_nuts_2 = 'location_nuts_2_example' # str | (optional)
243243
location_nuts_3 = 'location_nuts_3_example' # str | (optional)
244-
order_by = ['order_by_example'] # List[str] | Ordenamiento (optional)
244+
order_by = ['order_by_example'] # List[str] | Ordenado (optional)
245245
page = 56 # int | A page number within the paginated result set. (optional)
246246
page_size = 56 # int | Number of results to return per page. (optional)
247247
received_at_after = '2013-10-20T19:20:30+01:00' # datetime | Received at (optional)
@@ -272,7 +272,7 @@ Name | Type | Description | Notes
272272
**location_country_id** | **int**| | [optional]
273273
**location_nuts_2** | **str**| | [optional]
274274
**location_nuts_3** | **str**| | [optional]
275-
**order_by** | [**List[str]**](str.md)| Ordenamiento | [optional]
275+
**order_by** | [**List[str]**](str.md)| Ordenado | [optional]
276276
**page** | **int**| A page number within the paginated result set. | [optional]
277277
**page_size** | **int**| Number of results to return per page. | [optional]
278278
**received_at_after** | **datetime**| Received at | [optional]

docs/CampaignsApi.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ with mosquito_alert.ApiClient(configuration) as api_client:
5959
api_instance = mosquito_alert.CampaignsApi(api_client)
6060
country_id = 56 # int | Country in which the campaign is taking place (optional)
6161
is_active = True # bool | (optional)
62-
order_by = ['order_by_example'] # List[str] | Ordenamiento (optional)
62+
order_by = ['order_by_example'] # List[str] | Ordenado (optional)
6363
page = 56 # int | A page number within the paginated result set. (optional)
6464
page_size = 56 # int | Number of results to return per page. (optional)
6565

@@ -80,7 +80,7 @@ Name | Type | Description | Notes
8080
------------- | ------------- | ------------- | -------------
8181
**country_id** | **int**| Country in which the campaign is taking place | [optional]
8282
**is_active** | **bool**| | [optional]
83-
**order_by** | [**List[str]**](str.md)| Ordenamiento | [optional]
83+
**order_by** | [**List[str]**](str.md)| Ordenado | [optional]
8484
**page** | **int**| A page number within the paginated result set. | [optional]
8585
**page_size** | **int**| Number of results to return per page. | [optional]
8686

docs/CreateUser.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**uuid** | **str** | | [readonly]
99
**registration_time** | **datetime** | The date and time when user registered and consented to sharing data. Automatically set by server when user uploads registration. | [readonly]
10-
**language_iso** | **str** | Language setting of app. 2-digit ISO-639-1 language code. | [optional]
10+
**locale** | **str** | The locale code representing the language preference selected by the user for displaying the interface text. Enter the locale following the BCP 47 standard in 'language' or 'language-region' format (e.g., 'en' for English, 'en-US' for English (United States), 'fr' for French). The language is a two-letter ISO 639-1 code, and the region is an optional two-letter ISO 3166-1 alpha-2 code. | [optional]
11+
**language_iso** | **str** | ISO 639-1 code | [readonly]
1112
**score** | **int** | Global XP Score. This field is updated whenever the user asks for the score, and is only stored here. The content must equal score_v2_adult + score_v2_bite + score_v2_site | [readonly]
1213
**last_score_update** | **datetime** | Last time score was updated | [readonly]
1314

docs/CreateUserRequest.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**device_token** | **str** | Device token, used in messaging. Must be supplied by the client | [optional]
9-
**language_iso** | **str** | Language setting of app. 2-digit ISO-639-1 language code. | [optional]
8+
**locale** | **str** | The locale code representing the language preference selected by the user for displaying the interface text. Enter the locale following the BCP 47 standard in 'language' or 'language-region' format (e.g., 'en' for English, 'en-US' for English (United States), 'fr' for French). The language is a two-letter ISO 639-1 code, and the region is an optional two-letter ISO 3166-1 alpha-2 code. | [optional]
109
**password** | **str** | |
1110

1211
## Example

docs/Device.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**manufacturer** | **str** | Manufacturer of device from which this report was submitted. | [optional]
9-
**model** | **str** | Model of device from which this report was submitted. | [optional]
10-
**os** | **str** | Operating system of device from which this report was submitted. | [optional]
11-
**os_version** | **str** | Operating system version of device from which this report was submitted. | [optional]
12-
**os_language** | **str** | Language setting of operating system on device from which this report was submitted. 2-digit ISO-639-1 language code. | [optional]
8+
**device_id** | **str** | Unique device identifier |
9+
**name** | **str** | | [optional]
10+
**type** | **str** | |
11+
**manufacturer** | **str** | The manufacturer of the device. | [optional]
12+
**model** | **str** | The end-user-visible name for the end product. |
13+
**os** | [**DeviceOs**](DeviceOs.md) | |
14+
**mobile_app** | [**MobileApp**](MobileApp.md) | | [optional]
15+
**user_uuid** | **str** | | [readonly]
16+
**last_login** | **datetime** | | [readonly]
17+
**created_at** | **datetime** | | [readonly]
18+
**updated_at** | **datetime** | | [readonly]
1319

1420
## Example
1521

docs/DeviceOs.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# DeviceOs
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**name** | **str** | Operating system of device from which this report was submitted. |
9+
**version** | **str** | Operating system version of device from which this report was submitted. |
10+
**locale** | **str** | The locale configured in the device following the BCP 47 standard in 'language' or 'language-region' format (e.g., 'en' for English, 'en-US' for English (United States), 'fr' for French). The language is a two-letter ISO 639-1 code, and the region is an optional two-letter ISO 3166-1 alpha-2 code. | [optional]
11+
12+
## Example
13+
14+
```python
15+
from mosquito_alert.models.device_os import DeviceOs
16+
17+
# TODO update the JSON string below
18+
json = "{}"
19+
# create an instance of DeviceOs from a JSON string
20+
device_os_instance = DeviceOs.from_json(json)
21+
# print the JSON string representation of the object
22+
print(DeviceOs.to_json())
23+
24+
# convert the object into a dict
25+
device_os_dict = device_os_instance.to_dict()
26+
# create an instance of DeviceOs from a dict
27+
device_os_from_dict = DeviceOs.from_dict(device_os_dict)
28+
```
29+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
30+
31+

docs/DeviceOsRequest.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# DeviceOsRequest
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**name** | **str** | Operating system of device from which this report was submitted. |
9+
**version** | **str** | Operating system version of device from which this report was submitted. |
10+
**locale** | **str** | The locale configured in the device following the BCP 47 standard in 'language' or 'language-region' format (e.g., 'en' for English, 'en-US' for English (United States), 'fr' for French). The language is a two-letter ISO 639-1 code, and the region is an optional two-letter ISO 3166-1 alpha-2 code. | [optional]
11+
12+
## Example
13+
14+
```python
15+
from mosquito_alert.models.device_os_request import DeviceOsRequest
16+
17+
# TODO update the JSON string below
18+
json = "{}"
19+
# create an instance of DeviceOsRequest from a JSON string
20+
device_os_request_instance = DeviceOsRequest.from_json(json)
21+
# print the JSON string representation of the object
22+
print(DeviceOsRequest.to_json())
23+
24+
# convert the object into a dict
25+
device_os_request_dict = device_os_request_instance.to_dict()
26+
# create an instance of DeviceOsRequest from a dict
27+
device_os_request_from_dict = DeviceOsRequest.from_dict(device_os_request_dict)
28+
```
29+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
30+
31+

docs/DeviceRequest.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**manufacturer** | **str** | Manufacturer of device from which this report was submitted. | [optional]
9-
**model** | **str** | Model of device from which this report was submitted. | [optional]
10-
**os** | **str** | Operating system of device from which this report was submitted. | [optional]
11-
**os_version** | **str** | Operating system version of device from which this report was submitted. | [optional]
12-
**os_language** | **str** | Language setting of operating system on device from which this report was submitted. 2-digit ISO-639-1 language code. | [optional]
8+
**device_id** | **str** | Unique device identifier |
9+
**name** | **str** | | [optional]
10+
**fcm_token** | **str** | |
11+
**type** | **str** | |
12+
**manufacturer** | **str** | The manufacturer of the device. | [optional]
13+
**model** | **str** | The end-user-visible name for the end product. |
14+
**os** | [**DeviceOsRequest**](DeviceOsRequest.md) | |
15+
**mobile_app** | [**MobileAppRequest**](MobileAppRequest.md) | | [optional]
1316

1417
## Example
1518

0 commit comments

Comments
 (0)