linx is now optional because of spongebob

This commit is contained in:
Andrei M
2012-11-26 22:04:36 -05:00
parent 900ac0c5c9
commit 1002bf04c6
3 changed files with 132 additions and 30 deletions

View File

@@ -11,10 +11,10 @@ import web
import json
def get_title(url, channel):
def get_title(phenny, url, channel):
""" Have linx retrieve the (augmented) title """
try:
return web.post("http://linx.li/vtluuggettitle", {'url': url, 'channel': channel})
return web.post("http://linx.li/vtluuggettitle", {'url': url, 'channel': channel, 'api_key': phenny.config.linx_api_key})
except:
return
@@ -28,7 +28,7 @@ def linx(phenny, input, short=False):
return
try:
req = web.post("http://linx.li/vtluug", {'url': url, 'short': short})
req = web.post("http://linx.li/vtluug", {'url': url, 'short': short, 'api_key': phenny.config.linx_api_key})
except (HTTPError, IOError):
raise GrumbleError("THE INTERNET IS FUCKING BROKEN. Please try again later.")
@@ -70,7 +70,7 @@ def lines(phenny, input):
date = "today"
try:
req = web.post("http://linx.li/vtluuglines", {'nickname': nickname, 'date': date, 'sender': input.nick, 'channel': input.sender})
req = web.post("http://linx.li/vtluuglines", {'nickname': nickname, 'date': date, 'sender': input.nick, 'channel': input.sender, 'api_key': phenny.config.linx_api_key})
except (HTTPError, IOError):
raise GrumbleError("THE INTERNET IS FUCKING BROKEN. Please try again later.")
@@ -88,7 +88,7 @@ def posted(phenny, input):
return
try:
req = web.post("http://linx.li/vtluugposted", {'message': message, 'sender': input.nick, 'channel': input.sender})
req = web.post("http://linx.li/vtluugposted", {'message': message, 'sender': input.nick, 'channel': input.sender, 'api_key': phenny.config.linx_api_key})
except (HTTPError, IOError):
raise GrumbleError("THE INTERNET IS FUCKING BROKEN. Please try again later.")