mirror of
https://github.com/onyx-and-iris/obsws-python.git
synced 2024-11-22 04:40:53 +00:00
pass payload for call_vendor_request
add alias methods for hotkey requests ? perhaps this is not required...
This commit is contained in:
parent
42f78a2048
commit
0e39496c59
@ -75,7 +75,7 @@ class ReqClient:
|
|||||||
"""
|
"""
|
||||||
self.send("BroadcastCustomEvent", eventData)
|
self.send("BroadcastCustomEvent", eventData)
|
||||||
|
|
||||||
def call_vendor_request(self, vendorName, requestType, requestData=None):
|
def call_vendor_request(self, vendor_name, request_type, request_data=None):
|
||||||
"""
|
"""
|
||||||
Call a request registered to a vendor.
|
Call a request registered to a vendor.
|
||||||
|
|
||||||
@ -97,7 +97,10 @@ class ReqClient:
|
|||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return self.send(requestType, requestData)
|
payload = {"vendorName": vendor_name, "requestType": request_type}
|
||||||
|
if request_data:
|
||||||
|
payload["requestData"] = request_data
|
||||||
|
return self.send("CallVendorRequest", payload)
|
||||||
|
|
||||||
def get_hot_key_list(self):
|
def get_hot_key_list(self):
|
||||||
"""
|
"""
|
||||||
@ -110,6 +113,8 @@ class ReqClient:
|
|||||||
"""
|
"""
|
||||||
return self.send("GetHotkeyList")
|
return self.send("GetHotkeyList")
|
||||||
|
|
||||||
|
get_hotkey_list = get_hot_key_list
|
||||||
|
|
||||||
def trigger_hot_key_by_name(self, hotkeyName):
|
def trigger_hot_key_by_name(self, hotkeyName):
|
||||||
"""
|
"""
|
||||||
Triggers a hotkey using its name. For hotkey names
|
Triggers a hotkey using its name. For hotkey names
|
||||||
@ -123,6 +128,8 @@ class ReqClient:
|
|||||||
payload = {"hotkeyName": hotkeyName}
|
payload = {"hotkeyName": hotkeyName}
|
||||||
self.send("TriggerHotkeyByName", payload)
|
self.send("TriggerHotkeyByName", payload)
|
||||||
|
|
||||||
|
trigger_hotkey_by_name = trigger_hot_key_by_name
|
||||||
|
|
||||||
def trigger_hot_key_by_key_sequence(
|
def trigger_hot_key_by_key_sequence(
|
||||||
self, keyId, pressShift, pressCtrl, pressAlt, pressCmd
|
self, keyId, pressShift, pressCtrl, pressAlt, pressCmd
|
||||||
):
|
):
|
||||||
@ -155,6 +162,8 @@ class ReqClient:
|
|||||||
}
|
}
|
||||||
self.send("TriggerHotkeyByKeySequence", payload)
|
self.send("TriggerHotkeyByKeySequence", payload)
|
||||||
|
|
||||||
|
trigger_hotkey_by_key_sequence = trigger_hot_key_by_key_sequence
|
||||||
|
|
||||||
def sleep(self, sleepMillis=None, sleepFrames=None):
|
def sleep(self, sleepMillis=None, sleepFrames=None):
|
||||||
"""
|
"""
|
||||||
Sleeps for a time duration or number of frames.
|
Sleeps for a time duration or number of frames.
|
||||||
|
Loading…
Reference in New Issue
Block a user