polyapi-python 0.2.7.dev2__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 +21 -1
- {polyapi_python-0.2.7.dev2.dist-info → polyapi_python-0.2.7.dev3.dist-info}/METADATA +1 -1
- {polyapi_python-0.2.7.dev2.dist-info → polyapi_python-0.2.7.dev3.dist-info}/RECORD +6 -6
- {polyapi_python-0.2.7.dev2.dist-info → polyapi_python-0.2.7.dev3.dist-info}/LICENSE +0 -0
- {polyapi_python-0.2.7.dev2.dist-info → polyapi_python-0.2.7.dev3.dist-info}/WHEEL +0 -0
- {polyapi_python-0.2.7.dev2.dist-info → polyapi_python-0.2.7.dev3.dist-info}/top_level.txt +0 -0
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
|
|
@@ -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=
|
|
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.
|
|
23
|
-
polyapi_python-0.2.7.
|
|
24
|
-
polyapi_python-0.2.7.
|
|
25
|
-
polyapi_python-0.2.7.
|
|
26
|
-
polyapi_python-0.2.7.
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|