Created
November 11, 2012 01:29
-
-
Save fabito/4053302 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Api(name = "buscacep", description = "Conjunto de serviços para consulta de CEP") | |
public class CepEndpoint { | |
private CEPService cepService = new MemcacheCepServiceDecorator(CEPServiceFactory.getCEPService()); | |
@ApiMethod(httpMethod = "GET", name = "cep.get") | |
public CEP getCep(@Named("numeroCep") String numeroCep) { | |
return cepService.obtemPorNumeroCEP(numeroCep); | |
} | |
@ApiMethod(httpMethod = "GET", name = "cep.search") | |
public List<CEP> searchCep(@Named("term") String query) { | |
return cepService.obtemPorEndereco(query); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment