Web-Power / pydundas

Access the Dundas REST API with Python.
https://pypi.org/project/pydundas/
MIT License
5 stars 3 forks source link

"cube.warehouse" not working #14

Open autonopy opened 2 years ago

autonopy commented 2 years ago

I tried using cube.warehouse() today and it failed. On https://www.dundas.com/support/api-docs/rest/, datacube/warehouse/ doesn't exist. I used datacube/buildstorage/ and it worked.

So I edited cube.py to include:

def buildstorage(self):
        """Triggers a 'Build Warehouse' event"""
        self.api.session.post('datacube/buildstorage/' + self.id, json={})

Would you like to incorporate it?

lomignet commented 2 years ago

Hi @autonopy , I'm really happy to see this used!

Unfortunately this company does not use Dundas anymore, and having left it, I do not have access anymore to it (and it's trivky to test). But please send a PR, I will make sure it's merged!

autonopy commented 2 years ago

Hi @lomignet - I'm surprised to hear that you don't think it is! Either way, I just posted about it on the Dundas forums, so maybe it'll get more use. It's really helpful!

I just tried to make a PR. It was my first, ever, so I'm not sure I did it right. Let me know, thanks!

lomignet commented 2 years ago

I meant tricky to test for me because I do not have access to a Dundas instance anymore :)

The PR looks good! Now I'll try to get hold of my old co-workers to get this merged, thanks!