2017-02-16 42 views

回答

1

没有直接的API调用与评论一起导出到excel。导出项目和应用程序

有一个工作要做到这一点。 1.根据附加的代码进行评论API调用,您可以获得关于Item的所有评论,以便您可以以编程方式将它们导出到您的Excel中。

public class APICall implements Serializable { 
public static void main(String as[]){ 
    APICall apiObj = new APICall(); 
    apiObj.apicall(); 

}

/** 
* 
*/ 
public void apicall() 
{ 
    try{ 
    System.out.println("inside"); 
    ResourceFactory resourceFactory = new ResourceFactory(new OAuthClientCredentials("<WS NAME>","<Your authkey>"),new OAuthUsernameCredentials("<username>", "<Password>")); 
    CommentAPI capi = new CommentAPI(resourceFactory); 
    Reference ref= new Reference(ReferenceType.ITEM,561530318); 
    List<Comment> cmts = capi.getComments(ref); 
    for(Comment e : cmts) 
    System.out.println(e.getValue());