[Docs] get_shared_api_keys -> get_shared_api_tokens (#3110)

* keys -> tokens

* Changelog
This commit is contained in:
flaree 2019-11-09 19:58:10 +00:00 committed by Michael H
parent b3363acf77
commit 710b520da9
2 changed files with 4 additions and 3 deletions

View File

@ -0,0 +1 @@
Update apikey framework documentation. Change bot.get_shared_api_keys() to bot.get_shared_api_tokens().

View File

@ -18,7 +18,7 @@ and when accessed in the code it should be done by
.. code-block:: python .. code-block:: python
await self.bot.get_shared_api_keys("twitch") await self.bot.get_shared_api_tokens("twitch")
Each service has its own dict of key, value pairs for each required key type. If there's only one key required then a name for the key is still required for storing and accessing. Each service has its own dict of key, value pairs for each required key type. If there's only one key required then a name for the key is still required for storing and accessing.
@ -30,7 +30,7 @@ and when accessed in the code it should be done by
.. code-block:: python .. code-block:: python
await self.bot.get_shared_api_keys("youtube") await self.bot.get_shared_api_tokens("youtube")
*********** ***********
@ -42,7 +42,7 @@ Basic Usage
class MyCog: class MyCog:
@commands.command() @commands.command()
async def youtube(self, ctx, user: str): async def youtube(self, ctx, user: str):
youtube_keys = await self.bot.get_shared_api_keys("youtube") youtube_keys = await self.bot.get_shared_api_tokens("youtube")
if youtube_keys.get("api_key") is None: if youtube_keys.get("api_key") is None:
return await ctx.send("The YouTube API key has not been set.") return await ctx.send("The YouTube API key has not been set.")
# Use the API key to access content as you normally would # Use the API key to access content as you normally would