|
42 | 42 | import io.github.vrchatapi.model.GroupMember; |
43 | 43 | import io.github.vrchatapi.model.GroupPermission; |
44 | 44 | import io.github.vrchatapi.model.GroupRole; |
| 45 | +import io.github.vrchatapi.model.LimitedGroup; |
45 | 46 | import java.time.OffsetDateTime; |
46 | 47 | import io.github.vrchatapi.model.PaginatedGroupAuditLogEntryList; |
47 | 48 | import io.github.vrchatapi.model.RespondGroupJoinRequest; |
@@ -4422,6 +4423,147 @@ public okhttp3.Call respondGroupJoinRequestAsync(String groupId, String userId, |
4422 | 4423 | localVarApiClient.executeAsync(localVarCall, _callback); |
4423 | 4424 | return localVarCall; |
4424 | 4425 | } |
| 4426 | + /** |
| 4427 | + * Build call for searchGroups |
| 4428 | + * @param query Query to search for, can be either Group Name or Group shortCode (optional) |
| 4429 | + * @param offset A zero-based offset from the default object sorting from where search results start. (optional) |
| 4430 | + * @param n The number of objects to return. (optional, default to 60) |
| 4431 | + * @param _callback Callback for upload/download progress |
| 4432 | + * @return Call to execute |
| 4433 | + * @throws ApiException If fail to serialize the request body object |
| 4434 | + * @http.response.details |
| 4435 | + <table summary="Response Details" border="1"> |
| 4436 | + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 4437 | + <tr><td> 200 </td><td> Returns a list of LimitedGroup objects. </td><td> - </td></tr> |
| 4438 | + <tr><td> 401 </td><td> Error response due to missing auth cookie. </td><td> - </td></tr> |
| 4439 | + </table> |
| 4440 | + */ |
| 4441 | + public okhttp3.Call searchGroupsCall(String query, Integer offset, Integer n, final ApiCallback _callback) throws ApiException { |
| 4442 | + String basePath = null; |
| 4443 | + // Operation Servers |
| 4444 | + String[] localBasePaths = new String[] { }; |
| 4445 | + |
| 4446 | + // Determine Base Path to Use |
| 4447 | + if (localCustomBaseUrl != null){ |
| 4448 | + basePath = localCustomBaseUrl; |
| 4449 | + } else if ( localBasePaths.length > 0 ) { |
| 4450 | + basePath = localBasePaths[localHostIndex]; |
| 4451 | + } else { |
| 4452 | + basePath = null; |
| 4453 | + } |
| 4454 | + |
| 4455 | + Object localVarPostBody = null; |
| 4456 | + |
| 4457 | + // create path and map variables |
| 4458 | + String localVarPath = "/groups"; |
| 4459 | + |
| 4460 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 4461 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 4462 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 4463 | + Map<String, String> localVarCookieParams = new HashMap<String, String>(); |
| 4464 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 4465 | + |
| 4466 | + if (query != null) { |
| 4467 | + localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query)); |
| 4468 | + } |
| 4469 | + |
| 4470 | + if (offset != null) { |
| 4471 | + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); |
| 4472 | + } |
| 4473 | + |
| 4474 | + if (n != null) { |
| 4475 | + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); |
| 4476 | + } |
| 4477 | + |
| 4478 | + final String[] localVarAccepts = { |
| 4479 | + "application/json" |
| 4480 | + }; |
| 4481 | + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); |
| 4482 | + if (localVarAccept != null) { |
| 4483 | + localVarHeaderParams.put("Accept", localVarAccept); |
| 4484 | + } |
| 4485 | + |
| 4486 | + final String[] localVarContentTypes = { |
| 4487 | + }; |
| 4488 | + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); |
| 4489 | + if (localVarContentType != null) { |
| 4490 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 4491 | + } |
| 4492 | + |
| 4493 | + String[] localVarAuthNames = new String[] { }; |
| 4494 | + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); |
| 4495 | + } |
| 4496 | + |
| 4497 | + @SuppressWarnings("rawtypes") |
| 4498 | + private okhttp3.Call searchGroupsValidateBeforeCall(String query, Integer offset, Integer n, final ApiCallback _callback) throws ApiException { |
| 4499 | + return searchGroupsCall(query, offset, n, _callback); |
| 4500 | + |
| 4501 | + } |
| 4502 | + |
| 4503 | + /** |
| 4504 | + * Search Group |
| 4505 | + * Searches Groups by name or shortCode |
| 4506 | + * @param query Query to search for, can be either Group Name or Group shortCode (optional) |
| 4507 | + * @param offset A zero-based offset from the default object sorting from where search results start. (optional) |
| 4508 | + * @param n The number of objects to return. (optional, default to 60) |
| 4509 | + * @return List<LimitedGroup> |
| 4510 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4511 | + * @http.response.details |
| 4512 | + <table summary="Response Details" border="1"> |
| 4513 | + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 4514 | + <tr><td> 200 </td><td> Returns a list of LimitedGroup objects. </td><td> - </td></tr> |
| 4515 | + <tr><td> 401 </td><td> Error response due to missing auth cookie. </td><td> - </td></tr> |
| 4516 | + </table> |
| 4517 | + */ |
| 4518 | + public List<LimitedGroup> searchGroups(String query, Integer offset, Integer n) throws ApiException { |
| 4519 | + ApiResponse<List<LimitedGroup>> localVarResp = searchGroupsWithHttpInfo(query, offset, n); |
| 4520 | + return localVarResp.getData(); |
| 4521 | + } |
| 4522 | + |
| 4523 | + /** |
| 4524 | + * Search Group |
| 4525 | + * Searches Groups by name or shortCode |
| 4526 | + * @param query Query to search for, can be either Group Name or Group shortCode (optional) |
| 4527 | + * @param offset A zero-based offset from the default object sorting from where search results start. (optional) |
| 4528 | + * @param n The number of objects to return. (optional, default to 60) |
| 4529 | + * @return ApiResponse<List<LimitedGroup>> |
| 4530 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4531 | + * @http.response.details |
| 4532 | + <table summary="Response Details" border="1"> |
| 4533 | + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 4534 | + <tr><td> 200 </td><td> Returns a list of LimitedGroup objects. </td><td> - </td></tr> |
| 4535 | + <tr><td> 401 </td><td> Error response due to missing auth cookie. </td><td> - </td></tr> |
| 4536 | + </table> |
| 4537 | + */ |
| 4538 | + public ApiResponse<List<LimitedGroup>> searchGroupsWithHttpInfo(String query, Integer offset, Integer n) throws ApiException { |
| 4539 | + okhttp3.Call localVarCall = searchGroupsValidateBeforeCall(query, offset, n, null); |
| 4540 | + Type localVarReturnType = new TypeToken<List<LimitedGroup>>(){}.getType(); |
| 4541 | + return localVarApiClient.execute(localVarCall, localVarReturnType); |
| 4542 | + } |
| 4543 | + |
| 4544 | + /** |
| 4545 | + * Search Group (asynchronously) |
| 4546 | + * Searches Groups by name or shortCode |
| 4547 | + * @param query Query to search for, can be either Group Name or Group shortCode (optional) |
| 4548 | + * @param offset A zero-based offset from the default object sorting from where search results start. (optional) |
| 4549 | + * @param n The number of objects to return. (optional, default to 60) |
| 4550 | + * @param _callback The callback to be executed when the API call finishes |
| 4551 | + * @return The request call |
| 4552 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 4553 | + * @http.response.details |
| 4554 | + <table summary="Response Details" border="1"> |
| 4555 | + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 4556 | + <tr><td> 200 </td><td> Returns a list of LimitedGroup objects. </td><td> - </td></tr> |
| 4557 | + <tr><td> 401 </td><td> Error response due to missing auth cookie. </td><td> - </td></tr> |
| 4558 | + </table> |
| 4559 | + */ |
| 4560 | + public okhttp3.Call searchGroupsAsync(String query, Integer offset, Integer n, final ApiCallback<List<LimitedGroup>> _callback) throws ApiException { |
| 4561 | + |
| 4562 | + okhttp3.Call localVarCall = searchGroupsValidateBeforeCall(query, offset, n, _callback); |
| 4563 | + Type localVarReturnType = new TypeToken<List<LimitedGroup>>(){}.getType(); |
| 4564 | + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); |
| 4565 | + return localVarCall; |
| 4566 | + } |
4425 | 4567 | /** |
4426 | 4568 | * Build call for unbanGroupMember |
4427 | 4569 | * @param groupId Must be a valid group ID. (required) |
|
0 commit comments