version the cli api part
This commit is contained in:
parent
2175ca16f2
commit
a563bffec5
8 changed files with 25 additions and 25 deletions
|
|
@ -12,7 +12,7 @@ def accountinfo():
|
|||
url = sys.argv[1].encode(encoding="utf-8")
|
||||
tk = sys.argv[2].encode(encoding="utf-8")
|
||||
|
||||
r = lib.cli_accountinfo(url, tk)
|
||||
r = lib.cliv0_accountinfo(url, tk)
|
||||
result = ffi.string(r)
|
||||
lib.FreeCString(r)
|
||||
print(result)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ def clearaccount():
|
|||
url = sys.argv[1].encode(encoding="utf-8")
|
||||
tk = sys.argv[2].encode(encoding="utf-8")
|
||||
|
||||
r = lib.cli_clearaccount(url, tk)
|
||||
r = lib.cliv0_clearaccount(url, tk)
|
||||
result = ffi.string(r)
|
||||
lib.FreeCString(r)
|
||||
print(result)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ def discoverhs(domain, show_json):
|
|||
"""Attempts to discover the homeserver from the given string"""
|
||||
mxid = domain.encode(encoding="utf-8")
|
||||
|
||||
r = lib.cli_discoverhs(mxid)
|
||||
r = lib.cliv0_discoverhs(mxid)
|
||||
result = ffi.string(r).decode("utf-8")
|
||||
lib.FreeCString(r)
|
||||
if result.startswith("ERR:"):
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ def mktoken():
|
|||
mxid = sys.argv[1].encode(encoding="utf-8")
|
||||
pw = sys.argv[2].encode(encoding="utf-8")
|
||||
|
||||
r = lib.cli_mkmxtoken(mxid, pw)
|
||||
r = lib.cliv0_mkmxtoken(mxid, pw)
|
||||
result = ffi.string(r)
|
||||
lib.FreeCString(r)
|
||||
print(result)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ def serverinfo():
|
|||
|
||||
mxdomain = sys.argv[1].encode(encoding="utf-8")
|
||||
|
||||
r = lib.cli_serverinfo(mxdomain)
|
||||
result = ffi.string(r)
|
||||
r = lib.cliv0_serverinfo(mxdomain)
|
||||
result = ffi.string(r).decode("utf-8")
|
||||
lib.FreeCString(r)
|
||||
print(result)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ def whoami():
|
|||
url = sys.argv[1].encode(encoding="utf-8")
|
||||
tk = sys.argv[2].encode(encoding="utf-8")
|
||||
|
||||
r = lib.cli_whoami(url, tk)
|
||||
r = lib.cliv0_whoami(url, tk)
|
||||
result = ffi.string(r)
|
||||
lib.FreeCString(r)
|
||||
print(result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue