public Suggestions autoSuggest(String query, AutoSuggestOptionalParameter autoSuggestOptionalParameter) {
        return autoSuggestWithServiceResponseAsync(query, autoSuggestOptionalParameter).toBlocking().single().body();
    }
public Suggestions autoSuggest ( String query , AutoSuggestOptionalParameter autoSuggestOptionalParameter ) { return autoSuggestWithServiceResponseAsync ( query , autoSuggestOptionalParameter ) . toBlocking ( ) . single ( ) . body ( ) ; }
The AutoSuggest API lets you send a search query to Bing and get back a list of suggestions. This section provides technical details about the query parameters and headers that you use to request suggestions and the JSON response objects that contain them.

@param query The user's search term.
@param autoSuggestOptionalParameter the object representing the optional parameters to be set before calling this API
@throws IllegalArgumentException thrown if parameters fail the validation
@throws ErrorResponseException thrown if the request is rejected by server
@throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
@return the Suggestions object if successful.