Hello,
I am trying to use rapidshare apis but dont know exactly how to use it?
after using this i am getting error "ERROR: Subroutine invalid."
Can anybody tell me what is wrong with my link?
Hello,
I am trying to use rapidshare apis but dont know exactly how to use it?
after using this i am getting error "ERROR: Subroutine invalid."
Can anybody tell me what is wrong with my link?
The problem is although the API defines the subroutine as
subroutine=getaccountdetails_v1
what it actually requires is
sub=getaccountdetails_v1
. This applies for all the subroutine calls.
This should work
http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=getaccountdetails_v1&type=prem&login=MY_USERNAME&password=MY_PASSWORD
I have another question, when I retrieve response from that query, among other variables, I get .............. validuntil=1251783433.........., which should tell me the exact expiration date. My question is how to convert this integer to normal date time format.
double timestamp = 1258540913;
// First make a System.DateTime equivalent to the UNIX Epoch.
System.DateTime dateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
// Add the number of seconds in UNIX timestamp to be converted.
dateTime = dateTime.AddSeconds(timestamp);
// The dateTime now contains the right date/time so to format the string,
// use the standard formatting methods of the DateTime object.
string printDate = dateTime.ToShortDateString() + " " + dateTime.ToShortTimeString();
// Print the date and time
Console.WriteLine(printDate);
Console.ReadKey();