Repository navigation
Introduced QueryBuilder approach - #14
Conversation
refactored Query and Client classes, so that now: API key, base URL and search path are now related to Client. Query object is now just holder for search pattern and related parameters (start and end time, document language) Introduced QueryBuilder that follows Builder pattern and should be used for Query object creation. refactored all related to changes unit tests rewritten examples to use new approach refactored README to compile successfully in IDEA and to follow changes
|
Slightly off-topic question, we are curious on https://github.com/twingly/twingly-search-api-java/pull/14/files#diff-04c6e90faac2675aa89e2176d2eec7d8R56 what does it do? It seems like it builds a jar file, but we can't find the key embedded in it. Where should we find the key? |
| class QueryBuilderSpockTest extends Specification { | ||
| private final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(Constants.DATE_FORMAT); | ||
|
|
||
| def "should through QueryException for empty search pattern"() { |
It's just an example how key should be passed to any jvm-based program. |
Yes, that's clearer. |
|
@twingly-mob I've updated documentation with new example. |
| new UrlConnectionClient() | ||
| then: | ||
| notThrown(TwinglySearchException) | ||
| System.properties.remove(Constants.TWINGLY_API_KEY_PROPERTY) |
There was a problem hiding this comment.
WDYT of moving the removal of the property to cleanup:?
|
@xSAVIKx great work, we will take a last quick look tomorrow, I think we will be happy :) |
Introduced QueryBuilder approach
refactored Query and Client classes, so that now:
API key, base URL and search path are now related to Client.
Query object is now just holder for search pattern and related parameters (start and end time, document language)
Introduced QueryBuilder that follows Builder pattern and should be used for Query object creation.
refactored all related to changes unit tests
rewritten examples to use new approach
refactored README to compile successfully in IDEA and to follow changes