Package com.ebay.sdk.call

Examples of com.ebay.sdk.call.GetCategoryFeaturesCall


    this.FILE_PREFIX = "AllCatFeatures";
  }
 
  @Override
  protected String getLastUpdateTime() throws Exception {
    GetCategoryFeaturesCall api = new GetCategoryFeaturesCall(apiContext);
    GetCategoryFeaturesRequestType req = new GetCategoryFeaturesRequestType();
    //we only need 'UpdateTime' field
    //req.setOutputSelector(new String[]{"UpdateTime"});
    //workaround, use CategoryVersion instead of UpdateTime here
    req.setOutputSelector(new String[]{"CategoryVersion"});
    api.execute(req);
    GetCategoryFeaturesResponseType resp = (GetCategoryFeaturesResponseType) api.execute(req);
//    Date date = resp.getUpdateTime().getTime();
//    SimpleDateFormat df = new SimpleDateFormat("yyyy_MM_dd_hh_mm_ss");
//    String time = df.format(date);
    return resp.getCategoryVersion();
  }
View Full Code Here


  }

  @Override
  protected Object individualCall() throws Exception {
    //get all category features for a given site
      GetCategoryFeaturesCall apiCall = new GetCategoryFeaturesCall(apiContext);
      FeatureIDCodeType[] featureIds = new FeatureIDCodeType[]{
          FeatureIDCodeType.LISTING_DURATIONS,
          FeatureIDCodeType.ITEM_SPECIFICS_ENABLED,
          FeatureIDCodeType.RETURN_POLICY_ENABLED,
          FeatureIDCodeType.PAYMENT_METHODS,
          FeatureIDCodeType.CONDITION_ENABLED,
          FeatureIDCodeType.CONDITION_VALUES
      };
      apiCall.setFeatureIDs(featureIds);

      // Set detail level.
      DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {DetailLevelCodeType.RETURN_ALL};
      apiCall.setDetailLevel(detailLevels);
      apiCall.setViewAllNodes(true);
      //execute call
      apiCall.getCategoryFeatures();
      return apiCall.getResponseObject();
  }
View Full Code Here

       _categoryVersionsBySite.put(_site, _categoryVersion);
     }
   }
  
   private void getCategoryFeatures() throws SdkException, Exception {
     GetCategoryFeaturesCall api = new GetCategoryFeaturesCall(_apiContext);
     DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {DetailLevelCodeType.RETURN_ALL};
     api.setDetailLevel(detailLevels);
     api.setCategoryID(_categoryID);
     api.setLevelLimit(_levelLimit);
     api.setViewAllNodes(_viewAllNodes);
     api.setFeatureIDs(_featureIDs);

     // Make API call.
     api.getCategoryFeatures();
     _categoryFeatures = api.getReturnedCategory();
     _categoryVersion = api.getReturnedCategoryVersion();
     _siteDefaults = api.getReturnedSiteDefaults();
     _siteFeatures = api.getReturnedFeatureDefinitions();
   }
View Full Code Here

TOP

Related Classes of com.ebay.sdk.call.GetCategoryFeaturesCall

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.