The logic and data used by
all inflation calculators are also exposed as web services, that let you calculate inflation, its influence over prices and Ruble buying power.
The data is updated regularly so the webservices are always showing the most recent data.
The web services are provided as is and free of charge with the following restrictions:
1. For non-commercial use
2. If you link back to this site. Example: <a href="http://inflationinrussia.com">inflationinrussia.com</a>
Inflation Calculation
Returns the Inflation in % between the start of startMonth and start of endMonth.
Signature:
decimal GetInflation(DateTime startMonth, DateTime endMonth)
Price Change Calculation
Returns the price affected by the inflation between the start of startMonth and
start of endMonth.
Signature:
decimal GetPriceChange(decimal startAmount, DateTime startMonth, DateTime endMonth, bool applyDenominationOf1998)
Ruble Purchase Power Change Calculation
Returns the change of the Ruble amount value as a result of the inflation between the start of startMonth and start of endMonth.
Signature:
decimal GetValueChange(decimal startAmount, DateTime startMonth, DateTime endMonth, bool applyDenominationOf1998)
Support Web Methods
Return First and Last months we have data for.
Signature:
DateTime GetFirstMonth()
DateTime GetLastMonth()
Web Service Descriptiopn
Web services are provided via two standard protocols - SAOP and JSON.
SOAP description:
All inflation web services are described in details on this page:
http://inflationinrussia.com/DesktopModules/WebServices.asmx
Wsdl reference needed to consume the web services is available at:
http://inflationinrussia.com/DesktopModules/WebServices.asmx?WSDL
JSON Urls:
/DesktopModules/WebServices.asmx/GetInflation
/DesktopModules/WebServices.asmx/GetPriceChange
/DesktopModules/WebServices.asmx/GetValueChange
/DesktopModules/WebServices.asmx/GetFirstMonth
/DesktopModules/WebServices.asmx/GetLastMonth
Examples - using the JSON Web Services from Javascript / jquery:
// Getting inflation
$(document).ready(function() {
$.ajax({
'type': 'POST',
'contentType': 'application/json; charset=utf-8',
'url' : '/DesktopModules/WebServices.asmx/GetInflation',
'dataType' : 'json',
'data' : '{startMonth: \'' + '2010/01/01Z' + '\', endMonth : \'' + '2010/05/01Z'
+'\' }',
'async' : false,
'success' : function (m) {
alert(m.d);
}
});
});
// Getting first Month we have data for:
$(document).ready(function() {
$.ajax({
'type': 'POST',
'contentType': 'application/json; charset=utf-8',
'url' : '/DesktopModules/WebServices.asmx/GetFirstMonth',
'dataType' : 'json',
'data' : { },
'async' : false,
'success' : function (m) {
alert(eval('new ' + m.d.slice(1, -1)));
}
});
});