Commit 91ca0dd9 authored by Rafa Hernandez's avatar Rafa Hernandez Committed by Alexander Salas Bastidas

feat(getSubItems): add string option for itemtype

parent 703db678
......@@ -521,6 +521,17 @@ public class GLPI extends ServiceGenerator {
});
}
/**
* Return a collection of rows of the sub_itemtype for the identified item.
* @param itemType This are the item type available on GLPI
* @param id unique identifier of the parent itemtype
* @param subItemType This are the item type available on GLPI
* @param callback here your are going to get the asynchronous response
*/
public void getSubItems(String itemType, String id, String subItemType, final JsonObjectCallback callback) {
getSubItems(new GetSubItemQuery(GLPI.this.context), itemType, id, subItemType, callback);
}
/**
* Return a collection of rows of the sub_itemtype for the identified item.
* @param itemType This are the item type available on GLPI
......@@ -534,15 +545,26 @@ public class GLPI extends ServiceGenerator {
/**
* Return a collection of rows of the sub_itemtype for the identified item.
* @param options this are the parameters of this endpoint for example expand_dropdowns or get_hateoas
* @param itemType This are the item type available on GLPI
* @param id unique identifier of the parent itemtype
* @param subItemType This are the item type available on GLPI
* @param callback here your are going to get the asynchronous response
*/
public void getSubItems(GetSubItemQuery options, itemType itemType, String id, itemType subItemType, final JsonObjectCallback callback) {
getSubItems(options, itemType.name(), id, subItemType.name(), callback);
}
/**
* Return a collection of rows of the sub_itemtype for the identified item.
* @param options this are the parameters of this endpoint for example expand_dropdowns or get_hateoas
* @param itemType This are the item type available on GLPI
* @param id unique identifier of the parent itemtype
* @param subItemType This are the item type available on GLPI
* @param callback here your are going to get the asynchronous response
*/
public void getSubItems(GetSubItemQuery options, String itemType, String id, String subItemType, final JsonObjectCallback callback) {
Call<JsonObject> responseCall = interfaces.getSubItem(getHeader(), itemType.name(), id, subItemType.name(), options.getQuery());
Call<JsonObject> responseCall = interfaces.getSubItem(getHeader(), itemType, id, subItemType, options.getQuery());
responseCall.enqueue(new Callback<JsonObject>() {
@Override
public void onResponse(Call<JsonObject> call, Response<JsonObject> response) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment