Background: Apache Streams contains java interfaces which emulate social network REST APIs and implementations (some using Juneau Rest Proxy) for call method on those APIs via java.
Objective: Expose those interfaces / implementations via a hosted REST API, supporting an HTML serialization option, allowing a user to discover what methods are available, activate them, and view the results directly in the browser.
Some Relevant classes:
- https://github.com/apache/streams/blob/master/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Account.java
- Defines interface for getting account details of the authenticated token.
- https://github.com/apache/streams/blob/master/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Twitter.java
- Includes implementation of Account via Rest Proxy to api.twitter.com
- https://github.com/apache/incubator-juneau/blob/master/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServlet.java
- Server side of juneau remoting
- https://github.com/apache/incubator-juneau/blob/master/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
- Client side of juneau remoting
Proof of concept code : TwitterResource.scala
https://gist.github.com/steveblackmon/928396d08b0bde3dfbd601ad3d2200a5
Proof of content result :