cloud/src/main/java/com/adamg/materialtemplate/cloud/module/RestApiModule.java
@Provides
    RestAdapter provideRestAdapter(final Endpoint endpoint, final Client client, final JacksonConverter converter,
                                   final CloudErrorHandler errorHandler) {
        return new RestAdapter.Builder()
                // Add OkHttp as the client
                .setClient(client)
                        // Set the Jackson converter
                .setConverter(converter)
                        // Set the endpoints for the call
                .setEndpoint(endpoint)
                        // Set the error handler
                .setErrorHandler(errorHandler)
                        // Set the Logger to show all pieces of the request and response bodies
                .setLogLevel(RestAdapter.LogLevel.FULL)
                        // Build the client
                .build();
    }
/**
     * Module that provides the basic patterned {@link RestAdapter} for use in our REST
     * requests.
     * This module will weave together the basic pieces that allow us to make a signed call, handle
     * default
     * errors, and append the correct endpoint for each call.
     *
     * @param endpoint     URL endpoint of each call being made
     * @param client       the REST client
     * @param converter    the Jackson converter that manages the JSON conversion
     * @param errorHandler common error handler piece
     * @return a {@link RestAdapter} that has been stitched together via the pieces passed
     * in.
     */
Module that provides the basic patterned  RestAdapter for use in our REST
requests.
This module will weave together the basic pieces that allow us to make a signed call, handle
default
errors, and append the correct endpoint for each call.


Module that provides the basic patterned RestAdapter for use in our REST requests . This module will weave together the basic pieces that allow us to make a signed call handle default errors and append the correct endpoint for each call .
@Provides
    RestAdapter provideRestAdapter(final Endpoint endpoint, final Client client, final JacksonConverter converter,
                                   final CloudErrorHandler errorHandler) {
        return new RestAdapter.Builder()
                .setClient(client)
                .setConverter(converter)
                .setEndpoint(endpoint)
                .setErrorHandler(errorHandler)
                .setLogLevel(RestAdapter.LogLevel.FULL)
                .build();
    }
@ Provides RestAdapter provideRestAdapter ( final Endpoint endpoint , final Client client , final JacksonConverter converter , final CloudErrorHandler errorHandler ) { return new RestAdapter . Builder ( ) . setClient ( client ) . setConverter ( converter ) . setEndpoint ( endpoint ) . setErrorHandler ( errorHandler ) . setLogLevel ( RestAdapter . LogLevel . FULL ) . build ( ) ; }
Module that provides the basic patterned {@link RestAdapter} for use in our REST
 requests.
Module that provides the basic patterned { @link RestAdapter } for use in our REST requests .
// Add OkHttp as the client // Set the Jackson converter // Set the endpoints for the call // Set the error handler // Set the Logger to show all pieces of the request and response bodies // Build the client