Created
January 29, 2015 17:41
-
-
Save gabhi/16370155eb7c1ec5f42b to your computer and use it in GitHub Desktop.
Walmart java api example usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.walmart.openapi.DataFeedManager; | |
public class MainApp { | |
public static void main(String[] args) throws Exception { | |
DataFeedManager dataFeedManager = new DataFeedManager("<insert your api key here>"); | |
DataFeedManager.FeedIterator feedIterator = dataFeedManager.getFeedIterator( | |
DataFeedManager.FeedsType.BESTSELLERS, "3944"); | |
int counter = 0; | |
while (feedIterator.hasNext()) { | |
counter = counter + 1; | |
System.out.println("==>" + feedIterator.next().getName()); | |
if (counter % 1000 == 0) | |
System.out.println("." + counter + "..."); | |
if (counter == 10000) { | |
break; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment