OLD | NEW |
1 library googleapis.gamesManagement.v1management; | 1 library googleapis.gamesManagement.v1management; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import "package:crypto/crypto.dart" as crypto; | 8 import "package:crypto/crypto.dart" as crypto; |
9 import 'package:http/http.dart' as http; | 9 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | 10 import '../src/common_internal.dart' as common_internal; |
(...skipping 110 matching lines...) Loading... |
121 "POST", | 121 "POST", |
122 body: _body, | 122 body: _body, |
123 queryParams: _queryParams, | 123 queryParams: _queryParams, |
124 uploadOptions: _uploadOptions, | 124 uploadOptions: _uploadOptions, |
125 uploadMedia: _uploadMedia, | 125 uploadMedia: _uploadMedia, |
126 downloadOptions: _downloadOptions); | 126 downloadOptions: _downloadOptions); |
127 return _response.then((data) => new AchievementResetAllResponse.fromJson(dat
a)); | 127 return _response.then((data) => new AchievementResetAllResponse.fromJson(dat
a)); |
128 } | 128 } |
129 | 129 |
130 /** | 130 /** |
131 * Resets the achievement with the given ID for the all players. This method | 131 * Resets all draft achievements for all players. This method is only |
132 * is only available to user accounts for your developer console. Only draft | 132 * available to user accounts for your developer console. |
| 133 * |
| 134 * Request parameters: |
| 135 * |
| 136 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 137 * error. |
| 138 * |
| 139 * If the used [http.Client] completes with an error when making a REST call, |
| 140 * this method will complete with the same error. |
| 141 */ |
| 142 async.Future resetAllForAllPlayers() { |
| 143 var _url = null; |
| 144 var _queryParams = new core.Map(); |
| 145 var _uploadMedia = null; |
| 146 var _uploadOptions = null; |
| 147 var _downloadOptions = common.DownloadOptions.Metadata; |
| 148 var _body = null; |
| 149 |
| 150 |
| 151 _downloadOptions = null; |
| 152 |
| 153 _url = 'achievements/resetAllForAllPlayers'; |
| 154 |
| 155 var _response = _requester.request(_url, |
| 156 "POST", |
| 157 body: _body, |
| 158 queryParams: _queryParams, |
| 159 uploadOptions: _uploadOptions, |
| 160 uploadMedia: _uploadMedia, |
| 161 downloadOptions: _downloadOptions); |
| 162 return _response.then((data) => null); |
| 163 } |
| 164 |
| 165 /** |
| 166 * Resets the achievement with the given ID for all players. This method is |
| 167 * only available to user accounts for your developer console. Only draft |
133 * achievements can be reset. | 168 * achievements can be reset. |
134 * | 169 * |
135 * Request parameters: | 170 * Request parameters: |
136 * | 171 * |
137 * [achievementId] - The ID of the achievement used by this method. | 172 * [achievementId] - The ID of the achievement used by this method. |
138 * | 173 * |
139 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 174 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
140 * error. | 175 * error. |
141 * | 176 * |
142 * If the used [http.Client] completes with an error when making a REST call, | 177 * If the used [http.Client] completes with an error when making a REST call, |
(...skipping 18 matching lines...) Loading... |
161 var _response = _requester.request(_url, | 196 var _response = _requester.request(_url, |
162 "POST", | 197 "POST", |
163 body: _body, | 198 body: _body, |
164 queryParams: _queryParams, | 199 queryParams: _queryParams, |
165 uploadOptions: _uploadOptions, | 200 uploadOptions: _uploadOptions, |
166 uploadMedia: _uploadMedia, | 201 uploadMedia: _uploadMedia, |
167 downloadOptions: _downloadOptions); | 202 downloadOptions: _downloadOptions); |
168 return _response.then((data) => null); | 203 return _response.then((data) => null); |
169 } | 204 } |
170 | 205 |
| 206 /** |
| 207 * Resets the achievement with the given IDs for all players. This method is |
| 208 * only available to user accounts for your developer console. Only draft |
| 209 * achievements may be reset. |
| 210 * |
| 211 * [request] - The metadata request object. |
| 212 * |
| 213 * Request parameters: |
| 214 * |
| 215 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 216 * error. |
| 217 * |
| 218 * If the used [http.Client] completes with an error when making a REST call, |
| 219 * this method will complete with the same error. |
| 220 */ |
| 221 async.Future resetMultipleForAllPlayers(AchievementResetMultipleForAllRequest
request) { |
| 222 var _url = null; |
| 223 var _queryParams = new core.Map(); |
| 224 var _uploadMedia = null; |
| 225 var _uploadOptions = null; |
| 226 var _downloadOptions = common.DownloadOptions.Metadata; |
| 227 var _body = null; |
| 228 |
| 229 if (request != null) { |
| 230 _body = convert.JSON.encode((request).toJson()); |
| 231 } |
| 232 |
| 233 _downloadOptions = null; |
| 234 |
| 235 _url = 'achievements/resetMultipleForAllPlayers'; |
| 236 |
| 237 var _response = _requester.request(_url, |
| 238 "POST", |
| 239 body: _body, |
| 240 queryParams: _queryParams, |
| 241 uploadOptions: _uploadOptions, |
| 242 uploadMedia: _uploadMedia, |
| 243 downloadOptions: _downloadOptions); |
| 244 return _response.then((data) => null); |
| 245 } |
| 246 |
171 } | 247 } |
172 | 248 |
173 | 249 |
174 /** Not documented yet. */ | 250 /** Not documented yet. */ |
175 class ApplicationsResourceApi { | 251 class ApplicationsResourceApi { |
176 final common_internal.ApiRequester _requester; | 252 final common_internal.ApiRequester _requester; |
177 | 253 |
178 ApplicationsResourceApi(common_internal.ApiRequester client) : | 254 ApplicationsResourceApi(common_internal.ApiRequester client) : |
179 _requester = client; | 255 _requester = client; |
180 | 256 |
(...skipping 550 matching lines...) Loading... |
731 _json["kind"] = kind; | 807 _json["kind"] = kind; |
732 } | 808 } |
733 if (results != null) { | 809 if (results != null) { |
734 _json["results"] = results.map((value) => (value).toJson()).toList(); | 810 _json["results"] = results.map((value) => (value).toJson()).toList(); |
735 } | 811 } |
736 return _json; | 812 return _json; |
737 } | 813 } |
738 } | 814 } |
739 | 815 |
740 | 816 |
| 817 /** This is a JSON template for multiple achievements reset all request. */ |
| 818 class AchievementResetMultipleForAllRequest { |
| 819 /** The IDs of achievements to reset. */ |
| 820 core.List<core.String> achievementIds; |
| 821 |
| 822 /** |
| 823 * Uniquely identifies the type of this resource. Value is always the fixed |
| 824 * string gamesManagement#achievementResetMultipleForAllRequest. |
| 825 */ |
| 826 core.String kind; |
| 827 |
| 828 |
| 829 AchievementResetMultipleForAllRequest(); |
| 830 |
| 831 AchievementResetMultipleForAllRequest.fromJson(core.Map _json) { |
| 832 if (_json.containsKey("achievement_ids")) { |
| 833 achievementIds = _json["achievement_ids"]; |
| 834 } |
| 835 if (_json.containsKey("kind")) { |
| 836 kind = _json["kind"]; |
| 837 } |
| 838 } |
| 839 |
| 840 core.Map toJson() { |
| 841 var _json = new core.Map(); |
| 842 if (achievementIds != null) { |
| 843 _json["achievement_ids"] = achievementIds; |
| 844 } |
| 845 if (kind != null) { |
| 846 _json["kind"] = kind; |
| 847 } |
| 848 return _json; |
| 849 } |
| 850 } |
| 851 |
| 852 |
741 /** This is a JSON template for an achievement reset response. */ | 853 /** This is a JSON template for an achievement reset response. */ |
742 class AchievementResetResponse { | 854 class AchievementResetResponse { |
743 /** | 855 /** |
744 * The current state of the achievement. This is the same as the initial state | 856 * The current state of the achievement. This is the same as the initial state |
745 * of the achievement. | 857 * of the achievement. |
746 * Possible values are: | 858 * Possible values are: |
747 * - "HIDDEN"- Achievement is hidden. | 859 * - "HIDDEN"- Achievement is hidden. |
748 * - "REVEALED" - Achievement is revealed. | 860 * - "REVEALED" - Achievement is revealed. |
749 * - "UNLOCKED" - Achievement is unlocked. | 861 * - "UNLOCKED" - Achievement is unlocked. |
750 */ | 862 */ |
(...skipping 456 matching lines...) Loading... |
1207 _json["kind"] = kind; | 1319 _json["kind"] = kind; |
1208 } | 1320 } |
1209 if (resetScoreTimeSpans != null) { | 1321 if (resetScoreTimeSpans != null) { |
1210 _json["resetScoreTimeSpans"] = resetScoreTimeSpans; | 1322 _json["resetScoreTimeSpans"] = resetScoreTimeSpans; |
1211 } | 1323 } |
1212 return _json; | 1324 return _json; |
1213 } | 1325 } |
1214 } | 1326 } |
1215 | 1327 |
1216 | 1328 |
OLD | NEW |