Skip to content

Commit a26f72e

Browse files
gegnewzbjornson
authored andcommitted
beh(apiclient): rename post_attachment to upload_attachment
1 parent 1d44429 commit a26f72e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cellengine/resources/attachment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def get(cls, experiment_id: str, _id: str = None, name: str = None) -> Attachmen
3636

3737
@staticmethod
3838
def upload(experiment_id: str, filepath: str, filename: str = None) -> Attachment:
39-
return ce.APIClient().post_attachment(experiment_id, filepath, filename)
39+
return ce.APIClient().upload_attachment(experiment_id, filepath, filename)
4040

4141
def update(self):
4242
"""Save changes to this Attachment to CellEngine.

cellengine/resources/experiment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def download_attachment(
247247

248248
def upload_attachment(self, filepath: str, filename: str = None):
249249
"""Upload an attachment to this experiment."""
250-
ce.APIClient().post_attachment(self._id, filepath, filename)
250+
ce.APIClient().upload_attachment(self._id, filepath, filename)
251251

252252
@property
253253
def compensations(self) -> List[Compensation]:

cellengine/utils/api_client/APIClient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def get_attachment(self, experiment_id, _id=None, name=None) -> Attachment:
144144
except IndexError:
145145
raise RuntimeError("No experiment with that name or _id found.")
146146

147-
def post_attachment(
147+
def upload_attachment(
148148
self, experiment_id, filepath: str, filename: str = None
149149
) -> Attachment:
150150
"""Upload an attachment

0 commit comments

Comments
 (0)