-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #892 from octokit/haacked/meta-endpoint
Implement the Meta endpoint
- Loading branch information
Showing
13 changed files
with
136 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.Globalization; | ||
|
||
namespace Octokit | ||
{ | ||
/// <summary> | ||
/// Response from the /meta endpoint that provides information about GitHub.com or a GitHub Enterprise instance. | ||
/// </summary> | ||
[DebuggerDisplay("{DebuggerDisplay,nq}")] | ||
public class Meta | ||
{ | ||
public Meta() | ||
{ | ||
} | ||
|
||
public Meta( | ||
bool verifiablePasswordAuthentication, | ||
string gitHubServicesSha, | ||
IReadOnlyList<string> hooks, | ||
IReadOnlyList<string> git, | ||
IReadOnlyList<string> pages) | ||
{ | ||
VerifiablePasswordAuthentication = verifiablePasswordAuthentication; | ||
GitHubServicesSha = gitHubServicesSha; | ||
Hooks = hooks; | ||
Git = git; | ||
Pages = pages; | ||
} | ||
|
||
/// <summary> | ||
/// Whether authentication with username and password is supported. (GitHub Enterprise instances using CAS or | ||
/// OAuth for authentication will return false. Features like Basic Authentication with a username and | ||
/// password, sudo mode, and two-factor authentication are not supported on these servers.) | ||
/// </summary> | ||
public bool VerifiablePasswordAuthentication { get; private set; } | ||
|
||
/// <summary> | ||
/// The currently-deployed SHA of github-services. | ||
/// </summary> | ||
public string GitHubServicesSha { get; private set; } | ||
|
||
/// <summary> | ||
/// An Array of IP addresses in CIDR format specifying the addresses that incoming service hooks will | ||
/// originate from on GitHub.com. Subscribe to the API Changes blog or follow @GitHubAPI on Twitter to get | ||
/// updated when this list changes. | ||
/// </summary> | ||
public IReadOnlyList<string> Hooks { get; private set; } | ||
|
||
/// <summary> | ||
/// An Array of IP addresses in CIDR format specifying the Git servers for GitHub.com. | ||
/// </summary> | ||
public IReadOnlyList<string> Git { get; private set; } | ||
|
||
/// <summary> | ||
/// An Array of IP addresses in CIDR format specifying the A records for GitHub Pages. | ||
/// </summary> | ||
public IReadOnlyList<string> Pages { get; private set; } | ||
|
||
internal string DebuggerDisplay | ||
{ | ||
get | ||
{ | ||
return String.Format( | ||
CultureInfo.InvariantCulture, | ||
"GitHubServicesSha: {0}, VerifiablePasswordAuthentication: {1} ", | ||
GitHubServicesSha, | ||
VerifiablePasswordAuthentication); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters