Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
opensipkd-tools
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0046a7f5
authored
Aug 20, 2022
by
aagusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
penambahan fungsi parsing url api
1 parent
447e55df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
opensipkd/tools/api.py
opensipkd/tools/api.py
View file @
0046a7f
...
...
@@ -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
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment