Retrieving More then 1000 likes - likes Before & Likes After

Aug 9, 2015 at 6:22 AM
Okay I posted in the issues section but after looking at the API I realized I could use below and it should work assuming I do it correctly.

And this is more in case someone decides to add it to the official releases. (maybe I'd get credit)

In the TumblrClient.CS file I added these two new Client Tasks, a GetusersLikeBeforeAsync and GetusersLikeAfterAsync (based off of what I understood of the code) And I'd really appreciate it if someone verified that I did this write, but it seems to work, which is awesome.
 #region GetusersLikeBeforeAsync
    public Task<Likes> GetUserLikesBeforeAsync(DateTime? before = null, int count = 20)
    {
        if (disposed)
            throw new ObjectDisposedException("TumblrClient");

        if (count < 1 || count > 20)
            throw new ArgumentOutOfRangeException("count", "count must be between 1 and 20.");

        if (OAuthToken == null)
            throw new InvalidOperationException("GetBlogLikesBeforeAsync method requires an OAuth token to be specified.");

        MethodParameterSet parameters = new MethodParameterSet();
        parameters.Add("before", before.HasValue ? DateTimeHelper.ToTimestamp(before.Value).ToString() : null, null);
        parameters.Add("limit", count, 0);

        return CallApiMethodAsync<Likes>(
            new UserMethod("likes", OAuthToken, HttpMethod.Get, parameters),
            CancellationToken.None);
    }
    #endregion
    public Task<Likes> GetUserLikesAfterAsync(DateTime? before = null, int count = 20)
    {
        if (disposed)
            throw new ObjectDisposedException("TumblrClient");

        if (count < 1 || count > 20)
            throw new ArgumentOutOfRangeException("count", "count must be between 1 and 20.");

        if (OAuthToken == null)
            throw new InvalidOperationException("GetBlogLikesAfterAsync method requires an OAuth token to be specified.");

        MethodParameterSet parameters = new MethodParameterSet();
        parameters.Add("after", before.HasValue ? DateTimeHelper.ToTimestamp(before.Value).ToString() : null, null);
        parameters.Add("limit", count, 0);

        return CallApiMethodAsync<Likes>(
            new UserMethod("likes", OAuthToken, HttpMethod.Get, parameters),
            CancellationToken.None);
    }
    #endregion