Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import app.pars
- from base64 import b64decode
- class api:
- def __init__(self, config):
- '''Read config'''
- self.user = config["auth"]["username"]
- self.password = (b64decode(config["auth"]["password"])).decode("utf-8")
- self.page_id = config["page"]["page_id"]
- self.space = config["page"]["space"]
- self.title = config["page"]["title"]
- config = api({"auth": {
- "username": "msmirnov",
- "password": ""},
- "page": {
- "space": "SIEM",
- "title": "TEST",
- "page_id": "917899782"}})
- config2 = api({"auth": {
- "username": "msmirnov",
- "password": ""},
- "page": {
- "space": "SIEM",
- "title": "TEST",
- "page_id": "918881867"}})
- data = {"key": "get_all", "params":{}}
- app.pars.return_param(data, config)
- app.pars.return_param(data, config2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement