Mako/MakoClient.Extensions.cs
/// <summary>
///     Gets the tags that are created by users to classify their bookmarks
/// </summary>
/// <example>
///     <a href="https://www.pixiv.net/en/users/333556/bookmarks/artworks">A user's bookmarks page</a>.
///     There is a list of tags atop of the illustrations
/// </example>
/// <returns>
///     An <see cref="IReadOnlyDictionary{TKey,TValue}" /> representing the results, where the keys are
///     tags and values are the privacy of the tags
/// </returns>
/// <param name="uid">The ID of the user</param>
Gets the tags that are created by users to classify their bookmarks
Gets the tags that are created by users to classify their bookmarks
public async Task<IReadOnlyDictionary<CountedTag, PrivacyPolicy>> GetUserSpecifiedBookmarkTagsAsync(string uid)
        {
            EnsureNotCancelled();
            var tags = (await GetMakoHttpClient(MakoApiKind.WebApi).GetStringResultAsync($"/ajax/user/{uid}/illusts/bookmark/tags?lang={Configuration.CultureInfo.TwoLetterISOLanguageName}").ConfigureAwait(false))
                .GetOrThrow()
                .FromJson<UserSpecifiedBookmarkTagResponse>();
            var dic = new Dictionary<CountedTag, PrivacyPolicy>();
            if (tags?.ResponseBody?.Public is { } publicTags)
            {
                publicTags.ForEach(tag => dic[new CountedTag(new Tag {Name = tag.Name}, tag.Count)] = PrivacyPolicy.Public);
            }
            if (tags?.ResponseBody?.Private is { } privateTags)
            {
                privateTags.ForEach(tag => dic[new CountedTag(new Tag {Name = tag.Name}, tag.Count)] = PrivacyPolicy.Private);
            }
            return dic;
        }
public async Task < IReadOnlyDictionary < CountedTag , PrivacyPolicy > > GetUserSpecifiedBookmarkTagsAsync ( string uid ) { EnsureNotCancelled ( ) ; var tags = ( await GetMakoHttpClient ( MakoApiKind . WebApi ) . GetStringResultAsync ( $" /ajax/user/ { uid } /illusts/bookmark/tags?lang= { Configuration . CultureInfo . TwoLetterISOLanguageName } " ) . ConfigureAwait ( false ) ) . GetOrThrow ( ) . FromJson < UserSpecifiedBookmarkTagResponse > ( ) ; var dic = new Dictionary < CountedTag , PrivacyPolicy > ( ) ; if ( tags ? . ResponseBody ? . Public is { } publicTags ) { publicTags . ForEach ( tag => dic [ new CountedTag ( new Tag { Name = tag . Name } , tag . Count ) ] = PrivacyPolicy . Public ) ; } if ( tags ? . ResponseBody ? . Private is { } privateTags ) { privateTags . ForEach ( tag => dic [ new CountedTag ( new Tag { Name = tag . Name } , tag . Count ) ] = PrivacyPolicy . Private ) ; } return dic ; }
Gets the tags that are created by users to classify their bookmarks
Gets the tags that are created by users to classify their bookmarks
An  representing the results, where the keys are
tags and values are the privacy of the tags
An representing the results where the keys are tags and values are the privacy of the tags
uid
string
The ID of the user
The ID of the user
example
A user's bookmarks page
A user ' s bookmarks page