Comments (4)
This sounds like a good addition. I can't promise to review it until the weekend, so take your time with the PR. It looks like you're on a good track in your proof of concept.
from hipchat-scala.
It is possible (and easy) to override the default api-url by adding the config to an application.conf file as stated at https://www.playframework.com/documentation/2.4.x/ProductionConfiguration#General-configuration
unfortunately this is not practical if we want to have "clients" for different instances in the same application.
I could do a PR which would allow to pass a base url explicitly, for instance something like:
class RoomNotifier(private[this] val apiToken: String, baseUrlOpt: Option[String] = None)(implicit executor: ExecutionContext) extends Logging {
(...)
}
object RoomNotifier {
val instanceUrl = baseUrlOpt.map(Common.url)
private def url(roomIdOrName: String) = (instanceUrl.getOrElse(apiUrl) / "room" / roomIdOrName / "notification").POST
}
Let me know your thoughts about this
from hipchat-scala.
Proof of Concept here: master...pedrorijo91:feature/customApiURL
Still need to test it, and there are probably some minor improvements to be done, and maybe other code style issues you'd prefer different. I will have a better look at my code tomorrow before doing a PR. In the meanwhile let me know if you find something you disagree :)
from hipchat-scala.
thanks for the heads up @poweld. I did the PR #23 this morning, let me know your thoughts when you find the time :)
from hipchat-scala.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hipchat-scala.