项目

常规

个人资料

操作

使用Java的REST API

taskadapter提供的Redmine Java API库

Redmine Java API库 是一个免费的第三方Java库,可用于访问Redmine API。它遵循Apache 2开源许可证发布。
示例用法

    
    String uri = "https://www.hostedredmine.com";
    String apiAccessKey = "a3221bfcef5750219bd0a2df69519416dba17fc9";
    String projectKey = "taskconnector-test";
    Integer queryId = null; // any

    RedmineManager mgr = RedmineManagerFactory.createWithApiKey(uri, apiAccessKey);
    IssueManager issueManager = mgr.getIssueManager();
    List<Issue> issues = issueManager.getIssues(projectKey, queryId);
    for (Issue issue : issues) {
        System.out.println(issue.toString());
    }

    // Create issue
    Issue issueToCreate = IssueFactory.createWithSubject("some subject");
    Issue createdIssue = issueManager.createIssue(projectKey , issueToCreate);

    // Get issue by ID:
    Issue issue = issueManager.getIssueById(123);

Alex Last 更新 超过3年前 · 19次修订