diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9854add --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "inwx"] + path = inwx + url = https://github.com/inwx/python2.7-client.git diff --git a/domain-check.py b/domain-check.py new file mode 100755 index 0000000..3995660 --- /dev/null +++ b/domain-check.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python +# -*- encoding: UTF8 -*- + +# author: InterNetworX, info →AT→ inwx.de + +############################################################################# +###### This is an example of how to use the inwx class ####### + +from inwx.inwx import domrobot, prettyprint, getOTP +from inwx.configuration import get_account_data + +def main(): + api_url, username, password, shared_secret = get_account_data(True, config_file='./conf.cfg', config_section="ote") + print("api url: " + api_url) + inwx_conn = domrobot(api_url, False) + loginRet = inwx_conn.account.login({'lang': 'de', 'user': username, 'pass': password}) + print(loginRet) + + if 'resData' in loginRet: + loginRet = loginRet['resData'] + # end if + + domain = "pgollor.de" + checkRet = inwx_conn.domain.check({'domain': domain}) + print(prettyprint.domain_check(checkRet)) +# end main + + +if __name__ == '__main__': + main() +# end if diff --git a/inwx b/inwx new file mode 160000 index 0000000..ba6aca6 --- /dev/null +++ b/inwx @@ -0,0 +1 @@ +Subproject commit ba6aca6982bd4b0099a0e33b10ac6f46cdb3fbf4