Esempio n. 1
0
        /// <summary>
        /// List the authenticated user’s starred gists
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/gists/#list-gists
        /// </remarks>
        /// <param name="since">Only gists updated at or after this time are returned</param>
        /// <param name="options">Options for changing the API response</param>
        public IObservable <Gist> GetAllStarred(DateTimeOffset since, ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, nameof(options));

            var request = new GistRequest(since);

            return(_connection.GetAndFlattenAllPages <Gist>(ApiUrls.StarredGists(), request.ToParametersDictionary(), options));
        }
 /// <summary>
 /// List the authenticated user’s gists or if called anonymously, 
 /// this will return all public gists
 /// </summary>
 /// <remarks>
 /// http://developer.github.com/v3/gists/#list-gists
 /// </remarks>
 /// <param name="since">Only gists updated at or after this time are returned</param>
 public IObservable<Gist> GetAll(DateTimeOffset since)
 {
     var request = new GistRequest(since);
     return _connection.GetAndFlattenAllPages<Gist>(ApiUrls.Gist(), request.ToParametersDictionary());
 }
        /// <summary>
        /// List a user's gists
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/gists/#list-gists
        /// </remarks>
        /// <param name="user">The user</param>
        /// <param name="since">Only gists updated at or after this time are returned</param>
        public IObservable<Gist> GetAllForUser(string user, DateTimeOffset since)
        {
            Ensure.ArgumentNotNull(user, "user");

            var request = new GistRequest(since);
            return _connection.GetAndFlattenAllPages<Gist>(ApiUrls.UsersGists(user), request.ToParametersDictionary());
        }
Esempio n. 4
0
        /// <summary>
        /// List a user's gists
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/gists/#list-gists
        /// </remarks>
        /// <param name="user">The user</param>
        /// <param name="since">Only gists updated at or after this time are returned</param>
        /// <param name="options">Options for changing the API response</param>
        public IObservable <Gist> GetAllForUser(string user, DateTimeOffset since, ApiOptions options)
        {
            Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
            Ensure.ArgumentNotNull(options, nameof(options));

            var request = new GistRequest(since);

            return(_connection.GetAndFlattenAllPages <Gist>(ApiUrls.UsersGists(user), request.ToParametersDictionary(), options));
        }
Esempio n. 5
0
        /// <summary>
        /// List a user's gists
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/gists/#list-gists
        /// </remarks>
        /// <param name="user">The user</param>
        /// <param name="since">Only gists updated at or after this time are returned</param>
        public IObservable <Gist> GetAllForUser(string user, DateTimeOffset since)
        {
            Ensure.ArgumentNotNull(user, "user");

            var request = new GistRequest(since);

            return(_connection.GetAndFlattenAllPages <Gist>(ApiUrls.UsersGists(user), request.ToParametersDictionary()));
        }
Esempio n. 6
0
        /// <summary>
        /// List the authenticated user’s starred gists
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/gists/#list-gists
        /// </remarks>
        /// <param name="since">Only gists updated at or after this time are returned</param>
        public IObservable <Gist> GetAllStarred(DateTimeOffset since)
        {
            var request = new GistRequest(since);

            return(_connection.GetAndFlattenAllPages <Gist>(ApiUrls.StarredGists(), request.ToParametersDictionary()));
        }
        /// <summary>
        /// List the authenticated user’s starred gists
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/gists/#list-gists
        /// </remarks>
        /// <param name="since">Only gists updated at or after this time are returned</param>
        /// <param name="options">Options for changing the API response</param>
        public IObservable<Gist> GetAllStarred(DateTimeOffset since, ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, "options");

            var request = new GistRequest(since);
            return _connection.GetAndFlattenAllPages<Gist>(ApiUrls.StarredGists(), request.ToParametersDictionary(), options);
        }