Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest you rename the TimeInterval enum to something more specific to this library #19

Open
astrohart opened this issue May 17, 2023 · 0 comments

Comments

@astrohart
Copy link

namespace CoinCapApi.Types
{
    public enum TimeInterval
    {
        /// <summary>
        /// 1 minute
        /// </summary>
        M1 = 1,

        /// <summary>
        /// 5 minutes
        /// </summary>
        M5 = 2,

        /// <summary>
        /// 15 minutes
        /// </summary>
        M15 = 4,

        /// <summary>
        /// 30 minutes
        /// </summary>
        M30 = 8,

        /// <summary>
        /// 1 hour
        /// </summary>
        H1 = 16,

        /// <summary>
        /// 2 hours
        /// </summary>
        H2 = 32,

        /// <summary>
        /// 6 hours
        /// </summary>
        H6 = 64,

        /// <summary>
        /// 12 hours
        /// </summary>
        H12 = 128,

        /// <summary>
        /// 1 day (24 hours)
        /// </summary>
        D1 = 256
    }
}

Listing 1. The TimeInterval enum.

@ByronAP hello. I have a suggestion. The enum shown in Listing 1 is named TimeInterval. This is pretty generic.

I suggest you rename it something such as CoinCapTimeInterval or somesuch. This way, it would not clash with any other symbols that the developer consuming this library has named TimeInterval as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant