mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-16 15:51:16 +00:00
Chore: Add method to get a discussion using a number/id
This commit is contained in:
@@ -147,6 +147,25 @@ public class GHTeam extends GHObject implements Refreshable {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single discussion by ID.
|
||||
*
|
||||
* @param discussionId
|
||||
* id of the discussion that we want to query for
|
||||
* @return the discussion
|
||||
* @throws IOException
|
||||
* the io exception
|
||||
*
|
||||
* @see <a href= "https://developer.github.com/v3/teams/discussions/#get-a-discussion">documentation</a>
|
||||
*/
|
||||
public GHDiscussion getDiscussion(String discussionId) throws IOException {
|
||||
return root.createRequest()
|
||||
.withUrlPath("/orgs/" + this.getOrganization().getLogin() + "/teams/" + this.getSlug() + "/discussions/"
|
||||
+ discussionId)
|
||||
.fetch(GHDiscussion.class)
|
||||
.wrapUp(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the current members.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user