Skip to content

trakx/coingecko-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.NET Core Codacy Badge Codacy Badge

coingecko-api-client

C# implementation of a CoinGecko API client

How to regenerate C# API clients

  • If you work with external API, you probably need to update Change OpenAPI definition added to the project. It's usually openApi3.yaml file.
  • Do right click on the project and select Edit Project File. In the file change value of GenerateApiClient property to true.
  • Rebuild the project. NSwag target will be executed as post action.
  • The last thing to be done is to run integration test OpenApiGeneratedCodeModifier that will rewrite auto generated C# classes to use C# 9 features like records and init keyword.

Creating your local .env file

In order to be able to run some integration tests, you should create a .env file in the src folder with the following variables:

CoinGeckoApiConfiguration__ApiKey=********

AWS Parameters

In order to be able to run some integration tests you should ensure that you have access to the following AWS parameters :

# REPOSITORY SECRETS
/[environment]/Trakx/CoinGecko/ApiClient/CoinGeckoApiConfiguration/ApiKey
/[environment]/Trakx/CoinGecko/ApiClient/CoinGeckoApiConfiguration/BaseUrl
/[environment]/Trakx/CoinGecko/ApiClient/RedisCacheConfiguration/ConnectionString

# GLOBAL SECRETS
# Instead of creating a specific repository secret, can use the global one with the same [Key]
/[environment]/Global/CoinGeckoApiConfiguration/ApiKey
/[environment]/Global/CoinGeckoApiConfiguration/BaseUrl
/[environment]/Global/RedisCacheConfiguration/ConnectionString