Skip to content

Commit

Permalink
Add declaration Obsolete
Browse files Browse the repository at this point in the history
  • Loading branch information
kiryakovskb committed Feb 11, 2025
1 parent b603c9f commit 62f59c3
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/ComDiadocApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,7 @@ public OrganizationFeatures GetOrganizationFeatures(string authToken, string box
return diadoc.GetOrganizationFeatures(authToken, boxId);
}

[Obsolete("Use a similar method with boxId: GetDepartmentV2()")]
public Department GetDepartment(string authToken, string orgId, string departmentId)
{
return diadoc.GetDepartment(authToken, orgId, departmentId);
Expand Down
1 change: 1 addition & 0 deletions src/DiadocApi.Async.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ public Task<Box> GetBoxAsync(string authToken, string boxId)
return diadocHttpApi.GetBoxAsync(authToken, boxId);
}

[Obsolete("Use a similar method with boxId: GetDepartmentV2Async()")]
public Task<Department> GetDepartmentAsync(string authToken, string orgId, string departmentId)
{
if (authToken == null) throw new ArgumentNullException("authToken");
Expand Down
1 change: 1 addition & 0 deletions src/DiadocApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ public Box GetBox(string authToken, string boxId)
return diadocHttpApi.GetBox(authToken, boxId);
}

[Obsolete("Use a similar method with boxId: GetDepartmentV2()")]
public Department GetDepartment(string authToken, string orgId, string departmentId)
{
if (authToken == null) throw new ArgumentNullException("authToken");
Expand Down
1 change: 1 addition & 0 deletions src/DiadocHttpApi.References.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public Box GetBox(string authToken, string boxId)
return PerformHttpRequest<Box>(authToken, "GET", queryString);
}

[Obsolete("Use a similar method with boxId: GetDepartmentV2()")]
public Department GetDepartment(string authToken, string orgId, string departmentId)
{
var queryBuilder = new PathAndQueryBuilder("/GetDepartment");
Expand Down
1 change: 1 addition & 0 deletions src/DiadocHttpApi.ReferencesAsync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public Task<Box> GetBoxAsync(string authToken, string boxId)
return PerformHttpRequestAsync<Box>(authToken, "GET", queryString);
}

[Obsolete("Use a similar method with boxId: GetDepartmentV2Async()")]
public Task<Department> GetDepartmentAsync(string authToken, string orgId, string departmentId)
{
var queryBuilder = new PathAndQueryBuilder("/GetDepartment");
Expand Down
2 changes: 2 additions & 0 deletions src/IDiadocApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public interface IDiadocApi
[Obsolete(ObsoleteReasons.UseAuthTokenOverload)]
Box GetBox(string boxId);
Box GetBox(string authToken, string boxId);
[Obsolete("Use a similar method with boxId: GetDepartmentV2()")]
Department GetDepartment(string authToken, string orgId, string departmentId);
Department GetDepartmentV2(string authToken, string boxId, string departmentId);
void UpdateOrganizationProperties(string authToken, OrganizationPropertiesToUpdate orgProps);
Expand Down Expand Up @@ -422,6 +423,7 @@ Task<string> AuthenticateWithKeyAsync(byte[] certificateBytes, bool useLocalSyst
[Obsolete(ObsoleteReasons.UseAuthTokenOverload)]
Task<Box> GetBoxAsync(string boxId);
Task<Box> GetBoxAsync(string authToken, string boxId);
[Obsolete("Use a similar method with boxId: GetDepartmentV2Async()")]
Task<Department> GetDepartmentAsync(string authToken, string orgId, string departmentId);
Task<Department> GetDepartmentV2Async(string authToken, string boxId, string departmentId);
Task UpdateOrganizationPropertiesAsync(string authToken, OrganizationPropertiesToUpdate orgProps);
Expand Down
2 changes: 1 addition & 1 deletion tools/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Cake" version="1.3.0" />
<package id="Cake" version="1.0.0" />
</packages>

0 comments on commit 62f59c3

Please sign in to comment.