예제 #1
0
        /// <summary>
        /// Get Character data, this is parsed straight from Lodestone in real-time. The more data you request the slower the entire request will be.
        /// </summary>
        public static async Task <GetResponse> Get(uint?id, CharacterData dataFlags = CharacterData.ClassJobs)
        {
            string data = string.Empty;

            if (FlagsUtils.IsSet(dataFlags, CharacterData.Achievements))
            {
                data += "AC,";
            }

            if (FlagsUtils.IsSet(dataFlags, CharacterData.FriendsList))
            {
                data += "FR,";
            }

            if (FlagsUtils.IsSet(dataFlags, CharacterData.FreeCompany))
            {
                data += "FC,";
            }

            if (FlagsUtils.IsSet(dataFlags, CharacterData.FreeCompanyMembers))
            {
                data += "FCM,";
            }

            if (FlagsUtils.IsSet(dataFlags, CharacterData.PlayerVsPlayerTeam))
            {
                data += "PVP,";
            }

            if (FlagsUtils.IsSet(dataFlags, CharacterData.ClassJobs))
            {
                data += "CJ,";
            }

            return(await Request.Send <GetResponse>("/character/" + id + "?data=" + data + "&extended=true"));
        }
예제 #2
0
        /// <summary>
        /// Get Character data, this is parsed straight from Lodestone in real-time. The more data you request the slower the entire request will be.
        /// </summary>
        public static async Task <GetResponse> GetFreeCompany(ulong?id, CharacterData dataFlags = CharacterData.FreeCompanyMembers, string columns = "")
        {
            string data = string.Empty;

            if (FlagsUtils.IsSet(dataFlags, CharacterData.Achievements))
            {
                data += "AC,";
            }

            if (FlagsUtils.IsSet(dataFlags, CharacterData.FriendsList))
            {
                data += "FR,";
            }

            if (FlagsUtils.IsSet(dataFlags, CharacterData.FreeCompany))
            {
                data += "FC,";
            }

            if (FlagsUtils.IsSet(dataFlags, CharacterData.FreeCompanyMembers))
            {
                data += "FCM,";
            }

            if (FlagsUtils.IsSet(dataFlags, CharacterData.PlayerVsPlayerTeam))
            {
                data += "PVP,";
            }

            if (FlagsUtils.IsSet(dataFlags, CharacterData.ClassJobs))
            {
                data += "CJ,";
            }

            return(await Request.Send <GetResponse>("/freecompany/" + id + "?data=" + data + "&columns=" + columns));
        }