Example #1
0
# Author: Umut Boz
# Copyright (c) 2020, OneframeMobile, KoçSistem
# Email: [email protected]
############################################################
# Version: 0.1.0
############################################################
from lib.enums import MessageType
from lib.enums import CodeLine
from lib.log import Log
from lib.environment import Environment
from lib.httpOperation3 import HttpOperation3

MESSAGE = MessageType()

CODE = CodeLine()

# close log
Environment.Shared().online()

url = "https://petstore.swagger.io/v2/swagger.json"

op = HttpOperation3()
jsonData = op.request(url=url).jsonParse()

op2 = HttpOperation3(url=url)
jsonData = op2.request().jsonParse()

op3 = HttpOperation3()
print(op3.fetch(url=url))

print(jsonData["swagger"])
Example #2
0
#path param ile verilen path üzerine dosya oluşturulur.
#op.createFile(path="lib",fileName="test.swift",content="hello")

#init de verilen default path üzerine klasör oluşturulur.
#op.createFolder(folderName="hello/1")

#path is valid
#print(op.isExist("/Users/umut/Desktop/Architecture/CodeGenerationCore/lib"))

#append file add content
#op.appendFile(fileName="test.swift",content="\nworld")

#loglar kapali artik
#Environment.Shared().online()

print(type(Environment.Shared().online()))

#remove file
#op.removeFile(fileName=fileName)
#op.createFile(fileName=fileName, content="hello")

#print(MESSAGE.ERROR)
#print(DEV_ENV.LOCAL)
#print(CODE.SLASH)

#log samples
#Log.i(message=MESSAGE.INFO)
#Log.s(MESSAGE.SUCCESS)
#Log.e(MESSAGE.ERROR)