public List <AssetstoreContentWrapper> GetAssetsInfo(List <int> ids) { List <AssetstoreContentWrapper> data = new List <AssetstoreContentWrapper>(); foreach (int id in ids) { data.Add(UnityAssetstoreRequest.GetResponseToJson <AssetstoreContentWrapper> (string.Format(ASSET_USER_OVERVIEW_URL, id), "*/*", "", "")); } return(data); }
public async Task <byte[]> GetDownloadAssetTaskAsync(int id) { JObject assets = JObject.FromObject(UnityAssetstoreRequest.GetResponseToJson (string.Format(ASSET_DOWNLOAD_URL, id), "*/*", "", "", "GET", "")); downloadInfo = assets["download"].ToObject <AssetstoreDownloadInfoWrapper>(); using (WebClient wc = new WebClient()) { wc.DownloadDataCompleted += DownloadDataCompleted; return(await wc.DownloadDataTaskAsync(new Uri(downloadInfo.URL))); } }
public List <int> GetDownloadableAssets() { List <int> assetsId = new List <int>(); JObject assets = JObject.FromObject(UnityAssetstoreRequest.GetResponseToJson (SEARCH_URL, "*/*", "application/x-www-form-urlencoded; charset=UTF-8", "", "POST", "")); foreach (JToken asset in assets["results"].Children()) { assetsId.Add(asset["id"].Value <int>()); } return(assetsId); }
public AssetstoreUserWrapper UserLogin(string id, string password) { string loginParameter = string.Format( "license_hash=&hardware_hash=&language_code=kr¤t_package_id=&user={0}&pass={1}", HttpUtility.UrlEncode(id), HttpUtility.UrlEncode(password)); userAuthenticate = UnityAssetstoreRequest.GetResponseToJson <AssetstoreUserWrapper> (USER_LOGIN_URL, "application/json", "application/x-www-form-urlencoded; charset=UTF-8", "", "POST", loginParameter); UnityAssetstoreRequest.KharmaVersion = userAuthenticate.KharmaVersion; UnityAssetstoreRequest.UnitySession = userAuthenticate.XUnitySession; return(userAuthenticate); }
public AssetstoreContentWrapper GetAssetInfo(int id) { return(UnityAssetstoreRequest.GetResponseToJson <AssetstoreContentWrapper> (string.Format(ASSET_OVERVIEW_URL, id), "*/*", "", "")); }
public AssetstoreUserOverviewWrapper GetUserOverview(string id) { return(UnityAssetstoreRequest.GetResponseToJson <AssetstoreUserOverviewWrapper> (string.Format(USER_OVERVIEW_URL, id), "*/*", "", ""));; }