azd library helps to manage Azure DevOps REST API on ease. This provides functionality to the significant services in Azure DevOps and manage in granular level.
You can view the blog post for details about the library.
Download the sdk from here and here.
- Get the list of projects for your organisation
public class Main {
public static void main(String[] args) {
String organisation = "myOrganisationName";
String personalAccessToken = "accessToken";
// instantiate AzDDefaultParameters with organisation name, project and personal access token.
AzDDefaultParameters defaultParameters = new AzDDefaultParameters(organisation, personalAccessToken);
// call API with the default parameters;
Core core = new Core(defaultParameters);
try {
// get the list of projects
core.getProjects();
// create a new project
core.createProject("my-new-project", "Finance management");
// create a team in the project
core.createTeam("my-new-project", "my-new-team");
// list all the teams
core.getTeams();
} catch (IOException | DefaultParametersException e1) {
e1.printStackTrace();
}
}
}
NAME | VERSION |
---|---|
com.fasterxml.jackson.core | v2.12.0 |
You are going to need JDK version 11 or above and can be downloaded from here.
Download Maven from the official website. Once it is installed add JAVA_HOME
to the path as Maven is
going to need it. You can check if Maven is installed correctly by running mvn -v
.
Once you have installed JDK
and Maven
you can then,
Clone the repository and navigate to root of the folder where pom.xml
is placed.
- Run
mvn clean
to clean the target folder if any exists - Update
_unitTest.json
with your organisation name, project name and personal access token. - Run
mvn test
to run unit tests - Run
mvn package
to install the dependencies and create the resultant.jar
file.
This project is licensed under MIT