tags:

views:

2149

answers:

4

Hello,

I am trying to use rapidshare apis but dont know exactly how to use it?

http://api.rapidshare.com/cgi-bin/rsapi.cgi?subroutine=getaccountdetails_v1&type=prem&login=MY_USERNAME&password=MY_PASSWORD

after using this i am getting error "ERROR: Subroutine invalid."

Can anybody tell me what is wrong with my link?

+3  A: 

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

click here

Ian Elliott
THANK YOU VERY MUCH
Shishant
A: 

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.

var validUntil = <valid_until_time>*1000;var time = new Date();var time.setDate(validUntil);alert(time.toGMTString);
Ian Elliott
A: 

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();
darkwader
Clearly the best post on stackoverflow. Solved all my problems as well!
f1sh
A: 

what is the separator char ??

emanuel