Code Monkey home page Code Monkey logo

java-sdk's Introduction

java-sdk

惠农网给外部调用接口使用的java版本sdk

农技问答接口的使用方式

pom.xml里面引入依赖

    <dependency>
      <groupId>com.cnhnb.sdk</groupId>
      <artifactId>agricultural-module</artifactId>
      <version>0.0.2</version>
    </dependency>

接口方法:questionList 接口含义:获取前10热门品类行情

    //设置需要操作的账号的AK和SK
    String ACCESS_KEY = AgriculturalConstants.TEST_ACCESS_KEY;
    String SECRET_KEY = AgriculturalConstants.TEST_SECRET_KEY;

    HnOkHttpClient hnOkHttpClient = new HnOkHttpClient();
    AgriculturalHttpClient agriculturalHttpClient = new AgriculturalHttpClient(hnOkHttpClient);

    ShareInfo shareInfo = new ShareInfo();
    shareInfo.setStartTime("2020-06-11");
    shareInfo.setEndTime("2020-06-12");
    shareInfo.setNonce("abc");
    shareInfo.setPageNo(1);
    shareInfo.setPageSize(10);
    shareInfo.setPower("1");
    shareInfo.setSignAlgorithm("SHA-256");
    shareInfo.setTimestamp(1591932229714L);

    shareInfo.setAccessKey(ACCESS_KEY);
    shareInfo.setSecretKey(SECRET_KEY);

    BaseResult<List<QuestionAndAnswerShareInfo>> baseResult = agriculturalHttpClient
        .questionList(AgriculturalConstants.TEST_QUESTION_LIST_URL, shareInfo);

    System.out.println(baseResult.toString());

java-sdk's People

Contributors

dragontree101 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.