Ejemplo n.º 1
0
        /// <summary>
        /// Get the detai of a pixiv user
        /// </summary>
        /// <param name="id">The user's id, if not specified it will return the detail of the current login user</param>
        /// <returns></returns>
        public async Task <PixivUserProfile> GetUserDetail(string id = null, bool requireAuth = true)
        {
            id = id ?? UserID;
            Uri url = new Uri(baseUrl + "/v1/user/detail");
            PixivRequestContent _query = new PixivRequestContent();

            _query.Add("user_id", id);
            _query.Add("filter", Filter);
            string resJson = await GetStringRequest(Method.GET, url, query : _query, requireAuth : requireAuth).ConfigureAwait(false);

            return(PixivUserProfile.Parse(resJson, this));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get the details of a pixiv illustration
        /// </summary>
        /// <param name="id">The id of the illustration</param>
        /// <returns>A PixivIllustration object that contains the illustration information</returns>
        public async Task <PixivIllustration> GetIllustrationDetail(string id, bool requireAuth = true)
        {
            Uri url = new Uri(baseUrl + "/v1/illust/detail");
            PixivRequestContent _query = new PixivRequestContent();

            _query.Add("illust_id", id);
            string resJson = await GetStringRequest(Method.GET, url, query : _query, requireAuth : requireAuth).ConfigureAwait(false);

            return(PixivIllustration.Parse(resJson, this, true));
        }