aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-09-25 21:54:38 -0400
committerRapptz <[email protected]>2016-09-25 21:54:38 -0400
commitfc1155c16017d8c3294ac5896f93fbf1fb807024 (patch)
treebf89c8417540206d57a855c1000f236f7376a695
parentVersion bump to v0.12.0 (diff)
downloaddiscord.py-fc1155c16017d8c3294ac5896f93fbf1fb807024.tar.xz
discord.py-fc1155c16017d8c3294ac5896f93fbf1fb807024.zip
Remove unused endpoints.py file.
-rw-r--r--discord/client.py7
-rw-r--r--discord/endpoints.py37
-rw-r--r--discord/gateway.py2
3 files changed, 3 insertions, 43 deletions
diff --git a/discord/client.py b/discord/client.py
index f304be24..0b0d9d5a 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -25,7 +25,6 @@ DEALINGS IN THE SOFTWARE.
"""
from . import __version__ as library_version
-from . import endpoints
from .user import User
from .member import Member
from .channel import Channel, PrivateChannel
@@ -58,8 +57,6 @@ from os.path import split as path_split
PY35 = sys.version_info >= (3, 5)
log = logging.getLogger(__name__)
-request_logging_format = '{method} {response.url} has returned {response.status}'
-request_success_log = '{response.url} with {json} received {data}'
AppInfo = namedtuple('AppInfo', 'id name description icon owner')
def app_info_icon_url(self):
@@ -1665,7 +1662,7 @@ class Client:
if position < 0:
raise InvalidArgument('Channel position cannot be less than 0.')
- url = '{0}/{1.server.id}/channels'.format(endpoints.SERVERS, channel)
+ url = '{0}/{1.server.id}/channels'.format(self.http.GUILDS, channel)
channels = [c for c in channel.server.channels if c.type is channel.type]
if position >= len(channels):
@@ -2302,7 +2299,7 @@ class Client:
if role.position == position:
return # Save discord the extra request.
- url = '{0}/{1.id}/roles'.format(endpoints.SERVERS, server)
+ url = '{0}/{1.id}/roles'.format(self.http.GUILDS, server)
change_range = range(min(role.position, position), max(role.position, position) + 1)
diff --git a/discord/endpoints.py b/discord/endpoints.py
deleted file mode 100644
index 50c14704..00000000
--- a/discord/endpoints.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# -*- coding: utf-8 -*-
-
-"""
-The MIT License (MIT)
-
-Copyright (c) 2015-2016 Rapptz
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-"""
-
-BASE = 'https://discordapp.com'
-API_BASE = BASE + '/api'
-GATEWAY = API_BASE + '/gateway'
-USERS = API_BASE + '/users'
-ME = USERS + '/@me'
-REGISTER = API_BASE + '/auth/register'
-LOGIN = API_BASE + '/auth/login'
-LOGOUT = API_BASE + '/auth/logout'
-SERVERS = API_BASE + '/guilds'
-CHANNELS = API_BASE + '/channels'
-APPLICATIONS = API_BASE + '/oauth2/applications'
diff --git a/discord/gateway.py b/discord/gateway.py
index 9868f956..ff6bc6a8 100644
--- a/discord/gateway.py
+++ b/discord/gateway.py
@@ -28,7 +28,7 @@ import sys
import websockets
import asyncio
import aiohttp
-from . import utils, endpoints, compat
+from . import utils, compat
from .enums import Status
from .game import Game
from .errors import GatewayNotFound, ConnectionClosed, InvalidArgument