Skip to content
Snippets Groups Projects
Commit 2500d009 authored by Jawnnypoo's avatar Jawnnypoo
Browse files

Add get tags to API

parent 939e7dd4
No related branches found
No related tags found
No related merge requests found
Pipeline #
Loading
Loading
@@ -21,6 +21,7 @@ import com.commit451.gitlab.model.api.RepositoryCommit;
import com.commit451.gitlab.model.api.RepositoryFile;
import com.commit451.gitlab.model.api.RepositoryTreeObject;
import com.commit451.gitlab.model.api.Snippet;
import com.commit451.gitlab.model.api.Tag;
import com.commit451.gitlab.model.api.Todo;
import com.commit451.gitlab.model.api.User;
import com.commit451.gitlab.model.api.UserBasic;
Loading
Loading
@@ -426,4 +427,8 @@ public interface GitLab {
 
@GET
Call<List<Todo>> getTodosByUrl(@Url String url);
/* --- TAGS --- */
@GET(API_VERSION + "/projects/{id}/repository/tags")
Call<List<Tag>> getTags(@Path("id") long projectId);
}
\ No newline at end of file
package com.commit451.gitlab.model.api;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
/**
* A tag in Git
*/
@JsonObject
public class Tag {
@JsonField(name = "name")
String mName;
@JsonField(name = "message")
String mMessage;
@JsonField(name = "commit")
Commit mCommit;
@JsonField(name = "release")
Release mRelease;
protected Tag() {
}
public String getName() {
return mName;
}
public String getMessage() {
return mMessage;
}
public Commit getCommit() {
return mCommit;
}
public Release getRelease() {
return mRelease;
}
@JsonObject
public static class Commit {
@JsonField(name = "id")
String mId;
@JsonField(name = "message")
String mMessage;
}
@JsonObject
public static class Release {
@JsonField(name = "tag_name")
String mTagName;
@JsonField(name = "description")
String mDescription;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment