polyapi-python 0.2.7.dev1__py3-none-any.whl → 0.2.7.dev3__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.
polyapi/function_cli.py CHANGED
@@ -286,4 +286,24 @@ def function_execute(context: str, subcommands: List) -> Any:
286
286
  context_code = importlib.import_module(f"polyapi.poly.{context}")
287
287
  print(f"Executing poly.{context}.{subcommands[1]}... ")
288
288
  fn = getattr(context_code, subcommands[1])
289
- return fn(*subcommands[2:])
289
+ return fn(*subcommands[2:])
290
+
291
+
292
+ def spec_delete(function_type: str, function_id: str):
293
+ api_key, api_url = get_api_key_and_url()
294
+ assert api_key
295
+ if function_type == "api":
296
+ url = f"{api_url}/functions/api/{function_id}"
297
+ elif function_type == "serverFunction":
298
+ url = f"{api_url}/functions/server/{function_id}"
299
+ elif function_type == "customFunction":
300
+ url = f"{api_url}/functions/client/{function_id}"
301
+ elif function_type == "webhookHandle":
302
+ url = f"{api_url}/webhooks/{function_id}"
303
+ else:
304
+ print_red("ERROR")
305
+ print(f"Unknown function type: {function_type}")
306
+ sys.exit(1)
307
+ headers = get_auth_headers(api_key)
308
+ resp = requests.delete(url, headers=headers)
309
+ return resp
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: polyapi-python
3
- Version: 0.2.7.dev1
3
+ Version: 0.2.7.dev3
4
4
  Summary: The Python Client for PolyAPI, the IPaaS by Developers for Developers
5
5
  Author-email: Dan Fellin <dan@polyapi.io>
6
6
  License: MIT License
@@ -9,7 +9,7 @@ polyapi/constants.py,sha256=sc-FnS0SngBLvSu1ZWMs0UCf9EYD1u1Yhfr-sZXGLns,607
9
9
  polyapi/error_handler.py,sha256=I_e0iz6VM23FLVQWJljxs2NGcl_OODbi43OcbnqBlp8,2398
10
10
  polyapi/exceptions.py,sha256=Zh7i7eCUhDuXEdUYjatkLFTeZkrx1BJ1P5ePgbJ9eIY,89
11
11
  polyapi/execute.py,sha256=kXnvlNQ7nz9cRlV2_5gXH09UCmyiDP5zi3wiAw0uDuk,1943
12
- polyapi/function_cli.py,sha256=GXRSThnt3oQqXWU8K76E8ry15DZOjsHUjjUZ9k5MGGE,9509
12
+ polyapi/function_cli.py,sha256=E92Pq3sDh7qrKL322DTQiTCqigp-IKayHJOmdlR5vT4,10232
13
13
  polyapi/generate.py,sha256=LN2Z6fE-HfpMsXlkJfOl8bqZdR3fUythE_ZsAe15tmk,8012
14
14
  polyapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  polyapi/rendered_spec.py,sha256=uaNzBhP4cX7iGfKwzZv0dxMagWzsGeDr0cQYx_AyIhQ,2153
@@ -19,8 +19,8 @@ polyapi/typedefs.py,sha256=mRqwd2LKofxNn_VSKxBzixni2j-tai8mfTQ0Wi2aLNM,1487
19
19
  polyapi/utils.py,sha256=JtL_v0PVkJBlTeRu0gIV5IDScqoiggS8m-VcS4HN22c,6890
20
20
  polyapi/variables.py,sha256=d36-trnfTL_8m2NkorMiImb4O3UrJbiFV38CHxV5i0A,4200
21
21
  polyapi/webhook.py,sha256=LWv28c2MLz_OKBI_Nn7WR4C-gs1SWgbdXsoxIIf-9UI,4886
22
- polyapi_python-0.2.7.dev1.dist-info/LICENSE,sha256=Hi0kDr56Dsy0uYIwNt4r9G7tI8x8miXRTlyvbeplCP8,1068
23
- polyapi_python-0.2.7.dev1.dist-info/METADATA,sha256=TV6c5Ppy_Qhoo-kirrPRBOeXI-yA9O1y7RV06CjDe3I,4867
24
- polyapi_python-0.2.7.dev1.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
25
- polyapi_python-0.2.7.dev1.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
26
- polyapi_python-0.2.7.dev1.dist-info/RECORD,,
22
+ polyapi_python-0.2.7.dev3.dist-info/LICENSE,sha256=Hi0kDr56Dsy0uYIwNt4r9G7tI8x8miXRTlyvbeplCP8,1068
23
+ polyapi_python-0.2.7.dev3.dist-info/METADATA,sha256=TgdRVxzUaQeLRzVzY9sIBSRPT40KZWsUXyDnCuHT7Og,4867
24
+ polyapi_python-0.2.7.dev3.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
25
+ polyapi_python-0.2.7.dev3.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
26
+ polyapi_python-0.2.7.dev3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.1.1)
2
+ Generator: setuptools (70.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5