/// <summary>
        /// Get a list of the members of a group.
        /// </summary>
        /// <remarks>
        /// The call must be signed on behalf of a Flickr member, and the ability to see the group membership will be determined by the Flickr member's group privileges.
        /// </remarks>
        /// <param name="groupId">Return a list of members for this group. The group must be viewable by the Flickr member on whose behalf the API call is made.</param>
        /// <param name="page">The page of the results to return (default is 1).</param>
        /// <param name="perPage">The number of members to return per page (default is 100, max is 500).</param>
        /// <param name="memberTypes">The types of members to be returned. Can be more than one.</param>
        /// <returns>A <see cref="MemberCollection"/> instance containing the members for the group.</returns>
        public MemberCollection GroupsMembersGetList(string groupId, int page, int perPage, MemberTypes memberTypes)
        {
            CheckRequiresAuthentication();

            var parameters = new Dictionary <string, string>();

            parameters.Add("method", "flickr.groups.members.getList");
            parameters.Add("api_key", apiKey);
            if (page > 0)
            {
                parameters.Add("page", page.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
            }
            if (perPage > 0)
            {
                parameters.Add("per_page", perPage.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
            }
            if (memberTypes != MemberTypes.None)
            {
                parameters.Add("membertypes", UtilityMethods.MemberTypeToString(memberTypes));
            }
            parameters.Add("group_id", groupId);

            return(GetResponseCache <MemberCollection>(parameters));
        }
Example #2
0
        /// <summary>
        /// Get a list of the members of a group.
        /// </summary>
        /// <remarks>
        /// The call must be signed on behalf of a Flickr member, and the ability to see the group membership will be determined by the Flickr member's group privileges.
        /// </remarks>
        /// <param name="groupId">Return a list of members for this group. The group must be viewable by the Flickr member on whose behalf the API call is made.</param>
        /// <param name="page">The page of the results to return (default is 1).</param>
        /// <param name="perPage">The number of members to return per page (default is 100, max is 500).</param>
        /// <param name="memberTypes">The types of members to be returned. Can be more than one.</param>
        /// <param name="callback">Callback method to call upon return of the response from Flickr.</param>
        public void GroupsMembersGetListAsync(string groupId, int page, int perPage, MemberTypes memberTypes, Action <TwentyThreeResult <MemberCollection> > callback)
        {
            CheckRequiresAuthentication();

            var parameters = new Dictionary <string, string>();

            parameters.Add("method", "flickr.groups.members.getList");
            parameters.Add("api_key", apiKey);
            if (page > 0)
            {
                parameters.Add("page", page.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
            }
            if (perPage > 0)
            {
                parameters.Add("per_page", perPage.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
            }
            if (memberTypes != MemberTypes.None)
            {
                parameters.Add("membertypes", UtilityMethods.MemberTypeToString(memberTypes));
            }
            parameters.Add("group_id", groupId);

            GetResponseAsync <MemberCollection>(parameters, callback);
        }