zerodha / dotnetkiteconnect

.NET library for Kite connect
MIT License
78 stars 67 forks source link

Convert Routes to use Constants #40

Open saivineeth100 opened 4 months ago

saivineeth100 commented 4 months ago

Existing

private readonly Dictionary<string, string> _routes = new Dictionary<string, string>
{
    ["parameters"] = "/parameters",

}

Suggested Add to Constants.cs or Add new File Routes.cs

    public static class Routes
    {
        public const string Parameters = "/parameters";
        public static class Auth
        {
            public const string Token = "/session/token";
            public const string RefreshToken = "/session/refresh_token";
        }

    }

When using we can use

Post(Routes.Auth.Token, reqParams)
ajinasokan commented 4 months ago

Thanks for the suggestion. But this will be quite a significant change. Will consider this for the next major version. I will keep the issue open.

saivineeth100 commented 4 months ago

Thanks for the suggestion. But this will be quite a significant change. Will consider this for the next major version. I will keep the issue open.

Can I contribute to this or any suggestions via pull requests?

ajinasokan commented 4 months ago

I actually have the patch ready. But just not merged yet. Since this is changing code related to all APIs, it will have to be tested as a whole and that is time consuming. That is why I'm delaying it till a major version or a refactor.

saivineeth100 commented 4 months ago

I am asking in general, can outsiders contribute to Zerodha repos?

ajinasokan commented 4 months ago

Yeah sure. Just keep in mind, if it is a large patch then make sure to create an issue with your suggestion and seek maintainers opinion.