Commit 0046a7f5 by aagusti

penambahan fungsi parsing url api

1 parent 447e55df
......@@ -380,3 +380,18 @@ def json_serial(obj):
if isinstance(obj, (datetime, date)):
return obj.isoformat()
raise TypeError("Type %s not serializable" % type(obj))
def pars_rpc_url(params, method=None):
values = params.split("@")
user, key = values[0].split(":")
url = values[1]
resp = dict(
url=url,
user=user,
key=key
)
if method:
resp["method"] = method
return resp
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!