aboutsummaryrefslogtreecommitdiff
path: root/ParrotProtocol.py
diff options
context:
space:
mode:
Diffstat (limited to 'ParrotProtocol.py')
-rw-r--r--ParrotProtocol.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/ParrotProtocol.py b/ParrotProtocol.py
index 9324b8b..1973ba0 100644
--- a/ParrotProtocol.py
+++ b/ParrotProtocol.py
@@ -1,19 +1,19 @@
#!/usr/bin/env python
def generateRequest(requestString):
- message=bytearray()
- message.extend(generateHeader(requestString))
- message.extend(bytearray(requestString))
- return message
+ message=bytearray()
+ message.extend(generateHeader(requestString))
+ message.extend(bytearray(requestString))
+ return message
def generateHeader(requestString):
- header = bytearray([0])
- header.append(len(requestString)+3)
- header.append("\x80")
- return header
+ header = bytearray([0])
+ header.append(len(requestString)+3)
+ header.append("\x80")
+ return header
def getRequest(apiString):
- return generateRequest("GET "+apiString)
+ return generateRequest("GET "+apiString)
def setRequest(apiString,args):
- return generateRequest("SET "+apiString+"?arg="+args) \ No newline at end of file
+ return generateRequest("SET "+apiString+"?arg="+args)