npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

yama-open-sdk

v1.0.0

Published

- 使金服开放平台的签名逻辑透明 - 为请求结果报文提供反序列化

Downloads

3

Readme

sdk 概述

作用

  • 使金服开放平台的签名逻辑透明
  • 为请求结果报文提供反序列化

通信

OpenClient 底层使用 okhttp3 client,为了复用连接,整个 SDK 只会存在一个okhttp 的 client

使用案例

定制请求

针对一些业务方,我们会定制请求返回模型,方便接入者使用

        DriverLicenseRequest driverLicenseRequest = new DriverLicenseRequest();
        driverLicenseRequest.setName("盛超杰");
        driverLicenseRequest.setIdCard("test");
        OpenClient client = new OpenClient(Environment.TEST,"xxx","xxx");
        OpenResponseResult<DriverLicenseResponse> response = client.execute(driverLicenseRequest);
        System.out.println(JSON.toJSONString(response));

通用请求

如果暂时没有定制实现,那么可以根据接口文档,使用通用请求方式来调用接口

        CustomOpenRequestParam customOpenRequestParam = new CustomOpenRequestParam();
        customOpenRequestParam.setApi("com.souche.financeplatform.infocenter.api.facade.LicenseQueryFacade#queryDriverLicense");
        Map<String,Object> data = new HashMap<>();
        Map<String,Object> qry = new HashMap<>();
        qry.put("name","xxx");
        qry.put("idCard","xxx");
        data.put("licenseQueryQry", qry);
        customOpenRequestParam.setData(data);
        OpenClient client = new OpenClient(Environment.TEST,"xxx","xxx");
        OpenResponseResult<String> response = client.execute(customOpenRequestParam);
        System.out.println(JSON.toJSONString(response));

发送请求,指定超时时间(当前支持 connect time out 和 read time out)

        HttpClientConfig clientConfig = new HttpClientConfig();
        clientConfig.setReadTimeoutSeconds(20);
        clientConfig.setConnectTimeoutSeconds(20);
        OpenClient client = new OpenClient("http://localhost:8081/api","WWWWWWWWWWWWWWWWWWW","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",clientConfig);
        //...调用逻辑