mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
* add custom properties model and clients * observable * observable tests * add search * error CS8370: 'target-typed object creation' * Error CS8370: 'target-typed object creation' * add patch with body that return status code * fixes for failed ConventionTests * working UnitTests * (de)serialization and model tests * Update Repository.cs
74 lines
3.7 KiB
C#
74 lines
3.7 KiB
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Octokit
|
|
{
|
|
/// <summary>
|
|
/// A client for GitHub's Organization Custom Properties API.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See <a href="https://docs.github.com/rest/orgs/custom-properties">Custom Properties API documentation</a> for more information.
|
|
/// </remarks>
|
|
public interface IOrganizationCustomPropertiesClient
|
|
{
|
|
/// <summary>
|
|
/// Get all custom properties for an organization.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="https://docs.github.com/rest/orgs/custom-properties#get-all-custom-properties-for-an-organization">API documentation</a> for more information.
|
|
/// </remarks>
|
|
/// <param name="org">The name of the organization</param>
|
|
[ExcludeFromPaginationApiOptionsConventionTest("Pagination not supported by GitHub API (tested 15/06/2024)")]
|
|
Task<IReadOnlyList<OrganizationCustomProperty>> GetAll(string org);
|
|
|
|
/// <summary>
|
|
/// Get a single custom property by name.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="https://docs.github.com/rest/orgs/custom-properties#get-a-custom-property-for-an-organization">API documentation</a> for more information.
|
|
/// </remarks>
|
|
/// <param name="org">The name of the organization</param>
|
|
/// <param name="propertyName">The name of the custom property</param>
|
|
Task<OrganizationCustomProperty> Get(string org, string propertyName);
|
|
|
|
/// <summary>
|
|
/// Create new or update existing custom properties for an organization.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="https://docs.github.com/rest/orgs/custom-properties#create-or-update-custom-properties-for-an-organization">API documentation</a> for more information.
|
|
/// </remarks>
|
|
/// <param name="org">The name of the organization</param>
|
|
/// <param name="properties">The custom properties to create or update</param>
|
|
Task<IReadOnlyList<OrganizationCustomProperty>> CreateOrUpdate(string org, UpsertOrganizationCustomProperties properties);
|
|
|
|
/// <summary>
|
|
/// Create new or update existing custom property for an organization.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="https://docs.github.com/rest/orgs/custom-properties#create-or-update-a-custom-property-for-an-organization">API documentation</a> for more information.
|
|
/// </remarks>
|
|
/// <param name="org">The name of the organization</param>
|
|
/// <param name="propertyName">The name of the custom property</param>
|
|
/// <param name="property">The custom property to create or update</param>
|
|
Task<OrganizationCustomProperty> CreateOrUpdate(string org, string propertyName, UpsertOrganizationCustomProperty property);
|
|
|
|
/// <summary>
|
|
/// Removes a custom property that is defined for an organization.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="https://docs.github.com/rest/orgs/custom-properties#remove-a-custom-property-for-an-organization">API documentation</a> for more information.
|
|
/// </remarks>
|
|
/// <param name="org">The name of the organization</param>
|
|
/// <param name="propertyName">The name of the custom property</param>
|
|
Task Delete(string org, string propertyName);
|
|
|
|
/// <summary>
|
|
/// A client for GitHub's Organization Custom Property Values API.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="https://docs.github.com/rest/orgs/custom-properties">Custom Properties API documentation</a> for more information.
|
|
/// </remarks>
|
|
IOrganizationCustomPropertyValuesClient Values { get; }
|
|
}
|
|
}
|