Problem with java sample

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sorcerer1980
    Junior Member
    • Jul 2011
    • 5

    #1

    Problem with java sample

    Hi,

    I have executed the Java Json RPC sample for ApiNG. It is running, but I do not get runner Information with listMarketCatalogue, although the sample adds RUNNER_DESCRIPTION to the marketProjection. I wonder why the sample does not add any Information from marketProjection to the params of the request. Is this correct? Did someone get runner Information with the Java sample?

    Thanks for any hint.

    Simon
  • gus
    Senior Member
    • Jan 2009
    • 134

    #2
    If you're talking about Horse Races and the information you're after is stuff like the Silks, weight, jockey etc, you need to ask for RUNNER_METADATA as well as RUNNER_DESCRIPTION.

    So my REST query to listMarketCatalogue looks like this:

    {"sort":"FIRST_TO_START","marketProjection":["MARKET_START_TIME","RUNNER_DESCRIPTION","EVENT_TY PE","RUNNER_METADATA","MARKET_DESCRIPTION"],"maxResults":16,"filter"{"eventIds":["27222128"]}}

    Comment

    • Sorcerer1980
      Junior Member
      • Jul 2011
      • 5

      #3
      There are two Statements missing in the Java sample, in class ApiNgJsonRpcOperations:

      public List<MarketBook> listMarketBook(List<String> marketIds, PriceProjection priceProjection, OrderProjection orderProjection,
      MatchProjection matchProjection, String currencyCode, String appKey, String ssoId) throws APINGException {
      Map<String, Object> params = new HashMap<String, Object>();
      params.put(LOCALE, this.locale);
      params.put(MARKET_IDS, marketIds);
      // Put price projection too
      params.put("priceProjection", priceProjection);
      public List<MarketCatalogue> listMarketCatalogue(MarketFilter filter, Set<MarketProjection> marketProjection,
      MarketSort sort, String maxResult, String appKey, String ssoId) throws APINGException {
      Map<String, Object> params = new HashMap<String, Object>();
      params.put(LOCALE, this.locale);
      params.put(FILTER, filter);
      params.put(SORT, sort);
      params.put(MAX_RESULT, maxResult);
      // Put market projection too
      params.put("marketProjection", marketProjection);

      Comment

      Working...
      X