public SearchGiphy searchByID ( String id ) throws GiphyException { SearchGiphy giphy = null ; HashMap < String , String > params = new HashMap < String , String > ( ) ; params . put ( "api_key" , apiKey ) ; Request request = new Request ( UrlUtil . buildUrlQuery ( IDEndpoint + id , params ) ) ; try { Response response = sender . sendRequest ( request ) ; giphy = gson . fromJson ( response . getBody ( ) , SearchGiphy . class ) ; } catch ( JsonSyntaxException | IOException e ) { log . error ( e . getMessage ( ) , e ) ; throw new GiphyException ( e ) ; } return giphy ; }
Returns a SerachGiphy object .