本文整理汇总了Python中API.API.registerFunc方法的典型用法代码示例。如果您正苦于以下问题:Python API.registerFunc方法的具体用法?Python API.registerFunc怎么用?Python API.registerFunc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类API.API
的用法示例。
在下文中一共展示了API.registerFunc方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: API
# 需要导入模块: from API import API [as 别名]
# 或者: from API.API import registerFunc [as 别名]
import requests as r
import constants
import sys
import os
from API import API
# Program metadata
version = "version 0.01"
size = os.get_terminal_size()
w = size.columns
# API variebles
apis = []
googleMaps = API("Google Maps API", 1.0, "a", constants.JAVASCRIPT, constants.EMBED, constants.API_KEY)
apis.append(googleMaps)
googleMaps.registerFunc("Standard Map", "The standard google map", "googleMaps\\android\\hello.java")
googleMaps.registerFunc("Std. Map w/ marker", "Map with custom marker text", "googleMaps\\android\\hellomarker.java")
googleMaps.registerFunc("Map types", "Map with choice of types", "googleMaps\\android\\type.java")
googleMaps.registerFunc("Map w/ custom markers", "Map with custom marker image", "googleMaps\\android\\markerimage.java")
googleMaps.registerFunc("Map w/ flat markers", "Map w/ flat marker img that rotate w/ prespective", "googleMaps\\android\\markerflat.java")
#googleMaps.printFuncs()
def startup():
print("=" * w)
print(" " * int(w/2-4) + "motherApi")
print(" " * int(w/2-6) + "By Jake Irvine")
print(" " * int(w/2-5) + version)
print(" " * int(w/2-12) + "Testing Internet Connectivity:")
try:
res = r.get("http://www.google.com")
except("*"):