Skip to content

Commit

Permalink
update with new version of organisations endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvaingaudan committed Sep 2, 2024
1 parent 57f18d8 commit 901748c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions arlas/cli/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,13 @@ def list_indices(arlas: str) -> list[list[str]]:
def set_collection_visibility(arlas: str, collection: str, public: bool):
description = Service.__arlas__(arlas, "/".join(["explore", collection, "_describe"]))
doc = {
"organisations": {
"shared": description.get("params", {}).get("organisations", {}).get("shared", []),
"public": public
}
"shared": description.get("params", {}).get("organisations", {}).get("shared", []),
"public": public
}
return Service.__arlas__(arlas, "/".join(["collections", collection, "organisations"]), patch=json.dumps(doc)).get("params", {}).get("organisations", {}).get("public")

def set_collection_display_name(arlas: str, collection: str, name: str):
doc = {
"display_names": {
"collection": name
}
}
doc = name
return Service.__arlas__(arlas, "/".join(["collections", collection, "display_names"]), patch=json.dumps(doc)).get("params", {}).get("display_names", {}).get("collection")

def share_with(arlas: str, collection: str, organisation: str):
Expand Down

0 comments on commit 901748c

Please sign in to comment.