Subversion Repositories SmartDukaan

Rev

Rev 2739 | Rev 2793 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2739 Rev 2775
Line 35... Line 35...
35
	        }
35
	        }
36
	      }
36
	      }
37
	    }
37
	    }
38
 
38
 
39
	
39
	
40
	public void fetchAndStoreComparisonStats(){
40
	public void fetchAndStoreComparisonStats(long fromDate, long toDate){
-
 
41
		String requestParameters = "fromdate=" +  fromDate + "&todate=" + toDate;
41
		String data = ComparisonStatsFetcher.sendGetRequest(GOOGLE_COMPARE_DATA_URL, null);
42
		String data = ComparisonStatsFetcher.sendGetRequest(GOOGLE_COMPARE_DATA_URL, requestParameters);
42
		try {
43
		try {
43
			JSONObject json = new JSONObject(data);
44
			JSONObject json = new JSONObject(data);
44
			Map<Long, Map<Long, Long>> comparisonStats = new HashMap<Long, Map<Long, Long>>();
45
			Map<Long, Map<Long, Long>> comparisonStats = new HashMap<Long, Map<Long, Long>>();
45
			
46
			
46
			for (String itemId : JSONObject.getNames(json)) {
47
			for (String itemId : JSONObject.getNames(json)) {