update docstring
This commit is contained in:
parent
0b37281fb3
commit
25c5ab434b
10
plugin.py
10
plugin.py
@ -50,11 +50,13 @@ class PsychonautWiki(callbacks.Plugin):
|
||||
|
||||
@wrap(['something', optional('something')])
|
||||
def psywiki(self, irc, msg, args, name, category):
|
||||
"""<drug> <category>
|
||||
fetches data on drug from psychonautwiki. Categories currently supported are name, dose, duration
|
||||
"""<drug> [<category>]
|
||||
|
||||
fetches data on <drug> from psychonautwiki. Lists categories available if <category> not provided.
|
||||
Categories currently supported are name, dose, duration, effects, addictionPotential, crossTolerances, toxicity
|
||||
"""
|
||||
categories = ['name', 'summary', 'dose', 'duration', 'effects', 'addictionPotential', 'crossTolerances', 'toxicity']
|
||||
query = { 'query' : 'query getdruginfo($name: String){substances(query: $name) {name summary toxicity addictionPotential crossTolerances effects { name } roas {name dose {units threshold heavy common { min max } light { min max } strong { min max }} duration {afterglow { min max units } comeup { min max units } duration { min max units } offset { min max units } onset { min max units }peak { min max units }total { min max units }}}}}', 'variables': {'name': name}}
|
||||
categories = ['name', 'summary', 'dose', 'duration', 'BA' 'effects', 'addictionPotential', 'crossTolerances', 'toxicity']
|
||||
query = { 'query' : 'query getdruginfo($name: String){substances(query: $name) {name summary toxicity addictionPotential crossTolerances effects { name } roas {name dose {units threshold heavy common { min max } light { min max } strong { min max }} duration {afterglow { min max units } comeup { min max units } duration { min max units } offset { min max units } onset { min max units } peak { min max units } total { min max units }}}}}', 'variables': {'name': name}}
|
||||
r = requests.post(url=url, json=query).json()
|
||||
|
||||
def format_dose(dose, unit):
|
||||
|
Loading…
Reference in New Issue
Block a user