org.openmbee.mms.twc.TeamworkCloudEndpoints Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of twc Show documentation
Show all versions of twc Show documentation
twc, a module of the MMS
package org.openmbee.mms.twc;
public enum TeamworkCloudEndpoints {
LOGIN("login"),
GETROLESID("resources/%s/roles"),
GETPROJECTUSERS("workspaces/%s/resources/%s/roles/%s/users");
private String path;
public String getPath() {
return path;
}
TeamworkCloudEndpoints(){
}
TeamworkCloudEndpoints(String path){
this.path = path;
}
public String buildUrl(TeamworkCloud twc,String ...params){
String url = String.format("%s://%s:%s/osmc/%s", twc.getProtocol(), twc.getUrl(), twc.getPort(), getPath());
if(params == null) {
return url;
}
return String.format(url, (Object[]) params);
}
}