1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
use crate::api::app_data::{
AppDataApi, AppDataApiAppInfoTaskPostRequest, AppDataApiAppListTaskPostRequest,
AppDataApiAppReviewsTaskPostRequest, AppDataApiAppSearchesTaskPostRequest,
};
use crate::entity::{
AppDataApiAppInfoResult, AppDataApiAppListResult, AppDataApiAppReviewsResult,
AppDataApiAppSearchesResult, AppDataApiCategory, AppDataApiLanguage, AppDataApiLocation,
AppDataApiTaskReadyResult,
};
use crate::{DataForSeoApiResponse, DataForSeoClient};
use serde_json::Value;
impl AppDataApi<'_> {
/// Google Play sub-API. See <https://docs.dataforseo.com/v3/app_data/google/>.
pub fn google(&self) -> AppDataApiGoogle<'_> {
AppDataApiGoogle {
client: self.client,
}
}
}
/// Google Play endpoints of the App Data API.
/// See <https://docs.dataforseo.com/v3/app_data/google/>.
pub struct AppDataApiGoogle<'a> {
client: &'a DataForSeoClient,
}
impl AppDataApiGoogle<'_> {
/// Locations supported by Google Play App Data.
/// See <https://docs.dataforseo.com/v3/app_data/google/locations/>.
pub async fn locations(&self) -> DataForSeoApiResponse<AppDataApiLocation> {
self.client.http_get("/v3/app_data/google/locations").await
}
/// Languages supported by Google Play App Data.
/// See <https://docs.dataforseo.com/v3/app_data/google/languages/>.
pub async fn languages(&self) -> DataForSeoApiResponse<AppDataApiLanguage> {
self.client.http_get("/v3/app_data/google/languages").await
}
/// Categories supported by Google Play App Data.
/// See <https://docs.dataforseo.com/v3/app_data/google/categories/>.
pub async fn categories(&self) -> DataForSeoApiResponse<AppDataApiCategory> {
self.client.http_get("/v3/app_data/google/categories").await
}
/// Sets App Searches tasks.
/// See <https://docs.dataforseo.com/v3/app_data/google/app_searches/task_post/>.
pub async fn app_searches_task_post(
&self,
data: Vec<AppDataApiAppSearchesTaskPostRequest>,
) -> DataForSeoApiResponse<Value> {
self.client
.http_post("/v3/app_data/google/app_searches/task_post", &data)
.await
}
/// Lists completed App Searches tasks.
/// See <https://docs.dataforseo.com/v3/app_data/google/app_searches/tasks_ready/>.
pub async fn app_searches_tasks_ready(
&self,
) -> DataForSeoApiResponse<AppDataApiTaskReadyResult> {
self.client
.http_get("/v3/app_data/google/app_searches/tasks_ready")
.await
}
/// Retrieves the advanced result of an App Searches task.
/// See <https://docs.dataforseo.com/v3/app_data/google/app_searches/task_get/advanced/>.
pub async fn app_searches_task_get_advanced(
&self,
id: &str,
) -> DataForSeoApiResponse<AppDataApiAppSearchesResult> {
self.client
.http_get(&format!(
"/v3/app_data/google/app_searches/task_get/advanced/{id}"
))
.await
}
/// Retrieves the raw HTML of an App Searches task.
/// See <https://docs.dataforseo.com/v3/app_data/google/app_searches/task_get/html/>.
pub async fn app_searches_task_get_html(&self, id: &str) -> DataForSeoApiResponse<Value> {
self.client
.http_get(&format!(
"/v3/app_data/google/app_searches/task_get/html/{id}"
))
.await
}
/// Sets App List tasks.
/// See <https://docs.dataforseo.com/v3/app_data/google/app_list/task_post/>.
pub async fn app_list_task_post(
&self,
data: Vec<AppDataApiAppListTaskPostRequest>,
) -> DataForSeoApiResponse<Value> {
self.client
.http_post("/v3/app_data/google/app_list/task_post", &data)
.await
}
/// Lists completed App List tasks.
/// See <https://docs.dataforseo.com/v3/app_data/google/app_list/tasks_ready/>.
pub async fn app_list_tasks_ready(&self) -> DataForSeoApiResponse<AppDataApiTaskReadyResult> {
self.client
.http_get("/v3/app_data/google/app_list/tasks_ready")
.await
}
/// Retrieves the advanced result of an App List task.
/// See <https://docs.dataforseo.com/v3/app_data/google/app_list/task_get/advanced/>.
pub async fn app_list_task_get_advanced(
&self,
id: &str,
) -> DataForSeoApiResponse<AppDataApiAppListResult> {
self.client
.http_get(&format!(
"/v3/app_data/google/app_list/task_get/advanced/{id}"
))
.await
}
/// Retrieves the raw HTML of an App List task.
/// See <https://docs.dataforseo.com/v3/app_data/google/app_list/task_get/html/>.
pub async fn app_list_task_get_html(&self, id: &str) -> DataForSeoApiResponse<Value> {
self.client
.http_get(&format!("/v3/app_data/google/app_list/task_get/html/{id}"))
.await
}
/// Sets App Info tasks.
/// See <https://docs.dataforseo.com/v3/app_data/google/app_info/task_post/>.
pub async fn app_info_task_post(
&self,
data: Vec<AppDataApiAppInfoTaskPostRequest>,
) -> DataForSeoApiResponse<Value> {
self.client
.http_post("/v3/app_data/google/app_info/task_post", &data)
.await
}
/// Lists completed App Info tasks.
/// See <https://docs.dataforseo.com/v3/app_data/google/app_info/tasks_ready/>.
pub async fn app_info_tasks_ready(&self) -> DataForSeoApiResponse<AppDataApiTaskReadyResult> {
self.client
.http_get("/v3/app_data/google/app_info/tasks_ready")
.await
}
/// Retrieves the advanced result of an App Info task.
/// See <https://docs.dataforseo.com/v3/app_data/google/app_info/task_get/advanced/>.
pub async fn app_info_task_get_advanced(
&self,
id: &str,
) -> DataForSeoApiResponse<AppDataApiAppInfoResult> {
self.client
.http_get(&format!(
"/v3/app_data/google/app_info/task_get/advanced/{id}"
))
.await
}
/// Retrieves the raw HTML of an App Info task.
/// See <https://docs.dataforseo.com/v3/app_data/google/app_info/task_get/html/>.
pub async fn app_info_task_get_html(&self, id: &str) -> DataForSeoApiResponse<Value> {
self.client
.http_get(&format!("/v3/app_data/google/app_info/task_get/html/{id}"))
.await
}
/// Sets App Reviews tasks.
/// See <https://docs.dataforseo.com/v3/app_data/google/app_reviews/task_post/>.
pub async fn app_reviews_task_post(
&self,
data: Vec<AppDataApiAppReviewsTaskPostRequest>,
) -> DataForSeoApiResponse<Value> {
self.client
.http_post("/v3/app_data/google/app_reviews/task_post", &data)
.await
}
/// Lists completed App Reviews tasks.
/// See <https://docs.dataforseo.com/v3/app_data/google/app_reviews/tasks_ready/>.
pub async fn app_reviews_tasks_ready(
&self,
) -> DataForSeoApiResponse<AppDataApiTaskReadyResult> {
self.client
.http_get("/v3/app_data/google/app_reviews/tasks_ready")
.await
}
/// Retrieves the advanced result of an App Reviews task.
/// See <https://docs.dataforseo.com/v3/app_data/google/app_reviews/task_get/advanced/>.
pub async fn app_reviews_task_get_advanced(
&self,
id: &str,
) -> DataForSeoApiResponse<AppDataApiAppReviewsResult> {
self.client
.http_get(&format!(
"/v3/app_data/google/app_reviews/task_get/advanced/{id}"
))
.await
}
}