下载地址

https://gitee.com/piaoniu/piaoniu-opensdk/blob/master/README.md

使用方式

  1. 创建PNApi对象,填入接口地址,appId,secretKey
PNApi pnApi = new PNApi("http://openapi.beta.piaoniu.com", "appId", "secretKey");
  1. 构建对应API的Request,填充业务参数
QureyActivitiesRequest qureyActivitiesRequest = new QureyActivitiesRequest();
qureyActivitiesRequest.setCityId(1);
qureyActivitiesRequest.setPageIndex(6);
qureyActivitiesRequest.setPageSize(100);
  1. 执行接口调用,获取结果
QueryActivitiesResponse response = pnApi.execute(qureyActivitiesRequest);

API的Request和Response对应表

接口名称 Request Response
演出及商品信息查询 QureyActivitiesRequest QueryActivitiesResponse
单个演出及商品信息查询 QueryActivityDetailRequest QueryActivityDetailResponse
商品库存及价格查询 QueryStockAndPriceRequest QueryStockAndPriceResponse
创建订单 CreateOrderRequest CreateOrderResponse
支付订单 PayOrderRequest PayOrderResponse
取消订单 CancelOrderRequest CancelOrderResponse
查询订单 QueryOrderRequest QueryOrderResponse
城市列表 QueryCitiesRequest QueryCitiesResponse
演出类目查询 QueryActivityCategoriesRequest QueryActivityCategoriesResponse
场馆查询 QueryVenueRequest QueryVenueResponse
行政区查询 QueryDistrictsRequest QueryDistrictsResponse

变更历史

name 时间 内容
v1.0 2019-06-17 统一了对外输出格式

常见问题

  1. 超时时间怎么设置?
PNApi pnApi = new PNApi("http://openapi.beta.piaoniu.com", "appId", "secretKey");
HttpProperties httpProperties = new HttpProperties();
// 连接超时时间,单位ms
httpProperties.setConnectTimeout(5000);
// 读取超时时间,单位ms
httpProperties.setReadTimeout(5000);
pnApi.setHttpProperties(httpProperties);

results matching ""

    No results matching ""