@Path(value="api/v1")
 @Produces(value="application/json")
 @Consumes(value="application/json")
public interface GitApi
| Modifier and Type | Method and Description | 
|---|---|
| RepositoryDTO | createRepository(CreateRepositoryDTO dto) | 
| WebHookDTO | createWebhook(String owner,
             String repo,
             CreateWebhookDTO dto) | 
| RepositoryDTO | getOrganisationRepository(String organisation,
                         String repo) | 
| InputStream | getRawFile(String username,
          String repo,
          String branch,
          String path)Returns the raw file for the given username, repo, branch/ref and file path | 
| RepositoryDTO | getRepository(String owner,
             String repo) | 
| List<WebHookDTO> | getWebhooks(String owner,
           String repo) | 
| List<RepositoryDTO> | listOrganisationRepositories(String organisation) | 
| List<RepositoryDTO> | listRepositories() | 
| List<OrganisationDTO> | listUserOrganisations() | 
@GET @Path(value="user/repos") List<RepositoryDTO> listRepositories()
@GET @Path(value="user/orgs") List<OrganisationDTO> listUserOrganisations()
@GET
 @Path(value="orgs/{org}/repos")
List<RepositoryDTO> listOrganisationRepositories(@PathParam(value="org")
                                                                                       String organisation)
@GET
 @Path(value="orgs/{org}/repos/{repo}")
RepositoryDTO getOrganisationRepository(@PathParam(value="org")
                                                                                     String organisation,
                                                                                     @PathParam(value="repo")
                                                                                     String repo)
@POST @Path(value="user/repos") RepositoryDTO createRepository(CreateRepositoryDTO dto)
@GET
 @Path(value="repos/{owner}/{repo}")
RepositoryDTO getRepository(@PathParam(value="owner")
                                                                      String owner,
                                                                      @PathParam(value="repo")
                                                                      String repo)
@GET
 @Path(value="repos/{username}/{repo}/raw/{branch}/{path:.*}")
InputStream getRawFile(@PathParam(value="username")
                                                                                           String username,
                                                                                           @PathParam(value="repo")
                                                                                           String repo,
                                                                                           @PathParam(value="branch")
                                                                                           String branch,
                                                                                           @PathParam(value="path")
                                                                                           String path)
@GET
 @Path(value="repos/{owner}/{repo}/hooks")
List<WebHookDTO> getWebhooks(@PathParam(value="owner")
                                                                             String owner,
                                                                             @PathParam(value="repo")
                                                                             String repo)
@POST
 @Path(value="repos/{owner}/{repo}/hooks")
WebHookDTO createWebhook(@PathParam(value="owner")
                                                                          String owner,
                                                                          @PathParam(value="repo")
                                                                          String repo,
                                                                          CreateWebhookDTO dto)
Copyright © 2011–2016 Red Hat. All rights reserved.