问题标签 [riot-games-api]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
4155 浏览

java - 使用 Java 检索 Riot API 信息时出现 401(未经授权)

我正在试验 Riot Games API。我确定我的 URL 很好,我必须包含的 API 密钥也很好;我的请求没有理由返回 401。起初我以为它与 Eclipse 有关,但将 API 放入我的浏览器中也会返回 401(API 通常返回的 JSON 格式)。我知道有这方面的论坛,但我想也许这里有人可以指出我的程序是否有错误:

我的进口都算了。

0 投票
1 回答
3921 浏览

riot-games-api - 使用英雄联盟 API 获取 ARAM 比赛历史记录

使用英雄联盟 API,我如何列出所有最近的游戏,包括大乱斗?

此方法表示它将返回匹配历史记录: https ://developer.riotgames.com/api/methods#!/873/3054

但是当我用我的召唤师 ID (32984235) 测试它时,我得到一个空的结果,因为我只玩 ARAM。

我假设这是可能的,因为 LoLKing 做到了 - http://www.lolking.net/summoner/na/32984235#matches

0 投票
1 回答
3410 浏览

riot-games-api - 通过 Riot Api 中的排名来获取召唤师

我刚开始使用 Riot API,我一直在通过他们的排名来获取召唤师。我使用了该getChampion()功能,但它检索的数据与其他已经在运行的站点不同。

我这样使用它:

在我使用$r->getSummoner(266); // 103了所有 id 之后,我从上面的数组中得到了。但是我得到的召唤师名称与其他运行站点不同,例如http://na.op.gg/ranking/ladder/http://quickfind.kassad.in/rankings/na(这两个站点的数据相同,但我的不一样)。

0 投票
0 回答
32 浏览

google-apps - 制作表格的更好方法(htmlservice?)

我用 google script api 创建了我的第一个网络应用程序(它现在有点像一个网页)。

http://bit.do/WhoKilledWho

根据这次经验,我认为“哇,获取数据很容易”。 urlFetchApp.fetch()

整理数据并不容易,但也不算太糟糕。很多循环等等。

然而,为输出创建我的“表”是可怕的。

有没有JSON.htmltablify(myobject)这样简单的事情?

0 投票
3 回答
1296 浏览

javascript - Javascript 用空格替换加号(但不是 %20)

我正在尝试使用英雄联盟 API 并请求某个用户的数据。我用线

存储用户名。但是,当我使用该用户名执行 XMLHttpRequest 时,它会放置 %20 而不是空格。

编辑:当我使用名称中没有空格的用户运行此代码时,它可以工作,但是当他们的名称中有空格时,它表示用户未定义。

例如,如果我正在寻找用户“男人”,它会在

但正确的请求 URL 是

0 投票
2 回答
694 浏览

javascript - Bootstrap 网格中断(不同高度的图像)

我目前正在使用 Riot Games API,我正在使用引导程序来管理“冠军”的网格,这些图像是从 Riot 的图像库加载的,但有些(4-5)比其他图像低 1px。

这打破了网格,并且由于图像根据屏幕宽度改变高度我无法设置高度来修复它,我宁愿不使用 JS 或 jQuery 来计算每次宽度变化时每个图像的高度,所以我我想知道是否有人单独使用 css 或引导类对此进行了巧妙的修复。

该页面是www.mathias-syversen.net

0 投票
1 回答
66 浏览

javascript - 如何在javascript中使用php?

我正在使用 javascript 从 Riot API 检索一堆值,但是我想使用 php 将它们存储在我自己的数据库中。例如,我正在尝试存储游戏 ID,这就是我现在正在尝试的。

我很确定我什至没有接近正确,但我不知道该怎么做。

0 投票
1 回答
1980 浏览

riot-games-api - Riot LOL api 静态 ddragon JSON

我有问题。在静态 LOL json 中,我得到了一个冠军列表以及关于他们的一切。我想填写 {{ f[number] }} 值。我不知道该怎么做,如何计算这个值或其他东西。

你可以在那里看到它:http: //ddragon.leagueoflegends.com/tool/,例如点击阿狸并检查法术 -> 2nd spell。

对单个敌人造成最大未定义的伤害。

他们还没有填写,但我认为这在某种程度上是可能的,因为我得到了关于冠军的全部信息。

这个未定义在 JSON {{ f1 }} 中,还有其他类似的值。

0 投票
1 回答
33 浏览

android - Modifying textviews reliant on threaded API calls?

I've been running into problem after problem trying to make my first app. My understanding is that I'm not allowed to do api calls in the main thread, so I tried using a seperate thread. The problem is, it takes a few seconds for the API to return data, so selectedMatch is null when I try to update my text view, giving me null pointer exceptions. What is the proper way to handle this?

EDIT: The only workaround I've found so far is putting a empty while loop waiting for the thread to finish first, but this seems very inefficient. Would appreciate more input.

0 投票
2 回答
590 浏览

javascript - (Riot-API)仅使用 angularJS 从召唤者(按名称)api 调用中获取 id

我正在使用 angularjs 来检索召唤者信息,但仅检索特定字段(例如仅召唤者名称,仅 id)。如果我得到正确的结果,我正在尝试使用 console.log() 检查。但是,我一直在控制台屏幕上看到这个:

错误:[$resource:badcfg ] http://errors.angularjs.org/1.4.4/$resource/badcfg?p0=query&p1=array&p2=obj…2Fna.api.pvp.net%2Fapi%2Flol%2Fna%2Fv1 .4%2Fsummoner%2Fby-name%2Fsummoner-name 在http://localhost/riotapi_project/angularjs/angular.min.js:6:416 at d.module.provider.$get.e. (匿名函数).q.then.p.$resolved ( http://localhost/riotapi_project/angularjs/angular-resource.min.js:9:330 ) 在http://localhost/riotapi_project/angularjs/angular.min。 js:118:217 在 n.$get.n.$eval ( http://localhost/riotapi_project/angularjs/angular.min.js:133:39 ) 在 n.$get.n.$digest ( http:// /localhost/riotapi_project/angularjs/angular.min.js:130:60) 在 n.$get.n.$apply ( http://localhost/riotapi_project/angularjs/angular.min.js:133:330 ) 在 g ( http://localhost/riotapi_project/angularjs/angular.min.js :87:340 ) 在 K ( http://localhost/riotapi_project/angularjs/angular.min.js:91:406 ) 在 XMLHttpRequest.A.onload ( http://localhost/riotapi_project/angularjs/angular.min.js :92:437 )

这是我的代码: index.html /////////////////////////////////// ///////////////////////////////////////// //////////////////////////////

///////////////////////////////////////// ///////////////////////////////////////// ////////////////////////

api_call.js

///////////////////////////////////////// ///////////////////////////////////////// ////////////////////////

///////////////////////////////////////// ///////////////////////////////////////// ////////////////////////

谁能告诉我我做错了什么?