semaphoreui-client 0.1.3__py3-none-any.whl → 0.1.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- __version__ = "0.1.3"
1
+ __version__ = "0.1.4"
@@ -45,7 +45,7 @@ class SemaphoreUIClient:
45
45
  return Token(**response.json(), client=self)
46
46
 
47
47
  def delete_token(self, id):
48
- response = self.http.post(f"{self.api_endpoint}/user/tokens/{id}")
48
+ response = self.http.delete(f"{self.api_endpoint}/user/tokens/{id}")
49
49
  assert response.status_code in (204, 404) # 404 if token was already expired
50
50
 
51
51
  def projects(self) -> typing.List["Project"]:
@@ -92,13 +92,16 @@ class SemaphoreUIClient:
92
92
  alert: bool,
93
93
  alert_chat: str,
94
94
  max_parallel_tasks: int,
95
- type: str,
95
+ type: typing.Optional[str]=None,
96
96
  ):
97
97
  response = self.http.put(
98
98
  f"{self.api_endpoint}/project/{id}",
99
99
  json={
100
100
  "name": name,
101
101
  "alert": alert,
102
+ "alert_chat": alert_chat,
103
+ "max_parallel_tasks": max_parallel_tasks,
104
+ "type": type,
102
105
  },
103
106
  )
104
107
  assert response.status_code == 204
@@ -414,7 +417,7 @@ class SemaphoreUIClient:
414
417
  response = self.http.post(
415
418
  f"{self.api_endpoint}/project/{project_id}/templates",
416
419
  json={
417
- "id": 1,
420
+ "id": 0,
418
421
  "project_id": project_id,
419
422
  "inventory_id": inventory_id,
420
423
  "repository_id": repository_id,
@@ -499,7 +502,7 @@ class SemaphoreUIClient:
499
502
  return Schedule(**response.json(), client=self)
500
503
 
501
504
  def delete_project_schedule(self, project_id: int, schedule_id: int):
502
- response = self.http.get(
505
+ response = self.http.delete(
503
506
  f"{self.api_endpoint}/project/{project_id}/schedules/{schedule_id}"
504
507
  )
505
508
  assert response.status_code == 204
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: semaphoreui-client
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: An api client for interacting with Semaphore UI
5
5
  Project-URL: Documentation, https://github.com/rockstar/semaphoreui-client#readme
6
6
  Project-URL: Issues, https://github.com/rockstar/semaphoreui-client/issues
@@ -0,0 +1,6 @@
1
+ semaphoreui_client/__about__.py,sha256=JMD28FXYHc_TM03visyUSd3UA9FZAaJMRStnfZoq50Y,21
2
+ semaphoreui_client/__init__.py,sha256=r2j1tTgwFzp3AKAktr8izDIXllRf-Y0SdHAjInYDTP0,55
3
+ semaphoreui_client/client.py,sha256=Vm1a1gr5dEGER90qZHNYBhtc_ep6iWeBb5u3LpAk9GU,27769
4
+ semaphoreui_client-0.1.4.dist-info/METADATA,sha256=bTZMXe3MPtWHLl9e9IxKuCUG_ogElY67Nd2HBosqYPE,1632
5
+ semaphoreui_client-0.1.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
+ semaphoreui_client-0.1.4.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- semaphoreui_client/__about__.py,sha256=R5TtpJu7Qu6sOarfDpp-5Oyy8Pi2Ir3VewCvsCQiAgo,21
2
- semaphoreui_client/__init__.py,sha256=r2j1tTgwFzp3AKAktr8izDIXllRf-Y0SdHAjInYDTP0,55
3
- semaphoreui_client/client.py,sha256=AvZ1v4_aMFzRDM-YKb7CQd6Od9EgoKty-YXrf51ecsA,27612
4
- semaphoreui_client-0.1.3.dist-info/METADATA,sha256=VW8KWzF_RjLzD1D7ooiLIb8kP8nI0MzTlWmPQ7wMoIw,1632
5
- semaphoreui_client-0.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
- semaphoreui_client-0.1.3.dist-info/RECORD,,