This is a .NET library that makes REST calls to the ZenHub API. More information about the ZenHub API is can be found here.
In order for the calls to be authorized with ZenHub, you first need to get an authentication token from ZenHub. To do so, please visit the ZenHub token page
Once you have a token, constructing the client is done this way:
ZenHubClientzenhubClient=newZenHubClient("<token>");The operations on the client are split depending on what they are operating on. Please see below for more details about each of the clients
To interact with ZenHub at the repository level, you would use the Repository client.
You can create a ZenHubRepositoryClient from a ZenHubClient by specifying the repository id, or a Octokit.Repository object.
ZenHubClientzenhubClient=newZenHubClient("<token>");// Using the repoId directlylongrepoId=1234;ZenHubRepositoryClientrepoClient=zenhubClient.GetRepositoryClient(repoId);// Using the Octokit objectRepositoryrepo= ...;ZenHubRepositoryClientrepoClient=zenhubClient.GetRepositoryClient(repo);To interact with ZenHub at the issue level, you would use the Issue client.
You can create a ZenHubIssueClient from a ZenHubClient by specifying the repository id and issue number, or a Octokit.Issue object.
ZenHubClientzenhubClient=newZenHubClient("<token>");// Using the repoId directlylongrepoId=1234;intissueNumber=456;ZenHubIssueClientrepoClient=zenhubClient.GetIssueClient(repoId,issueNumber);// Using the Octokit objectIssueissue= ...;ZenHubIssueClientrepoClient=zenhubClient.GetIssueClient(issue);To interact with ZenHub at the epic level, you would use the Epic client.
You can create a ZenHubEpicClient from a ZenHubClient by specifying the repository id and issue number, or a Octokit.Issue object.
ZenHubClientzenhubClient=newZenHubClient("<token>");// Using the repo Id and the epic numberlongrepoId=1234;intepicNumber=456;ZenHubEpicClientrepoClient=zenhubClient.GetEpicClient(repoId,epicNumber);// Using the Octokit objectIssueepic= ...;ZenHubEpicClientrepoClient=zenhubClient.GetEpicClient(epic);To interact with ZenHub at the release level, you would use the Release client.
ZenHubClientzenhubClient=newZenHubClient("<token>");stringreleaseId="releaseId";ZenHubReleaseClientrepoClient=zenhubClient.GetReleaseClient(releaseId);