package box;
import tool.getdata;
public class pro {
String urlx;
String[] data=new String[5000];
int s,datanumber;
String str,strx,key;
int p1,p2;
public static void main(String[] args) {
pro test=new pro();
}
pro(){
key="qglilwchwm6gvmvfx395xo8k4x36ihb6";
urlx="https://www.box.net/api/1.0/rest?action=get_ticket&api_key=";
urlx=urlx+key;
getdata sub=new getdata();
sub.makedata(urlx,"UTF-8");
data=sub.data;
datanumber=sub.datanumber;
str="";
for(s=1;s<datanumber+1;s++){
str=str+data[s];
}
p1=str.indexOf("<ticket>");
p2=str.indexOf("</ticket>");
strx=str.substring(p1,p2);
strx=strx.replace("<ticket>","");
urlx="https://www.box.net/api/1.0/rest?action=get_auth_token&api_key="+key;
urlx=urlx+"&ticket="+strx;
System.out.println(urlx);
getdata sub2=new getdata();
sub2.makedata(urlx,"UTF-8");
data=sub2.data;
datanumber=sub2.datanumber;
for(s=1;s<datanumber+1;s++){
System.out.println(data[s]);
}
}
}
最終更新:2013年10月07日 19:40