Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding add_sub_items and update_sub_items #21

Closed
thel1988 opened this issue Oct 27, 2023 · 3 comments
Closed

adding add_sub_items and update_sub_items #21

thel1988 opened this issue Oct 27, 2023 · 3 comments

Comments

@thel1988
Copy link
Contributor

Hi there

As someone really happy about this package, i would like to hear if it would be possible to implement the following functions:
add_sub_items and update_sub_items

I had the need to have both of these functions in a project where we add entries to the glpi installation from another system.

I changed in my local installation, but i'm not sure if you want to do any of the following:

  • want me to submit a pull-request
  • add to your own codebase?
  • Or if there is any need for this in your lib, i will just move along, and you can ignore this request, or close it :)

I basically copied the get_sub_item function and changed the names:
eg:
def add_sub_items(self, itemtype, item_id, sub_itemtype, *items):

And changed the method to either post or put, depending on if it is a update request or create.

I know it is not official on the api documentation from glpi, but it seems to work.

Either way let me know what you think.

@fmenabe
Copy link
Member

fmenabe commented Oct 29, 2023

Hi,

For what I understand, theses API calls work even though they are not documented. As long as it just that, it is ok to add them to the library.

I'll prefer a pull request, less work for me and you get the credit ;-). Just know I'm not working at the time for Unistra and I may need to find someone to get me the permissions or merge the PR.

And for coherence, del_sub_items should also be implemented.

@thel1988
Copy link
Contributor Author

thel1988 commented Jan 23, 2024

Hi any news on the pull request? Is it a permission issue? :)
Pull issue have been made in oct: #22

@fmenabe
Copy link
Member

fmenabe commented Jan 23, 2024

Hi @thel1988, sorry but it took me some time to ask for the permissions and it take a few more time to get them. I only get back access a few days ago but didn't have much time to look back at the remaining issues on this repo.

I'll merge the PR and release a new version on Pypi.

@fmenabe fmenabe closed this as completed Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants