Skip to content

test-IO/customer-api-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

test IO Java API

Usage

Very simple example:

TestIoClientFactory factory = new TestIoClientFactory.Builder()
    .baseUrl("https://api.test.io/customer/v2/")
    .token("abcdefg")
    .build();

BugsClient bugsClient = factory.bugsClient();

Response<BugsResponse> resp = bugsClient.fetchBugs().execute();

List<Bug> bugs = resp.body().getBugs();

Add logging of requests/responses:

TestIoClientFactory factory = new TestIoClientFactory.Builder()
    .baseUrl("https://api.test.io/customer/v2/")
    .token("abcdefg")
    .loggingLevel(Level.BODY)
    .build();

    ...

Advanced Configuration

Custom HTTP Client

OkHttpClient client = new OkHttpClient.Builder()
    .connectTimeout(Duration.ofSeconds(10))
    .readTimeout(Duration.ofSeconds(10))
    .retryOnConnectionFailure(true)
    .build();
TestIoClientFactory factory = new TestIoClientFactory.Builder()
    .baseUrl("https://api.test.io/customer/v2/")
    .token("abcdefg")
    .client(client)
    .build();

    ...

About

Java API wrapper for the test.io customer API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages