コード例 #1
0
        //Needs testing
        #region _Realm Status

        /// <summary>
        /// Gets status for realms in your _Locale
        /// </summary>
        /// <returns>RealmRoot object</returns>
        public RealmRoot GetRealmStatus()
        {
            var realm = new RealmRoot();

            var url = string.Format(@"{0}/wow/realm/status?locale={1}&apikey={2}",
                                    _Host,
                                    _Locale,
                                    _APIKey);

            realm = json.GetDataFromURL <RealmRoot>(url);
            return(realm);
        }
コード例 #2
0
        /// <summary>
        /// Gets status for realms in your _Locale (EU, US etc.)
        /// </summary>
        /// <returns>RealmRoot object</returns>
        public async Task <RealmRoot> GetRealmStatusAsync()
        {
            var realm = new RealmRoot();

            var url = string.Format(
                @"{0}/wow/realm/status?locale={1}&apikey={2}",
                _Host,
                _Locale,
                _APIKey);

            realm = await this.jsonUtility.GetDataFromURLAsync <RealmRoot>(url);

            return(realm);
        }