Skip to content

ItemConsulting/play-connections

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Play Connections

A Java library to access Connections in a reactive manner. Is primarily created to work with Play Framework, but can work in any context.

Usage

Read in or set up properties, like this:

Properties prop = new Properties();
prop.setProperty("connections.server.host", "https://connections.myserver.com");
prop.setProperty("connections.server.username", "username");
prop.setProperty("connections.server.password", "password");

Create an instence of the ConnectionsClient, select the service, and do an operation on it.

ConnectionsClient client = ConnectionsClient.getInstance(prop);
Promise<List<Blog>> blogPromise = client.blogs().myBlogs();
List<Blog> blogs = blogPromise.get();

Testing Connection to Server

To test the connection to server, you need to supply the system with your credentials.

  1. Create a new file src/test/resources/conf/secret.conf
  2. Add this configuration to the file:
connections.server.host="https://connections.myserver.com"
connections.server.username="username"
connections.server.password="password"
  1. Run the ConnectionsTest.testConnection unittest.

About

Connections integration for Play 2.4.x

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages