Class MiscellaneousClient
Inheritance
Inherited Members
Namespace: Dangl.GiteaOrgManager.Client
Assembly: Dangl.GiteaOrgManager.dll
Syntax
public class MiscellaneousClient
Constructors
| Improve this Doc View SourceMiscellaneousClient(String, HttpClient)
Declaration
public MiscellaneousClient(string baseUrl, HttpClient httpClient)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | baseUrl | |
| System.Net.Http.HttpClient | httpClient |
Properties
| Improve this Doc View SourceBaseUrl
Declaration
public string BaseUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
JsonSerializerSettings
Declaration
protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
| Type | Description |
|---|---|
| Newtonsoft.Json.JsonSerializerSettings |
ReadResponseAsString
Declaration
public bool ReadResponseAsString { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
| Improve this Doc View SourceGetGitignoreTemplateInfoAsync(String)
Returns information about a gitignore template
Declaration
public virtual Task<GitignoreTemplateInfo> GetGitignoreTemplateInfoAsync(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | name of the template |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GitignoreTemplateInfo> | GitignoreTemplateInfo |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
GetGitignoreTemplateInfoAsync(String, CancellationToken)
Returns information about a gitignore template
Declaration
public virtual async Task<GitignoreTemplateInfo> GetGitignoreTemplateInfoAsync(string name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | name of the template |
| System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GitignoreTemplateInfo> | GitignoreTemplateInfo |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
GetLabelTemplateInfoAsync(String)
Returns all labels in a template
Declaration
public virtual Task<ICollection<LabelTemplate>> GetLabelTemplateInfoAsync(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | name of the template |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.ICollection<LabelTemplate>> | LabelTemplateInfo |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
GetLabelTemplateInfoAsync(String, CancellationToken)
Returns all labels in a template
Declaration
public virtual async Task<ICollection<LabelTemplate>> GetLabelTemplateInfoAsync(string name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | name of the template |
| System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.ICollection<LabelTemplate>> | LabelTemplateInfo |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
GetLicenseTemplateInfoAsync(String)
Returns information about a license template
Declaration
public virtual Task<LicenseTemplateInfo> GetLicenseTemplateInfoAsync(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | name of the license |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<LicenseTemplateInfo> | LicenseTemplateInfo |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
GetLicenseTemplateInfoAsync(String, CancellationToken)
Returns information about a license template
Declaration
public virtual async Task<LicenseTemplateInfo> GetLicenseTemplateInfoAsync(string name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | name of the license |
| System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<LicenseTemplateInfo> | LicenseTemplateInfo |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
GetNodeInfoAsync()
Returns the nodeinfo of the Gitea application
Declaration
public virtual Task<NodeInfo> GetNodeInfoAsync()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<NodeInfo> | NodeInfo |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
GetNodeInfoAsync(CancellationToken)
Returns the nodeinfo of the Gitea application
Declaration
public virtual async Task<NodeInfo> GetNodeInfoAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<NodeInfo> | NodeInfo |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
GetSigningKeyAsync()
Get default signing-key.gpg
Declaration
public virtual Task<string> GetSigningKeyAsync()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> | GPG armored public key |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
GetSigningKeyAsync(CancellationToken)
Get default signing-key.gpg
Declaration
public virtual async Task<string> GetSigningKeyAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> | GPG armored public key |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
GetVersionAsync()
Returns the version of the Gitea application
Declaration
public virtual Task<ServerVersion> GetVersionAsync()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ServerVersion> | ServerVersion |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
GetVersionAsync(CancellationToken)
Returns the version of the Gitea application
Declaration
public virtual async Task<ServerVersion> GetVersionAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ServerVersion> | ServerVersion |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
ListGitignoresTemplatesAsync()
Returns a list of all gitignore templates
Declaration
public virtual Task<ICollection<string>> ListGitignoresTemplatesAsync()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.ICollection<System.String>> | GitignoreTemplateList |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
ListGitignoresTemplatesAsync(CancellationToken)
Returns a list of all gitignore templates
Declaration
public virtual async Task<ICollection<string>> ListGitignoresTemplatesAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.ICollection<System.String>> | GitignoreTemplateList |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
ListLabelTemplatesAsync()
Returns a list of all label templates
Declaration
public virtual Task<ICollection<string>> ListLabelTemplatesAsync()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.ICollection<System.String>> | LabelTemplateList |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
ListLabelTemplatesAsync(CancellationToken)
Returns a list of all label templates
Declaration
public virtual async Task<ICollection<string>> ListLabelTemplatesAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.ICollection<System.String>> | LabelTemplateList |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
ListLicenseTemplatesAsync()
Returns a list of all license templates
Declaration
public virtual Task<ICollection<LicensesTemplateListEntry>> ListLicenseTemplatesAsync()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.ICollection<LicensesTemplateListEntry>> | LicenseTemplateList |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
ListLicenseTemplatesAsync(CancellationToken)
Returns a list of all license templates
Declaration
public virtual async Task<ICollection<LicensesTemplateListEntry>> ListLicenseTemplatesAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.ICollection<LicensesTemplateListEntry>> | LicenseTemplateList |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<String, IEnumerable<String>>, CancellationToken)
Declaration
protected virtual async Task<MiscellaneousClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Net.Http.HttpResponseMessage | response | |
| System.Collections.Generic.IReadOnlyDictionary<System.String, System.Collections.Generic.IEnumerable<System.String>> | headers | |
| System.Threading.CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<MiscellaneousClient.ObjectResponseResult<T>> |
Type Parameters
| Name | Description |
|---|---|
| T |
RenderMarkdownAsync(MarkdownOption)
Render a markdown document as HTML
Declaration
public virtual Task<string> RenderMarkdownAsync(MarkdownOption body)
Parameters
| Type | Name | Description |
|---|---|---|
| MarkdownOption | body |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> | MarkdownRender is a rendered markdown document |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
RenderMarkdownAsync(MarkdownOption, CancellationToken)
Render a markdown document as HTML
Declaration
public virtual async Task<string> RenderMarkdownAsync(MarkdownOption body, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| MarkdownOption | body | |
| System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> | MarkdownRender is a rendered markdown document |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
RenderMarkdownRawAsync(String)
Render raw markdown as HTML
Declaration
public virtual Task<string> RenderMarkdownRawAsync(string body)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | body | Request body to render |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> | MarkdownRender is a rendered markdown document |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
RenderMarkdownRawAsync(String, CancellationToken)
Render raw markdown as HTML
Declaration
public virtual async Task<string> RenderMarkdownRawAsync(string body, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | body | Request body to render |
| System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> | MarkdownRender is a rendered markdown document |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
RenderMarkupAsync(MarkupOption)
Render a markup document as HTML
Declaration
public virtual Task<string> RenderMarkupAsync(MarkupOption body)
Parameters
| Type | Name | Description |
|---|---|---|
| MarkupOption | body |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> | MarkupRender is a rendered markup document |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |
RenderMarkupAsync(MarkupOption, CancellationToken)
Render a markup document as HTML
Declaration
public virtual async Task<string> RenderMarkupAsync(MarkupOption body, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| MarkupOption | body | |
| System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> | MarkupRender is a rendered markup document |
Exceptions
| Type | Condition |
|---|---|
| ApiException | A server side error occurred. |