Commit 2963b40f authored by Paul Weingardt's avatar Paul Weingardt

added getCurrentSession method

parent 690dfc0c
......@@ -19,8 +19,8 @@ import org.gitlab.api.models.GitlabNamespace;
import org.gitlab.api.models.GitlabNote;
import org.gitlab.api.models.GitlabProject;
import org.gitlab.api.models.GitlabProjectHook;
import org.gitlab.api.models.GitlabSession;
import org.gitlab.api.models.GitlabProjectMember;
import org.gitlab.api.models.GitlabSession;
/**
* Gitlab API Wrapper class
......@@ -322,4 +322,9 @@ public class GitlabAPI {
String tailUrl = GitlabNamespace.URL + "/" + namespaceId + GitlabProjectMember.URL;
return Arrays.asList(retrieve().to(tailUrl, GitlabProjectMember[].class));
}
public GitlabSession getCurrentSession() throws IOException {
String tailUrl = "/user";
return retrieve().to(tailUrl, GitlabSession.class);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment