g冒险rest api的python客户端

gapip的Python项目详细描述


快速启动

>>>fromgapipyimportClient>>>api=Client(application_key='MY_SECRET_KEY')>>># Get a resource by id>>>tour=api.tours.get(24309)>>>tour.product_lineu'AHEH'>>>tour.departures.count()134>>>dossier=tour.tour_dossier>>>dossier.nameu'Essential India'>>>itinerary=dossier.structured_itineraries[0]>>>{day.day:day.summaryfordayinitinerary.days[:3]}{1:u'Arrive at any time. Arrival transfer included through the G Adventures-supported Women on Wheels project.',2:u'Take a morning walk through the city with a young adult from the G Adventures-supported New Delhi Streetkids Project. Later, visit Old Delhi, explore the spice markets, and visit Jama Masjid and Connaught Place.',3:u"Arrive in Jaipur and explore this gorgeous 'pink city'."}>>># Create a new resource>>>booking=api.bookings.create({'currency':'CAD','external_id':'abc'})>>># Modify an existing resource>>>booking.external_id='def'>>>booking.save()

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java Webstart“javaws open”标志不适用于多个参数   java ArrayList声明和处理   获取数组中值的百分比(Java)   java将ArrayList转换为字符串以存储在共享首选项中   Java8Lambdas与泛型的结合使用   Scala数组到Java   如何使用java知道webcontainer的路径?   java使用“收集”和“合并”的组背后的算法是什么   java OSGi:在两个不同的包中具有相同的包路径   java混淆了swt画布。重画   java正则表达式,用于5位数逗号分隔的值,例如047000480004900   使用HttpClient显示非ASCI字符的java   水塔计算程序Java中球体体积的计算   java根据给定值调整框架中所有组件的大小   java Builder类中的其他方法(lombok注释)