Skip to content

Commit

Permalink
Make removed API model fields deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
Groxan committed Dec 25, 2020
1 parent cbe6ebc commit 3180711
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Tzkt.Api/Models/PeriodInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,20 @@ public class PeriodInfo
/// The height of the block in which the period ends
/// </summary>
public int LastLevel { get; set; }

/// <summary>
/// **DEPRECATED**. Use `index` instead.
/// </summary>
public int Id => Index;

/// <summary>
/// **DEPRECATED**. Use `firstLevel` instead.
/// </summary>
public int StartLevel => FirstLevel;

/// <summary>
/// **DEPRECATED**. Use `lastLevel` instead.
/// </summary>
public int EndLevel => LastLevel;
}
}
5 changes: 5 additions & 0 deletions Tzkt.Api/Models/Voting/Proposal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,10 @@ public class Proposal
/// Information about the proposal
/// </summary>
public ProposalMetadata Metadata { get; set; }

/// <summary>
/// **DEPRECATED**. Use `firstPeriod` instead.
/// </summary>
public int Period => FirstPeriod;
}
}

0 comments on commit 3180711

Please sign in to comment.