Remove unused endpoints.py file.

This commit is contained in:
Rapptz 2016-09-25 21:54:38 -04:00
parent 1987cd10df
commit fc1155c160
3 changed files with 3 additions and 43 deletions

View File

@ -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)

View File

@ -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'

View File

@ -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