mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 03:16:11 +00:00
88 lines
4.0 KiB
C#
88 lines
4.0 KiB
C#
#if NET_45
|
|
using System.Threading.Tasks;
|
|
using System.Collections.Generic;
|
|
#endif
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace Octokit
|
|
{
|
|
/// <summary>
|
|
/// A client for GitHub's miscellaneous APIs.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/misc/">Miscellaneous API documentation</a> for more details.
|
|
/// </remarks>
|
|
public interface IMiscellaneousClient
|
|
{
|
|
/// <summary>
|
|
/// Gets all the emojis available to use on GitHub.
|
|
/// </summary>
|
|
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
|
/// <returns>An <see cref="IReadOnlyDictionary{TKey,TValue}"/> of emoji and their URI.</returns>
|
|
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
|
|
Task<IReadOnlyList<Emoji>> GetAllEmojis();
|
|
|
|
/// <summary>
|
|
/// Gets the rendered Markdown for the specified plain-text Markdown document.
|
|
/// </summary>
|
|
/// <param name="markdown">A plain-text Markdown document</param>
|
|
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
|
/// <returns>The rendered Markdown.</returns>
|
|
Task<string> RenderRawMarkdown(string markdown);
|
|
|
|
/// <summary>
|
|
/// Gets the rendered Markdown for an arbitrary markdown document.
|
|
/// </summary>
|
|
/// <param name="markdown">An arbitrary Markdown document</param>
|
|
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
|
/// <returns>The rendered Markdown.</returns>
|
|
Task<string> RenderArbitraryMarkdown(NewArbitraryMarkdown markdown);
|
|
|
|
/// <summary>
|
|
/// List all templates available to pass as an option when creating a repository.
|
|
/// </summary>
|
|
/// <returns>A list of template names</returns>
|
|
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
|
|
Task<IReadOnlyList<string>> GetAllGitIgnoreTemplates();
|
|
|
|
/// <summary>
|
|
/// Retrieves the source for a single GitIgnore template
|
|
/// </summary>
|
|
/// <param name="templateName"></param>
|
|
/// <returns>A template and its source</returns>
|
|
Task<GitIgnoreTemplate> GetGitIgnoreTemplate(string templateName);
|
|
|
|
/// <summary>
|
|
/// Returns a list of the licenses shown in the license picker on GitHub.com. This is not a comprehensive
|
|
/// list of all possible OSS licenses.
|
|
/// </summary>
|
|
/// <remarks>This is a PREVIEW API! Use it at your own risk.</remarks>
|
|
/// <returns>A list of licenses available on the site</returns>
|
|
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
|
|
Task<IReadOnlyList<LicenseMetadata>> GetAllLicenses();
|
|
|
|
/// <summary>
|
|
/// Retrieves a license based on the license key such as "mit"
|
|
/// </summary>
|
|
/// <param name="key"></param>
|
|
/// <returns>A <see cref="License" /> that includes the license key, text, and attributes of the license.</returns>
|
|
Task<License> GetLicense(string key);
|
|
|
|
/// <summary>
|
|
/// Gets API Rate Limits (API service rather than header info).
|
|
/// </summary>
|
|
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
|
/// <returns>An <see cref="MiscellaneousRateLimit"/> of Rate Limits.</returns>
|
|
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
|
|
Task<MiscellaneousRateLimit> GetRateLimits();
|
|
|
|
/// <summary>
|
|
/// Retrieves information about GitHub.com, the service or a GitHub Enterprise installation.
|
|
/// </summary>
|
|
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
|
/// <returns>An <see cref="Meta"/> containing metadata about the GitHub instance.</returns>
|
|
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
|
|
Task<Meta> GetMetadata();
|
|
}
|
|
}
|