hubspot-net / HubSpot.NET

C# .NET Wrapper around the common HubSpot APIs.
MIT License
112 stars 137 forks source link

Drop RestSharpExtensions #39

Closed Psypher9 closed 5 years ago

Psypher9 commented 5 years ago

I don't think this class is actually being helpful. Here is our code:

 public static class RestSharpExtensions
    {
        public static bool IsSuccessful(this IRestResponse response)
        {
            return (int) response.StatusCode >= 200 
                   && (int) response.StatusCode <= 299 
                   && response.ResponseStatus == ResponseStatus.Completed;
        }
    }

and here is the IsSuccessful method from RestSharp Response class directly

        public bool IsSuccessful => (int) StatusCode >= 200 && (int) StatusCode <= 299 &&
                                    ResponseStatus == ResponseStatus.Completed;

These do the exact same thing. So it would be best to drop this class entirely unless there is a need for it.

michal880 commented 5 years ago

created PR for this #40