Skip to content

Commit d1d06e6

Browse files
author
Cristi
committed
fixed MetriGroup api problems
1 parent 93ad4da commit d1d06e6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/com/coscale/sdk/client/metrics/MetricsApi.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ public Msg deleteMetricGroup(long id) throws IOException {
154154
*
155155
* @param childId
156156
* @param parentId
157-
* @return MetricGroup: the added metric group.
157+
* @return List of groups contained by the parent group.
158158
* @throws IOException
159159
*/
160-
public MetricGroup addGroupToGroup(long childId, long parentId) throws IOException {
160+
public List<MetricGroup> addGroupToGroup(long childId, long parentId) throws IOException {
161161
return api.callWithAuth("POST", "/metricgroups/" + parentId + "/metricgroups/" + childId
162-
+ '/', null, new TypeReference<MetricGroup>() {
162+
+ '/', null, new TypeReference<List<MetricGroup>>() {
163163
});
164164
}
165165

@@ -168,12 +168,12 @@ public MetricGroup addGroupToGroup(long childId, long parentId) throws IOExcepti
168168
*
169169
* @param metricId
170170
* @param groupId
171-
* @return Metric: the inserted metric.
171+
* @return List of Metrics contained by the group.
172172
* @throws IOException
173173
*/
174-
public Metric addMetricToGroup(long metricId, long groupId) throws IOException {
174+
public List<Metric> addMetricToGroup(long metricId, long groupId) throws IOException {
175175
return api.callWithAuth("POST", "/metricgroups/" + groupId + "/metrics/" + metricId + '/',
176-
null, new TypeReference<Metric>() {
176+
null, new TypeReference<List<Metric>>() {
177177
});
178178
}
179179

0 commit comments

Comments
 (0)