Skip to content

Commit

Permalink
Refactored response model classes to records
Browse files Browse the repository at this point in the history
  • Loading branch information
JKorf committed Jun 18, 2024
1 parent aeb58fb commit e7a7650
Show file tree
Hide file tree
Showing 35 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoAsset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// <summary>
/// Asset info
/// </summary>
public class CoinGeckoAsset
public record CoinGeckoAsset
{
/// <summary>
/// Id of the asset
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoAssetDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Asset details
/// </summary>
public class CoinGeckoAssetDetails
public record CoinGeckoAssetDetails
{
/// <summary>
/// Id of the asset
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoAssetHistory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// History info
/// </summary>
public class CoinGeckoAssetHistory
public record CoinGeckoAssetHistory
{
/// <summary>
/// Id
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoAssetMarket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Asset market info
/// </summary>
public class CoinGeckoAssetMarket
public record CoinGeckoAssetMarket
{
/// <summary>
/// Name
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoAssetPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Platform info
/// </summary>
public class CoinGeckoAssetPlatform
public record CoinGeckoAssetPlatform
{
/// <summary>
/// Platform id
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoCategory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Category
/// </summary>
public class CoinGeckoCategory
public record CoinGeckoCategory
{
/// <summary>
/// Category id
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoCodeAddDel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Code additions/deletions
/// </summary>
public class CoinGeckoCodeAddDel
public record CoinGeckoCodeAddDel
{
/// <summary>
/// Lines added
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoCommunityData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Community data
/// </summary>
public class CoinGeckoCommunityData
public record CoinGeckoCommunityData
{
/// <summary>
/// Facebook likes
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoDerivative.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Derivative info
/// </summary>
public class CoinGeckoDerivative
public record CoinGeckoDerivative
{
/// <summary>
/// Market
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoDeveloperData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Developer data
/// </summary>
public class CoinGeckoDeveloperData
public record CoinGeckoDeveloperData
{
/// <summary>
/// Forks
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoExchange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Exchange info
/// </summary>
public class CoinGeckoExchange
public record CoinGeckoExchange
{
/// <summary>
/// Id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Exchange info
/// </summary>
public class CoinGeckoExchangeDerivative
public record CoinGeckoExchangeDerivative
{
/// <summary>
/// Mame
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoExchangeDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Exchange details
/// </summary>
public class CoinGeckoExchangeDetails
public record CoinGeckoExchangeDetails
{
/// <summary>
/// Name
Expand Down
4 changes: 2 additions & 2 deletions CoinGecko.Net/Objects/Models/CoinGeckoExchangeRates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Exchange rates
/// </summary>
public class CoinGeckoExchangeRates
public record CoinGeckoExchangeRates
{
/// <summary>
/// Rates dictionary
Expand All @@ -16,7 +16,7 @@ public class CoinGeckoExchangeRates
/// <summary>
/// Exchange rate
/// </summary>
public class CoinGeckoExchangeRate
public record CoinGeckoExchangeRate
{
/// <summary>
/// Name
Expand Down
4 changes: 2 additions & 2 deletions CoinGecko.Net/Objects/Models/CoinGeckoGlobalData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

namespace CoinGecko.Net.Objects.Models
{
internal class CoinGeckoGlobalDataWrapper
internal record CoinGeckoGlobalDataWrapper
{
public CoinGeckoGlobalData? Data { get; set; }
}

/// <summary>
/// Global crypto data
/// </summary>
public class CoinGeckoGlobalData
public record CoinGeckoGlobalData
{
/// <summary>
/// Active crypto currencies
Expand Down
4 changes: 2 additions & 2 deletions CoinGecko.Net/Objects/Models/CoinGeckoGlobalDefiData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace CoinGecko.Net.Objects.Models
{
internal class CoinGeckoGlobalDefiDataWrapper
internal record CoinGeckoGlobalDefiDataWrapper
{
public CoinGeckoGlobalDefiData? Data { get; set; }
}

/// <summary>
/// Global defi data
/// </summary>
public class CoinGeckoGlobalDefiData
public record CoinGeckoGlobalDefiData
{
/// <summary>
/// Defi market cap
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoIcoData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Ico information
/// </summary>
public class CoinGeckoIcoData
public record CoinGeckoIcoData
{
/// <summary>
/// Ico start date
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoImages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// <summary>
/// Image links
/// </summary>
public class CoinGeckoImages
public record CoinGeckoImages
{
/// <summary>
/// Thumbnail
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Index info
/// </summary>
public class CoinGeckoIndex
public record CoinGeckoIndex
{
/// <summary>
/// Id
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoLinks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Links
/// </summary>
public class CoinGeckoLinks
public record CoinGeckoLinks
{
/// <summary>
/// Homepage
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoListItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// <summary>
/// List item
/// </summary>
public class CoinGeckoListItem
public record CoinGeckoListItem
{
/// <summary>
/// Id
Expand Down
4 changes: 2 additions & 2 deletions CoinGecko.Net/Objects/Models/CoinGeckoMarket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Market info
/// </summary>
public class CoinGeckoMarket
public record CoinGeckoMarket
{
/// <summary>
/// Market id
Expand Down Expand Up @@ -142,7 +142,7 @@ public class CoinGeckoMarket
/// <summary>
/// Market raturn on investment info
/// </summary>
public class CoinGeckoMarketRoi
public record CoinGeckoMarketRoi
{
/// <summary>
/// Times
Expand Down
4 changes: 2 additions & 2 deletions CoinGecko.Net/Objects/Models/CoinGeckoMarketChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Price history info
/// </summary>
public class CoinGeckoMarketChart
public record CoinGeckoMarketChart
{
/// <summary>
/// Price history
Expand All @@ -31,7 +31,7 @@ public class CoinGeckoMarketChart
/// Value at time info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class CoinGeckoMarketChartValue
public record CoinGeckoMarketChartValue
{
/// <summary>
/// Timestamp
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoMarketData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Market data
/// </summary>
public class CoinGeckoMarketData
public record CoinGeckoMarketData
{
/// <summary>
/// Current price
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Category info
/// </summary>
public class CoinGeckoMarketDataCategory
public record CoinGeckoMarketDataCategory
{
/// <summary>
/// Id
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoNft.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Nft
/// </summary>
public class CoinGeckoNft
public record CoinGeckoNft
{
/// <summary>
/// Id
Expand Down
4 changes: 2 additions & 2 deletions CoinGecko.Net/Objects/Models/CoinGeckoNftDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Nft info
/// </summary>
public class CoinGeckoNftDetails
public record CoinGeckoNftDetails
{
/// <summary>
/// Id
Expand Down Expand Up @@ -79,7 +79,7 @@ public class CoinGeckoNftDetails
/// <summary>
/// Nft value info
/// </summary>
public class CoinGeckoNftValue
public record CoinGeckoNftValue
{
/// <summary>
/// In native currency
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoOhlc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace CoinGecko.Net.Objects.Models
/// Open High Low Close data
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class CoinGeckoOhlc
public record CoinGeckoOhlc
{
/// <summary>
/// Timestamp
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Platform info
/// </summary>
public class CoinGeckoPlatform
public record CoinGeckoPlatform
{
/// <summary>
/// Decimal places
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Public interest statistics
/// </summary>
public class CoinGeckoPublicInterestStats
public record CoinGeckoPublicInterestStats
{
/// <summary>
/// Alexa rank
Expand Down
10 changes: 5 additions & 5 deletions CoinGecko.Net/Objects/Models/CoinGeckoSearchResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Search results
/// </summary>
public class CoinGeckoSearchResult
public record CoinGeckoSearchResult
{
/// <summary>
/// Assets found
Expand All @@ -31,7 +31,7 @@ public class CoinGeckoSearchResult
/// <summary>
/// Asset result
/// </summary>
public class CoinGeckoAssetResult
public record CoinGeckoAssetResult
{
/// <summary>
/// Id
Expand Down Expand Up @@ -70,7 +70,7 @@ public class CoinGeckoAssetResult
/// <summary>
/// Exchange search result
/// </summary>
public class CoinGeckoExchangeResult
public record CoinGeckoExchangeResult
{
/// <summary>
/// Id
Expand Down Expand Up @@ -100,7 +100,7 @@ public class CoinGeckoExchangeResult
/// <summary>
/// Category search result
/// </summary>
public class CoinGeckoCategoryResult
public record CoinGeckoCategoryResult
{
/// <summary>
/// Id
Expand All @@ -115,7 +115,7 @@ public class CoinGeckoCategoryResult
/// <summary>
/// Nft search result
/// </summary>
public class CoinGeckoNftResult
public record CoinGeckoNftResult
{
/// <summary>
/// Id
Expand Down
4 changes: 2 additions & 2 deletions CoinGecko.Net/Objects/Models/CoinGeckoStatusUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Status update
/// </summary>
public class CoinGeckoStatusUpdate
public record CoinGeckoStatusUpdate
{
/// <summary>
/// Description
Expand Down Expand Up @@ -45,7 +45,7 @@ public class CoinGeckoStatusUpdate
/// <summary>
/// Project info
/// </summary>
public class CoinGeckoProject
public record CoinGeckoProject
{
/// <summary>
/// Type
Expand Down
2 changes: 1 addition & 1 deletion CoinGecko.Net/Objects/Models/CoinGeckoTicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace CoinGecko.Net.Objects.Models
/// <summary>
/// Ticker info
/// </summary>
public class CoinGeckoTicker
public record CoinGeckoTicker
{
/// <summary>
/// Base asset
Expand Down
Loading

0 comments on commit e7a7650

Please sign in to comment.