repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
sorgerlab/indra
indra/sources/isi/preprocessor.py
IsiPreprocessor.preprocess_abstract_list
def preprocess_abstract_list(self, abstract_list): """Preprocess abstracts in database pickle dump format for ISI reader. For each abstract, creates a plain text file with one sentence per line, and stores metadata to be included with each statement from that abstract. Paramete...
python
def preprocess_abstract_list(self, abstract_list): """Preprocess abstracts in database pickle dump format for ISI reader. For each abstract, creates a plain text file with one sentence per line, and stores metadata to be included with each statement from that abstract. Paramete...
[ "def", "preprocess_abstract_list", "(", "self", ",", "abstract_list", ")", ":", "for", "abstract_struct", "in", "abstract_list", ":", "abs_format", "=", "abstract_struct", "[", "'format'", "]", "content_type", "=", "abstract_struct", "[", "'text_type'", "]", "conten...
Preprocess abstracts in database pickle dump format for ISI reader. For each abstract, creates a plain text file with one sentence per line, and stores metadata to be included with each statement from that abstract. Parameters ---------- abstract_list : list[dict] ...
[ "Preprocess", "abstracts", "in", "database", "pickle", "dump", "format", "for", "ISI", "reader", "." ]
train
https://github.com/sorgerlab/indra/blob/79a70415832c5702d7a820c7c9ccc8e25010124b/indra/sources/isi/preprocessor.py#L204-L234
sorgerlab/indra
indra/sources/geneways/api.py
process_geneways_files
def process_geneways_files(input_folder=data_folder, get_evidence=True): """Reads in Geneways data and returns a list of statements. Parameters ---------- input_folder : Optional[str] A folder in which to search for Geneways data. Looks for these Geneways extraction data files: human_ac...
python
def process_geneways_files(input_folder=data_folder, get_evidence=True): """Reads in Geneways data and returns a list of statements. Parameters ---------- input_folder : Optional[str] A folder in which to search for Geneways data. Looks for these Geneways extraction data files: human_ac...
[ "def", "process_geneways_files", "(", "input_folder", "=", "data_folder", ",", "get_evidence", "=", "True", ")", ":", "gp", "=", "GenewaysProcessor", "(", "input_folder", ",", "get_evidence", ")", "return", "gp" ]
Reads in Geneways data and returns a list of statements. Parameters ---------- input_folder : Optional[str] A folder in which to search for Geneways data. Looks for these Geneways extraction data files: human_action.txt, human_actionmention.txt, human_symbols.txt. Omit this ...
[ "Reads", "in", "Geneways", "data", "and", "returns", "a", "list", "of", "statements", "." ]
train
https://github.com/sorgerlab/indra/blob/79a70415832c5702d7a820c7c9ccc8e25010124b/indra/sources/geneways/api.py#L24-L47
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.post_update
def post_update(self, post_id, tag_string=None, rating=None, source=None, parent_id=None, has_embedded_notes=None, is_rating_locked=None, is_note_locked=None, is_status_locked=None): """Update a specific post (Requires login). Parameters: ...
python
def post_update(self, post_id, tag_string=None, rating=None, source=None, parent_id=None, has_embedded_notes=None, is_rating_locked=None, is_note_locked=None, is_status_locked=None): """Update a specific post (Requires login). Parameters: ...
[ "def", "post_update", "(", "self", ",", "post_id", ",", "tag_string", "=", "None", ",", "rating", "=", "None", ",", "source", "=", "None", ",", "parent_id", "=", "None", ",", "has_embedded_notes", "=", "None", ",", "is_rating_locked", "=", "None", ",", "...
Update a specific post (Requires login). Parameters: post_id (int): The id number of the post to update. tag_string (str): A space delimited list of tags. rating (str): The rating for the post. Can be: safe, questionable, or explicit. so...
[ "Update", "a", "specific", "post", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L51-L80
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.post_revert
def post_revert(self, post_id, version_id): """Function to reverts a post to a previous version (Requires login). Parameters: post_id (int): version_id (int): The post version id to revert to. """ return self._get('posts/{0}/revert.json'.format(post_id), ...
python
def post_revert(self, post_id, version_id): """Function to reverts a post to a previous version (Requires login). Parameters: post_id (int): version_id (int): The post version id to revert to. """ return self._get('posts/{0}/revert.json'.format(post_id), ...
[ "def", "post_revert", "(", "self", ",", "post_id", ",", "version_id", ")", ":", "return", "self", ".", "_get", "(", "'posts/{0}/revert.json'", ".", "format", "(", "post_id", ")", ",", "{", "'version_id'", ":", "version_id", "}", ",", "'PUT'", ",", "auth", ...
Function to reverts a post to a previous version (Requires login). Parameters: post_id (int): version_id (int): The post version id to revert to.
[ "Function", "to", "reverts", "a", "post", "to", "a", "previous", "version", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L82-L90
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.post_copy_notes
def post_copy_notes(self, post_id, other_post_id): """Function to copy notes (requires login). Parameters: post_id (int): other_post_id (int): The id of the post to copy notes to. """ return self._get('posts/{0}/copy_notes.json'.format(post_id), ...
python
def post_copy_notes(self, post_id, other_post_id): """Function to copy notes (requires login). Parameters: post_id (int): other_post_id (int): The id of the post to copy notes to. """ return self._get('posts/{0}/copy_notes.json'.format(post_id), ...
[ "def", "post_copy_notes", "(", "self", ",", "post_id", ",", "other_post_id", ")", ":", "return", "self", ".", "_get", "(", "'posts/{0}/copy_notes.json'", ".", "format", "(", "post_id", ")", ",", "{", "'other_post_id'", ":", "other_post_id", "}", ",", "'PUT'", ...
Function to copy notes (requires login). Parameters: post_id (int): other_post_id (int): The id of the post to copy notes to.
[ "Function", "to", "copy", "notes", "(", "requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L92-L100
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.post_mark_translated
def post_mark_translated(self, post_id, check_translation, partially_translated): """Mark post as translated (Requires login) (UNTESTED). If you set check_translation and partially_translated to 1 post will be tagged as 'translated_request' Parameters: ...
python
def post_mark_translated(self, post_id, check_translation, partially_translated): """Mark post as translated (Requires login) (UNTESTED). If you set check_translation and partially_translated to 1 post will be tagged as 'translated_request' Parameters: ...
[ "def", "post_mark_translated", "(", "self", ",", "post_id", ",", "check_translation", ",", "partially_translated", ")", ":", "param", "=", "{", "'post[check_translation]'", ":", "check_translation", ",", "'post[partially_translated]'", ":", "partially_translated", "}", ...
Mark post as translated (Requires login) (UNTESTED). If you set check_translation and partially_translated to 1 post will be tagged as 'translated_request' Parameters: post_id (int): check_translation (int): Can be 0, 1. partially_translated (int): Can be 0,...
[ "Mark", "post", "as", "translated", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L102-L119
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.post_vote
def post_vote(self, post_id, score): """Action lets you vote for a post (Requires login). Danbooru: Post votes/create. Parameters: post_id (int): score (str): Can be: up, down. """ return self._get('posts/{0}/votes.json'.format(post_id), ...
python
def post_vote(self, post_id, score): """Action lets you vote for a post (Requires login). Danbooru: Post votes/create. Parameters: post_id (int): score (str): Can be: up, down. """ return self._get('posts/{0}/votes.json'.format(post_id), ...
[ "def", "post_vote", "(", "self", ",", "post_id", ",", "score", ")", ":", "return", "self", ".", "_get", "(", "'posts/{0}/votes.json'", ".", "format", "(", "post_id", ")", ",", "{", "'score'", ":", "score", "}", ",", "'POST'", ",", "auth", "=", "True", ...
Action lets you vote for a post (Requires login). Danbooru: Post votes/create. Parameters: post_id (int): score (str): Can be: up, down.
[ "Action", "lets", "you", "vote", "for", "a", "post", "(", "Requires", "login", ")", ".", "Danbooru", ":", "Post", "votes", "/", "create", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L121-L130
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.post_unvote
def post_unvote(self, post_id): """Action lets you unvote for a post (Requires login). Parameters: post_id (int): """ return self._get('posts/{0}/unvote.json'.format(post_id), method='PUT', auth=True)
python
def post_unvote(self, post_id): """Action lets you unvote for a post (Requires login). Parameters: post_id (int): """ return self._get('posts/{0}/unvote.json'.format(post_id), method='PUT', auth=True)
[ "def", "post_unvote", "(", "self", ",", "post_id", ")", ":", "return", "self", ".", "_get", "(", "'posts/{0}/unvote.json'", ".", "format", "(", "post_id", ")", ",", "method", "=", "'PUT'", ",", "auth", "=", "True", ")" ]
Action lets you unvote for a post (Requires login). Parameters: post_id (int):
[ "Action", "lets", "you", "unvote", "for", "a", "post", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L132-L139
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.post_flag_list
def post_flag_list(self, creator_id=None, creator_name=None, post_id=None, reason_matches=None, is_resolved=None, category=None): """Function to flag a post (Requires login). Parameters: creator_id (int): The user id of the flag's creator. creator_name (st...
python
def post_flag_list(self, creator_id=None, creator_name=None, post_id=None, reason_matches=None, is_resolved=None, category=None): """Function to flag a post (Requires login). Parameters: creator_id (int): The user id of the flag's creator. creator_name (st...
[ "def", "post_flag_list", "(", "self", ",", "creator_id", "=", "None", ",", "creator_name", "=", "None", ",", "post_id", "=", "None", ",", "reason_matches", "=", "None", ",", "is_resolved", "=", "None", ",", "category", "=", "None", ")", ":", "params", "=...
Function to flag a post (Requires login). Parameters: creator_id (int): The user id of the flag's creator. creator_name (str): The name of the flag's creator. post_id (int): The post id if the flag.
[ "Function", "to", "flag", "a", "post", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L141-L155
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.post_flag_create
def post_flag_create(self, post_id, reason): """Function to flag a post. Parameters: post_id (int): The id of the flagged post. reason (str): The reason of the flagging. """ params = {'post_flag[post_id]': post_id, 'post_flag[reason]': reason} return self...
python
def post_flag_create(self, post_id, reason): """Function to flag a post. Parameters: post_id (int): The id of the flagged post. reason (str): The reason of the flagging. """ params = {'post_flag[post_id]': post_id, 'post_flag[reason]': reason} return self...
[ "def", "post_flag_create", "(", "self", ",", "post_id", ",", "reason", ")", ":", "params", "=", "{", "'post_flag[post_id]'", ":", "post_id", ",", "'post_flag[reason]'", ":", "reason", "}", "return", "self", ".", "_get", "(", "'post_flags.json'", ",", "params",...
Function to flag a post. Parameters: post_id (int): The id of the flagged post. reason (str): The reason of the flagging.
[ "Function", "to", "flag", "a", "post", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L165-L173
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.post_appeals_list
def post_appeals_list(self, creator_id=None, creator_name=None, post_id=None): """Function to return list of appeals (Requires login). Parameters: creator_id (int): The user id of the appeal's creator. creator_name (str): The name of the appeal's creato...
python
def post_appeals_list(self, creator_id=None, creator_name=None, post_id=None): """Function to return list of appeals (Requires login). Parameters: creator_id (int): The user id of the appeal's creator. creator_name (str): The name of the appeal's creato...
[ "def", "post_appeals_list", "(", "self", ",", "creator_id", "=", "None", ",", "creator_name", "=", "None", ",", "post_id", "=", "None", ")", ":", "params", "=", "{", "'creator_id'", ":", "creator_id", ",", "'creator_name'", ":", "creator_name", ",", "'post_i...
Function to return list of appeals (Requires login). Parameters: creator_id (int): The user id of the appeal's creator. creator_name (str): The name of the appeal's creator. post_id (int): The post id if the appeal.
[ "Function", "to", "return", "list", "of", "appeals", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L175-L189
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.post_appeals_create
def post_appeals_create(self, post_id, reason): """Function to create appeals (Requires login). Parameters: post_id (int): The id of the appealed post. reason (str) The reason of the appeal. """ params = {'post_appeal[post_id]': post_id, 'post_a...
python
def post_appeals_create(self, post_id, reason): """Function to create appeals (Requires login). Parameters: post_id (int): The id of the appealed post. reason (str) The reason of the appeal. """ params = {'post_appeal[post_id]': post_id, 'post_a...
[ "def", "post_appeals_create", "(", "self", ",", "post_id", ",", "reason", ")", ":", "params", "=", "{", "'post_appeal[post_id]'", ":", "post_id", ",", "'post_appeal[reason]'", ":", "reason", "}", "return", "self", ".", "_get", "(", "'post_appeals.json'", ",", ...
Function to create appeals (Requires login). Parameters: post_id (int): The id of the appealed post. reason (str) The reason of the appeal.
[ "Function", "to", "create", "appeals", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L199-L208
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.post_versions_list
def post_versions_list(self, updater_name=None, updater_id=None, post_id=None, start_id=None): """Get list of post versions. Parameters: updater_name (str): updater_id (int): post_id (int): start_id (int): """ pa...
python
def post_versions_list(self, updater_name=None, updater_id=None, post_id=None, start_id=None): """Get list of post versions. Parameters: updater_name (str): updater_id (int): post_id (int): start_id (int): """ pa...
[ "def", "post_versions_list", "(", "self", ",", "updater_name", "=", "None", ",", "updater_id", "=", "None", ",", "post_id", "=", "None", ",", "start_id", "=", "None", ")", ":", "params", "=", "{", "'search[updater_name]'", ":", "updater_name", ",", "'search[...
Get list of post versions. Parameters: updater_name (str): updater_id (int): post_id (int): start_id (int):
[ "Get", "list", "of", "post", "versions", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L210-L226
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.post_versions_undo
def post_versions_undo(self, version_id): """Undo post version (Requires login) (UNTESTED). Parameters: version_id (int): """ return self._get('post_versions/{0}/undo.json'.format(version_id), method='PUT', auth=True)
python
def post_versions_undo(self, version_id): """Undo post version (Requires login) (UNTESTED). Parameters: version_id (int): """ return self._get('post_versions/{0}/undo.json'.format(version_id), method='PUT', auth=True)
[ "def", "post_versions_undo", "(", "self", ",", "version_id", ")", ":", "return", "self", ".", "_get", "(", "'post_versions/{0}/undo.json'", ".", "format", "(", "version_id", ")", ",", "method", "=", "'PUT'", ",", "auth", "=", "True", ")" ]
Undo post version (Requires login) (UNTESTED). Parameters: version_id (int):
[ "Undo", "post", "version", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L236-L243
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.upload_list
def upload_list(self, uploader_id=None, uploader_name=None, source=None): """Search and return an uploads list (Requires login). Parameters: uploader_id (int): The id of the uploader. uploader_name (str): The name of the uploader. source (str): The source of the uplo...
python
def upload_list(self, uploader_id=None, uploader_name=None, source=None): """Search and return an uploads list (Requires login). Parameters: uploader_id (int): The id of the uploader. uploader_name (str): The name of the uploader. source (str): The source of the uplo...
[ "def", "upload_list", "(", "self", ",", "uploader_id", "=", "None", ",", "uploader_name", "=", "None", ",", "source", "=", "None", ")", ":", "params", "=", "{", "'search[uploader_id]'", ":", "uploader_id", ",", "'search[uploader_name]'", ":", "uploader_name", ...
Search and return an uploads list (Requires login). Parameters: uploader_id (int): The id of the uploader. uploader_name (str): The name of the uploader. source (str): The source of the upload (exact string match).
[ "Search", "and", "return", "an", "uploads", "list", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L253-L266
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.upload_create
def upload_create(self, tags, rating, file_=None, source=None, parent_id=None): """Function to create a new upload (Requires login). Parameters: tags (str): rating (str): Can be: `s`, `q`, or `e`. Alternatively, you can specify `ra...
python
def upload_create(self, tags, rating, file_=None, source=None, parent_id=None): """Function to create a new upload (Requires login). Parameters: tags (str): rating (str): Can be: `s`, `q`, or `e`. Alternatively, you can specify `ra...
[ "def", "upload_create", "(", "self", ",", "tags", ",", "rating", ",", "file_", "=", "None", ",", "source", "=", "None", ",", "parent_id", "=", "None", ")", ":", "if", "file_", "or", "source", "is", "not", "None", ":", "params", "=", "{", "'upload[sou...
Function to create a new upload (Requires login). Parameters: tags (str): rating (str): Can be: `s`, `q`, or `e`. Alternatively, you can specify `rating:safe`, `rating:questionable`, or `rating:explicit` in the tag string. ...
[ "Function", "to", "create", "a", "new", "upload", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L276-L303
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.comment_list
def comment_list(self, group_by, limit=None, page=None, body_matches=None, post_id=None, post_tags_match=None, creator_name=None, creator_id=None, is_deleted=None): """Return a list of comments. Parameters: limit (int): How many posts you want to re...
python
def comment_list(self, group_by, limit=None, page=None, body_matches=None, post_id=None, post_tags_match=None, creator_name=None, creator_id=None, is_deleted=None): """Return a list of comments. Parameters: limit (int): How many posts you want to re...
[ "def", "comment_list", "(", "self", ",", "group_by", ",", "limit", "=", "None", ",", "page", "=", "None", ",", "body_matches", "=", "None", ",", "post_id", "=", "None", ",", "post_tags_match", "=", "None", ",", "creator_name", "=", "None", ",", "creator_...
Return a list of comments. Parameters: limit (int): How many posts you want to retrieve. page (int): The page number. group_by: Can be 'comment', 'post'. Comment will return recent comments. Post will return posts that have been recently ...
[ "Return", "a", "list", "of", "comments", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L305-L338
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.comment_create
def comment_create(self, post_id, body, do_not_bump_post=None): """Action to lets you create a comment (Requires login). Parameters: post_id (int): body (str): do_not_bump_post (bool): Set to 1 if you do not want the post to be bu...
python
def comment_create(self, post_id, body, do_not_bump_post=None): """Action to lets you create a comment (Requires login). Parameters: post_id (int): body (str): do_not_bump_post (bool): Set to 1 if you do not want the post to be bu...
[ "def", "comment_create", "(", "self", ",", "post_id", ",", "body", ",", "do_not_bump_post", "=", "None", ")", ":", "params", "=", "{", "'comment[post_id]'", ":", "post_id", ",", "'comment[body]'", ":", "body", ",", "'comment[do_not_bump_post]'", ":", "do_not_bum...
Action to lets you create a comment (Requires login). Parameters: post_id (int): body (str): do_not_bump_post (bool): Set to 1 if you do not want the post to be bumped to the top of the comment listing.
[ "Action", "to", "lets", "you", "create", "a", "comment", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L340-L354
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.comment_update
def comment_update(self, comment_id, body): """Function to update a comment (Requires login). Parameters: comment_id (int): body (str): """ params = {'comment[body]': body} return self._get('comments/{0}.json'.format(comment_id), params, 'PUT', ...
python
def comment_update(self, comment_id, body): """Function to update a comment (Requires login). Parameters: comment_id (int): body (str): """ params = {'comment[body]': body} return self._get('comments/{0}.json'.format(comment_id), params, 'PUT', ...
[ "def", "comment_update", "(", "self", ",", "comment_id", ",", "body", ")", ":", "params", "=", "{", "'comment[body]'", ":", "body", "}", "return", "self", ".", "_get", "(", "'comments/{0}.json'", ".", "format", "(", "comment_id", ")", ",", "params", ",", ...
Function to update a comment (Requires login). Parameters: comment_id (int): body (str):
[ "Function", "to", "update", "a", "comment", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L356-L365
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.comment_delete
def comment_delete(self, comment_id): """Remove a specific comment (Requires login). Parameters: comment_id (int): The id number of the comment to remove. """ return self._get('comments/{0}.json'.format(comment_id), method='DELETE', auth=True)
python
def comment_delete(self, comment_id): """Remove a specific comment (Requires login). Parameters: comment_id (int): The id number of the comment to remove. """ return self._get('comments/{0}.json'.format(comment_id), method='DELETE', auth=True)
[ "def", "comment_delete", "(", "self", ",", "comment_id", ")", ":", "return", "self", ".", "_get", "(", "'comments/{0}.json'", ".", "format", "(", "comment_id", ")", ",", "method", "=", "'DELETE'", ",", "auth", "=", "True", ")" ]
Remove a specific comment (Requires login). Parameters: comment_id (int): The id number of the comment to remove.
[ "Remove", "a", "specific", "comment", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L375-L382
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.comment_undelete
def comment_undelete(self, comment_id): """Undelete a specific comment (Requires login) (UNTESTED). Parameters: comment_id (int): """ return self._get('comments/{0}/undelete.json'.format(comment_id), method='POST', auth=True)
python
def comment_undelete(self, comment_id): """Undelete a specific comment (Requires login) (UNTESTED). Parameters: comment_id (int): """ return self._get('comments/{0}/undelete.json'.format(comment_id), method='POST', auth=True)
[ "def", "comment_undelete", "(", "self", ",", "comment_id", ")", ":", "return", "self", ".", "_get", "(", "'comments/{0}/undelete.json'", ".", "format", "(", "comment_id", ")", ",", "method", "=", "'POST'", ",", "auth", "=", "True", ")" ]
Undelete a specific comment (Requires login) (UNTESTED). Parameters: comment_id (int):
[ "Undelete", "a", "specific", "comment", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L384-L391
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.comment_vote
def comment_vote(self, comment_id, score): """Lets you vote for a comment (Requires login). Parameters: comment_id (int): score (str): Can be: up, down. """ params = {'score': score} return self._get('comments/{0}/votes.json'.format(comment_id), params, ...
python
def comment_vote(self, comment_id, score): """Lets you vote for a comment (Requires login). Parameters: comment_id (int): score (str): Can be: up, down. """ params = {'score': score} return self._get('comments/{0}/votes.json'.format(comment_id), params, ...
[ "def", "comment_vote", "(", "self", ",", "comment_id", ",", "score", ")", ":", "params", "=", "{", "'score'", ":", "score", "}", "return", "self", ".", "_get", "(", "'comments/{0}/votes.json'", ".", "format", "(", "comment_id", ")", ",", "params", ",", "...
Lets you vote for a comment (Requires login). Parameters: comment_id (int): score (str): Can be: up, down.
[ "Lets", "you", "vote", "for", "a", "comment", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L393-L402
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.comment_unvote
def comment_unvote(self, comment_id): """Lets you unvote a specific comment (Requires login). Parameters: comment_id (int): """ return self._get('posts/{0}/unvote.json'.format(comment_id), method='POST', auth=True)
python
def comment_unvote(self, comment_id): """Lets you unvote a specific comment (Requires login). Parameters: comment_id (int): """ return self._get('posts/{0}/unvote.json'.format(comment_id), method='POST', auth=True)
[ "def", "comment_unvote", "(", "self", ",", "comment_id", ")", ":", "return", "self", ".", "_get", "(", "'posts/{0}/unvote.json'", ".", "format", "(", "comment_id", ")", ",", "method", "=", "'POST'", ",", "auth", "=", "True", ")" ]
Lets you unvote a specific comment (Requires login). Parameters: comment_id (int):
[ "Lets", "you", "unvote", "a", "specific", "comment", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L404-L411
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.favorite_remove
def favorite_remove(self, post_id): """Remove a post from favorites (Requires login). Parameters: post_id (int): Where post_id is the post id. """ return self._get('favorites/{0}.json'.format(post_id), method='DELETE', auth=True)
python
def favorite_remove(self, post_id): """Remove a post from favorites (Requires login). Parameters: post_id (int): Where post_id is the post id. """ return self._get('favorites/{0}.json'.format(post_id), method='DELETE', auth=True)
[ "def", "favorite_remove", "(", "self", ",", "post_id", ")", ":", "return", "self", ".", "_get", "(", "'favorites/{0}.json'", ".", "format", "(", "post_id", ")", ",", "method", "=", "'DELETE'", ",", "auth", "=", "True", ")" ]
Remove a post from favorites (Requires login). Parameters: post_id (int): Where post_id is the post id.
[ "Remove", "a", "post", "from", "favorites", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L431-L438
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.dmail_list
def dmail_list(self, message_matches=None, to_name=None, to_id=None, from_name=None, from_id=None, read=None): """Return list of Dmails. You can only view dmails you own (Requires login). Parameters: message_matches (str): The message body contains the given terms...
python
def dmail_list(self, message_matches=None, to_name=None, to_id=None, from_name=None, from_id=None, read=None): """Return list of Dmails. You can only view dmails you own (Requires login). Parameters: message_matches (str): The message body contains the given terms...
[ "def", "dmail_list", "(", "self", ",", "message_matches", "=", "None", ",", "to_name", "=", "None", ",", "to_id", "=", "None", ",", "from_name", "=", "None", ",", "from_id", "=", "None", ",", "read", "=", "None", ")", ":", "params", "=", "{", "'searc...
Return list of Dmails. You can only view dmails you own (Requires login). Parameters: message_matches (str): The message body contains the given terms. to_name (str): The recipient's name. to_id (int): The recipient's user id. from_name (str): The sender'...
[ "Return", "list", "of", "Dmails", ".", "You", "can", "only", "view", "dmails", "you", "own", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L440-L461
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.dmail_create
def dmail_create(self, to_name, title, body): """Create a dmail (Requires login) Parameters: to_name (str): The recipient's name. title (str): The title of the message. body (str): The body of the message. """ params = { 'dmail[to_name]': ...
python
def dmail_create(self, to_name, title, body): """Create a dmail (Requires login) Parameters: to_name (str): The recipient's name. title (str): The title of the message. body (str): The body of the message. """ params = { 'dmail[to_name]': ...
[ "def", "dmail_create", "(", "self", ",", "to_name", ",", "title", ",", "body", ")", ":", "params", "=", "{", "'dmail[to_name]'", ":", "to_name", ",", "'dmail[title]'", ":", "title", ",", "'dmail[body]'", ":", "body", "}", "return", "self", ".", "_get", "...
Create a dmail (Requires login) Parameters: to_name (str): The recipient's name. title (str): The title of the message. body (str): The body of the message.
[ "Create", "a", "dmail", "(", "Requires", "login", ")" ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L472-L485
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.dmail_delete
def dmail_delete(self, dmail_id): """Delete a dmail. You can only delete dmails you own (Requires login). Parameters: dmail_id (int): where dmail_id is the dmail id. """ return self._get('dmails/{0}.json'.format(dmail_id), method='DELETE', auth=True)
python
def dmail_delete(self, dmail_id): """Delete a dmail. You can only delete dmails you own (Requires login). Parameters: dmail_id (int): where dmail_id is the dmail id. """ return self._get('dmails/{0}.json'.format(dmail_id), method='DELETE', auth=True)
[ "def", "dmail_delete", "(", "self", ",", "dmail_id", ")", ":", "return", "self", ".", "_get", "(", "'dmails/{0}.json'", ".", "format", "(", "dmail_id", ")", ",", "method", "=", "'DELETE'", ",", "auth", "=", "True", ")" ]
Delete a dmail. You can only delete dmails you own (Requires login). Parameters: dmail_id (int): where dmail_id is the dmail id.
[ "Delete", "a", "dmail", ".", "You", "can", "only", "delete", "dmails", "you", "own", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L487-L494
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.artist_list
def artist_list(self, query=None, artist_id=None, creator_name=None, creator_id=None, is_active=None, is_banned=None, empty_only=None, order=None): """Get an artist of a list of artists. Parameters: query (str): This field has multiple...
python
def artist_list(self, query=None, artist_id=None, creator_name=None, creator_id=None, is_active=None, is_banned=None, empty_only=None, order=None): """Get an artist of a list of artists. Parameters: query (str): This field has multiple...
[ "def", "artist_list", "(", "self", ",", "query", "=", "None", ",", "artist_id", "=", "None", ",", "creator_name", "=", "None", ",", "creator_id", "=", "None", ",", "is_active", "=", "None", ",", "is_banned", "=", "None", ",", "empty_only", "=", "None", ...
Get an artist of a list of artists. Parameters: query (str): This field has multiple uses depending on what the query starts with: 'http:desired_url': Search for artist with this URL. 'name:desired_url': ...
[ "Get", "an", "artist", "of", "a", "list", "of", "artists", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L496-L537
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.artist_create
def artist_create(self, name, other_names_comma=None, group_name=None, url_string=None, body=None): """Function to create an artist (Requires login) (UNTESTED). Parameters: name (str): other_names_comma (str): List of alternative names for this ...
python
def artist_create(self, name, other_names_comma=None, group_name=None, url_string=None, body=None): """Function to create an artist (Requires login) (UNTESTED). Parameters: name (str): other_names_comma (str): List of alternative names for this ...
[ "def", "artist_create", "(", "self", ",", "name", ",", "other_names_comma", "=", "None", ",", "group_name", "=", "None", ",", "url_string", "=", "None", ",", "body", "=", "None", ")", ":", "params", "=", "{", "'artist[name]'", ":", "name", ",", "'artist[...
Function to create an artist (Requires login) (UNTESTED). Parameters: name (str): other_names_comma (str): List of alternative names for this artist, comma delimited. group_name (str): The name of the group this artist belongs to. ...
[ "Function", "to", "create", "an", "artist", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L547-L568
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.artist_update
def artist_update(self, artist_id, name=None, other_names_comma=None, group_name=None, url_string=None, body=None): """Function to update artists (Requires login) (UNTESTED). Parameters: artist_id (str): name (str): Artist name. other_names_comm...
python
def artist_update(self, artist_id, name=None, other_names_comma=None, group_name=None, url_string=None, body=None): """Function to update artists (Requires login) (UNTESTED). Parameters: artist_id (str): name (str): Artist name. other_names_comm...
[ "def", "artist_update", "(", "self", ",", "artist_id", ",", "name", "=", "None", ",", "other_names_comma", "=", "None", ",", "group_name", "=", "None", ",", "url_string", "=", "None", ",", "body", "=", "None", ")", ":", "params", "=", "{", "'artist[name]...
Function to update artists (Requires login) (UNTESTED). Parameters: artist_id (str): name (str): Artist name. other_names_comma (str): List of alternative names for this artist, comma delimited. group_name (str): The name of t...
[ "Function", "to", "update", "artists", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L570-L593
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.artist_delete
def artist_delete(self, artist_id): """Action to lets you delete an artist (Requires login) (UNTESTED) (Only Builder+). Parameters: artist_id (int): Where artist_id is the artist id. """ return self._get('artists/{0}.json'.format(artist_id), method='DELETE', ...
python
def artist_delete(self, artist_id): """Action to lets you delete an artist (Requires login) (UNTESTED) (Only Builder+). Parameters: artist_id (int): Where artist_id is the artist id. """ return self._get('artists/{0}.json'.format(artist_id), method='DELETE', ...
[ "def", "artist_delete", "(", "self", ",", "artist_id", ")", ":", "return", "self", ".", "_get", "(", "'artists/{0}.json'", ".", "format", "(", "artist_id", ")", ",", "method", "=", "'DELETE'", ",", "auth", "=", "True", ")" ]
Action to lets you delete an artist (Requires login) (UNTESTED) (Only Builder+). Parameters: artist_id (int): Where artist_id is the artist id.
[ "Action", "to", "lets", "you", "delete", "an", "artist", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "(", "Only", "Builder", "+", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L595-L603
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.artist_undelete
def artist_undelete(self, artist_id): """Lets you undelete artist (Requires login) (UNTESTED) (Only Builder+). Parameters: artist_id (int): """ return self._get('artists/{0}/undelete.json'.format(artist_id), method='POST', auth=True)
python
def artist_undelete(self, artist_id): """Lets you undelete artist (Requires login) (UNTESTED) (Only Builder+). Parameters: artist_id (int): """ return self._get('artists/{0}/undelete.json'.format(artist_id), method='POST', auth=True)
[ "def", "artist_undelete", "(", "self", ",", "artist_id", ")", ":", "return", "self", ".", "_get", "(", "'artists/{0}/undelete.json'", ".", "format", "(", "artist_id", ")", ",", "method", "=", "'POST'", ",", "auth", "=", "True", ")" ]
Lets you undelete artist (Requires login) (UNTESTED) (Only Builder+). Parameters: artist_id (int):
[ "Lets", "you", "undelete", "artist", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "(", "Only", "Builder", "+", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L605-L612
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.artist_revert
def artist_revert(self, artist_id, version_id): """Revert an artist (Requires login) (UNTESTED). Parameters: artist_id (int): The artist id. version_id (int): The artist version id to revert to. """ params = {'version_id': version_id} return self._get('ar...
python
def artist_revert(self, artist_id, version_id): """Revert an artist (Requires login) (UNTESTED). Parameters: artist_id (int): The artist id. version_id (int): The artist version id to revert to. """ params = {'version_id': version_id} return self._get('ar...
[ "def", "artist_revert", "(", "self", ",", "artist_id", ",", "version_id", ")", ":", "params", "=", "{", "'version_id'", ":", "version_id", "}", "return", "self", ".", "_get", "(", "'artists/{0}/revert.json'", ".", "format", "(", "artist_id", ")", ",", "param...
Revert an artist (Requires login) (UNTESTED). Parameters: artist_id (int): The artist id. version_id (int): The artist version id to revert to.
[ "Revert", "an", "artist", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L619-L628
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.artist_versions
def artist_versions(self, name=None, updater_name=None, updater_id=None, artist_id=None, is_active=None, is_banned=None, order=None): """Get list of artist versions (Requires login). Parameters: name (str): updater_name (str): ...
python
def artist_versions(self, name=None, updater_name=None, updater_id=None, artist_id=None, is_active=None, is_banned=None, order=None): """Get list of artist versions (Requires login). Parameters: name (str): updater_name (str): ...
[ "def", "artist_versions", "(", "self", ",", "name", "=", "None", ",", "updater_name", "=", "None", ",", "updater_id", "=", "None", ",", "artist_id", "=", "None", ",", "is_active", "=", "None", ",", "is_banned", "=", "None", ",", "order", "=", "None", "...
Get list of artist versions (Requires login). Parameters: name (str): updater_name (str): updater_id (int): artist_id (int): is_active (bool): Can be: True, False. is_banned (bool): Can be: True, False. order (str): Can be: nam...
[ "Get", "list", "of", "artist", "versions", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L630-L653
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.artist_commentary_list
def artist_commentary_list(self, text_matches=None, post_id=None, post_tags_match=None, original_present=None, translated_present=None): """list artist commentary. Parameters: text_matches (str): post_id (int): ...
python
def artist_commentary_list(self, text_matches=None, post_id=None, post_tags_match=None, original_present=None, translated_present=None): """list artist commentary. Parameters: text_matches (str): post_id (int): ...
[ "def", "artist_commentary_list", "(", "self", ",", "text_matches", "=", "None", ",", "post_id", "=", "None", ",", "post_tags_match", "=", "None", ",", "original_present", "=", "None", ",", "translated_present", "=", "None", ")", ":", "params", "=", "{", "'se...
list artist commentary. Parameters: text_matches (str): post_id (int): post_tags_match (str): The commentary's post's tags match the giventerms. Meta-tags not supported. original_present (str): Can be: yes, no. trans...
[ "list", "artist", "commentary", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L655-L675
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.artist_commentary_create_update
def artist_commentary_create_update(self, post_id, original_title, original_description, translated_title, translated_description): """Create or update artist commentary (Requires login) (UNTESTED). Parameters: ...
python
def artist_commentary_create_update(self, post_id, original_title, original_description, translated_title, translated_description): """Create or update artist commentary (Requires login) (UNTESTED). Parameters: ...
[ "def", "artist_commentary_create_update", "(", "self", ",", "post_id", ",", "original_title", ",", "original_description", ",", "translated_title", ",", "translated_description", ")", ":", "params", "=", "{", "'artist_commentary[post_id]'", ":", "post_id", ",", "'artist...
Create or update artist commentary (Requires login) (UNTESTED). Parameters: post_id (int): Post id. original_title (str): Original title. original_description (str): Original description. translated_title (str): Translated title. translated_descriptio...
[ "Create", "or", "update", "artist", "commentary", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L677-L697
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.artist_commentary_revert
def artist_commentary_revert(self, id_, version_id): """Revert artist commentary (Requires login) (UNTESTED). Parameters: id_ (int): The artist commentary id. version_id (int): The artist commentary version id to revert to. """ param...
python
def artist_commentary_revert(self, id_, version_id): """Revert artist commentary (Requires login) (UNTESTED). Parameters: id_ (int): The artist commentary id. version_id (int): The artist commentary version id to revert to. """ param...
[ "def", "artist_commentary_revert", "(", "self", ",", "id_", ",", "version_id", ")", ":", "params", "=", "{", "'version_id'", ":", "version_id", "}", "return", "self", ".", "_get", "(", "'artist_commentaries/{0}/revert.json'", ".", "format", "(", "id_", ")", ",...
Revert artist commentary (Requires login) (UNTESTED). Parameters: id_ (int): The artist commentary id. version_id (int): The artist commentary version id to revert to.
[ "Revert", "artist", "commentary", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L699-L709
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.artist_commentary_versions
def artist_commentary_versions(self, post_id, updater_id): """Return list of artist commentary versions. Parameters: updater_id (int): post_id (int): """ params = {'search[updater_id]': updater_id, 'search[post_id]': post_id} return self._get('artist_comm...
python
def artist_commentary_versions(self, post_id, updater_id): """Return list of artist commentary versions. Parameters: updater_id (int): post_id (int): """ params = {'search[updater_id]': updater_id, 'search[post_id]': post_id} return self._get('artist_comm...
[ "def", "artist_commentary_versions", "(", "self", ",", "post_id", ",", "updater_id", ")", ":", "params", "=", "{", "'search[updater_id]'", ":", "updater_id", ",", "'search[post_id]'", ":", "post_id", "}", "return", "self", ".", "_get", "(", "'artist_commentary_ver...
Return list of artist commentary versions. Parameters: updater_id (int): post_id (int):
[ "Return", "list", "of", "artist", "commentary", "versions", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L711-L719
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.note_list
def note_list(self, body_matches=None, post_id=None, post_tags_match=None, creator_name=None, creator_id=None, is_active=None): """Return list of notes. Parameters: body_matches (str): The note's body matches the given terms. post_id (int): A specific post. ...
python
def note_list(self, body_matches=None, post_id=None, post_tags_match=None, creator_name=None, creator_id=None, is_active=None): """Return list of notes. Parameters: body_matches (str): The note's body matches the given terms. post_id (int): A specific post. ...
[ "def", "note_list", "(", "self", ",", "body_matches", "=", "None", ",", "post_id", "=", "None", ",", "post_tags_match", "=", "None", ",", "creator_name", "=", "None", ",", "creator_id", "=", "None", ",", "is_active", "=", "None", ")", ":", "params", "=",...
Return list of notes. Parameters: body_matches (str): The note's body matches the given terms. post_id (int): A specific post. post_tags_match (str): The note's post's tags match the given terms. creator_name (str): The creator's name. Exact match. cr...
[ "Return", "list", "of", "notes", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L721-L741
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.note_create
def note_create(self, post_id, coor_x, coor_y, width, height, body): """Function to create a note (Requires login) (UNTESTED). Parameters: post_id (int): coor_x (int): The x coordinates of the note in pixels, with respect to the top-left corner of the i...
python
def note_create(self, post_id, coor_x, coor_y, width, height, body): """Function to create a note (Requires login) (UNTESTED). Parameters: post_id (int): coor_x (int): The x coordinates of the note in pixels, with respect to the top-left corner of the i...
[ "def", "note_create", "(", "self", ",", "post_id", ",", "coor_x", ",", "coor_y", ",", "width", ",", "height", ",", "body", ")", ":", "params", "=", "{", "'note[post_id]'", ":", "post_id", ",", "'note[x]'", ":", "coor_x", ",", "'note[y]'", ":", "coor_y", ...
Function to create a note (Requires login) (UNTESTED). Parameters: post_id (int): coor_x (int): The x coordinates of the note in pixels, with respect to the top-left corner of the image. coor_y (int): The y coordinates of the note in pixels, ...
[ "Function", "to", "create", "a", "note", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L751-L772
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.note_update
def note_update(self, note_id, coor_x=None, coor_y=None, width=None, height=None, body=None): """Function to update a note (Requires login) (UNTESTED). Parameters: note_id (int): Where note_id is the note id. coor_x (int): The x coordinates of the note in pix...
python
def note_update(self, note_id, coor_x=None, coor_y=None, width=None, height=None, body=None): """Function to update a note (Requires login) (UNTESTED). Parameters: note_id (int): Where note_id is the note id. coor_x (int): The x coordinates of the note in pix...
[ "def", "note_update", "(", "self", ",", "note_id", ",", "coor_x", "=", "None", ",", "coor_y", "=", "None", ",", "width", "=", "None", ",", "height", "=", "None", ",", "body", "=", "None", ")", ":", "params", "=", "{", "'note[x]'", ":", "coor_x", ",...
Function to update a note (Requires login) (UNTESTED). Parameters: note_id (int): Where note_id is the note id. coor_x (int): The x coordinates of the note in pixels, with respect to the top-left corner of the image. coor_y (int): The y coordinates ...
[ "Function", "to", "update", "a", "note", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L774-L796
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.note_delete
def note_delete(self, note_id): """delete a specific note (Requires login) (UNTESTED). Parameters: note_id (int): Where note_id is the note id. """ return self._get('notes/{0}.json'.format(note_id), method='DELETE', auth=True)
python
def note_delete(self, note_id): """delete a specific note (Requires login) (UNTESTED). Parameters: note_id (int): Where note_id is the note id. """ return self._get('notes/{0}.json'.format(note_id), method='DELETE', auth=True)
[ "def", "note_delete", "(", "self", ",", "note_id", ")", ":", "return", "self", ".", "_get", "(", "'notes/{0}.json'", ".", "format", "(", "note_id", ")", ",", "method", "=", "'DELETE'", ",", "auth", "=", "True", ")" ]
delete a specific note (Requires login) (UNTESTED). Parameters: note_id (int): Where note_id is the note id.
[ "delete", "a", "specific", "note", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L798-L805
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.note_revert
def note_revert(self, note_id, version_id): """Function to revert a specific note (Requires login) (UNTESTED). Parameters: note_id (int): Where note_id is the note id. version_id (int): The note version id to revert to. """ return self._get('notes/{0}/revert.json...
python
def note_revert(self, note_id, version_id): """Function to revert a specific note (Requires login) (UNTESTED). Parameters: note_id (int): Where note_id is the note id. version_id (int): The note version id to revert to. """ return self._get('notes/{0}/revert.json...
[ "def", "note_revert", "(", "self", ",", "note_id", ",", "version_id", ")", ":", "return", "self", ".", "_get", "(", "'notes/{0}/revert.json'", ".", "format", "(", "note_id", ")", ",", "{", "'version_id'", ":", "version_id", "}", ",", "method", "=", "'PUT'"...
Function to revert a specific note (Requires login) (UNTESTED). Parameters: note_id (int): Where note_id is the note id. version_id (int): The note version id to revert to.
[ "Function", "to", "revert", "a", "specific", "note", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L807-L815
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.note_versions
def note_versions(self, updater_id=None, post_id=None, note_id=None): """Get list of note versions. Parameters: updater_id (int): post_id (int): note_id (int): """ params = { 'search[updater_id]': updater_id, 'search[post_id]':...
python
def note_versions(self, updater_id=None, post_id=None, note_id=None): """Get list of note versions. Parameters: updater_id (int): post_id (int): note_id (int): """ params = { 'search[updater_id]': updater_id, 'search[post_id]':...
[ "def", "note_versions", "(", "self", ",", "updater_id", "=", "None", ",", "post_id", "=", "None", ",", "note_id", "=", "None", ")", ":", "params", "=", "{", "'search[updater_id]'", ":", "updater_id", ",", "'search[post_id]'", ":", "post_id", ",", "'search[no...
Get list of note versions. Parameters: updater_id (int): post_id (int): note_id (int):
[ "Get", "list", "of", "note", "versions", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L817-L830
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.user_list
def user_list(self, name=None, name_matches=None, min_level=None, max_level=None, level=None, user_id=None, order=None): """Function to get a list of users or a specific user. Levels: Users have a number attribute called level representing their role. The curre...
python
def user_list(self, name=None, name_matches=None, min_level=None, max_level=None, level=None, user_id=None, order=None): """Function to get a list of users or a specific user. Levels: Users have a number attribute called level representing their role. The curre...
[ "def", "user_list", "(", "self", ",", "name", "=", "None", ",", "name_matches", "=", "None", ",", "min_level", "=", "None", ",", "max_level", "=", "None", ",", "level", "=", "None", ",", "user_id", "=", "None", ",", "order", "=", "None", ")", ":", ...
Function to get a list of users or a specific user. Levels: Users have a number attribute called level representing their role. The current levels are: Member 20, Gold 30, Platinum 31, Builder 32, Contributor 33, Janitor 35, Moderator 40 and Admin 50. P...
[ "Function", "to", "get", "a", "list", "of", "users", "or", "a", "specific", "user", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L832-L862
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.pool_list
def pool_list(self, name_matches=None, pool_ids=None, category=None, description_matches=None, creator_name=None, creator_id=None, is_deleted=None, is_active=None, order=None): """Get a list of pools. Parameters: name_matches (str): pool_ids (...
python
def pool_list(self, name_matches=None, pool_ids=None, category=None, description_matches=None, creator_name=None, creator_id=None, is_deleted=None, is_active=None, order=None): """Get a list of pools. Parameters: name_matches (str): pool_ids (...
[ "def", "pool_list", "(", "self", ",", "name_matches", "=", "None", ",", "pool_ids", "=", "None", ",", "category", "=", "None", ",", "description_matches", "=", "None", ",", "creator_name", "=", "None", ",", "creator_id", "=", "None", ",", "is_deleted", "="...
Get a list of pools. Parameters: name_matches (str): pool_ids (str): Can search for multiple ID's at once, separated by commas. description_matches (str): creator_name (str): creator_id (int): is_active (bool): C...
[ "Get", "a", "list", "of", "pools", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L872-L900
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.pool_create
def pool_create(self, name, description, category): """Function to create a pool (Requires login) (UNTESTED). Parameters: name (str): Pool name. description (str): Pool description. category (str): Can be: series, collection. """ params = { ...
python
def pool_create(self, name, description, category): """Function to create a pool (Requires login) (UNTESTED). Parameters: name (str): Pool name. description (str): Pool description. category (str): Can be: series, collection. """ params = { ...
[ "def", "pool_create", "(", "self", ",", "name", ",", "description", ",", "category", ")", ":", "params", "=", "{", "'pool[name]'", ":", "name", ",", "'pool[description]'", ":", "description", ",", "'pool[category]'", ":", "category", "}", "return", "self", "...
Function to create a pool (Requires login) (UNTESTED). Parameters: name (str): Pool name. description (str): Pool description. category (str): Can be: series, collection.
[ "Function", "to", "create", "a", "pool", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L910-L923
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.pool_update
def pool_update(self, pool_id, name=None, description=None, post_ids=None, is_active=None, category=None): """Update a pool (Requires login) (UNTESTED). Parameters: pool_id (int): Where pool_id is the pool id. name (str): description (str): ...
python
def pool_update(self, pool_id, name=None, description=None, post_ids=None, is_active=None, category=None): """Update a pool (Requires login) (UNTESTED). Parameters: pool_id (int): Where pool_id is the pool id. name (str): description (str): ...
[ "def", "pool_update", "(", "self", ",", "pool_id", ",", "name", "=", "None", ",", "description", "=", "None", ",", "post_ids", "=", "None", ",", "is_active", "=", "None", ",", "category", "=", "None", ")", ":", "params", "=", "{", "'pool[name]'", ":", ...
Update a pool (Requires login) (UNTESTED). Parameters: pool_id (int): Where pool_id is the pool id. name (str): description (str): post_ids (str): List of space delimited post ids. is_active (int): Can be: 1, 0. category (str): Can be: ser...
[ "Update", "a", "pool", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L925-L945
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.pool_delete
def pool_delete(self, pool_id): """Delete a pool (Requires login) (UNTESTED) (Moderator+). Parameters: pool_id (int): Where pool_id is the pool id. """ return self._get('pools/{0}.json'.format(pool_id), method='DELETE', auth=True)
python
def pool_delete(self, pool_id): """Delete a pool (Requires login) (UNTESTED) (Moderator+). Parameters: pool_id (int): Where pool_id is the pool id. """ return self._get('pools/{0}.json'.format(pool_id), method='DELETE', auth=True)
[ "def", "pool_delete", "(", "self", ",", "pool_id", ")", ":", "return", "self", ".", "_get", "(", "'pools/{0}.json'", ".", "format", "(", "pool_id", ")", ",", "method", "=", "'DELETE'", ",", "auth", "=", "True", ")" ]
Delete a pool (Requires login) (UNTESTED) (Moderator+). Parameters: pool_id (int): Where pool_id is the pool id.
[ "Delete", "a", "pool", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "(", "Moderator", "+", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L947-L954
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.pool_undelete
def pool_undelete(self, pool_id): """Undelete a specific poool (Requires login) (UNTESTED) (Moderator+). Parameters: pool_id (int): Where pool_id is the pool id. """ return self._get('pools/{0}/undelete.json'.format(pool_id), method='POST', auth=True...
python
def pool_undelete(self, pool_id): """Undelete a specific poool (Requires login) (UNTESTED) (Moderator+). Parameters: pool_id (int): Where pool_id is the pool id. """ return self._get('pools/{0}/undelete.json'.format(pool_id), method='POST', auth=True...
[ "def", "pool_undelete", "(", "self", ",", "pool_id", ")", ":", "return", "self", ".", "_get", "(", "'pools/{0}/undelete.json'", ".", "format", "(", "pool_id", ")", ",", "method", "=", "'POST'", ",", "auth", "=", "True", ")" ]
Undelete a specific poool (Requires login) (UNTESTED) (Moderator+). Parameters: pool_id (int): Where pool_id is the pool id.
[ "Undelete", "a", "specific", "poool", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "(", "Moderator", "+", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L956-L963
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.pool_revert
def pool_revert(self, pool_id, version_id): """Function to revert a specific pool (Requires login) (UNTESTED). Parameters: pool_id (int): Where pool_id is the pool id. version_id (int): """ return self._get('pools/{0}/revert.json'.format(pool_id), ...
python
def pool_revert(self, pool_id, version_id): """Function to revert a specific pool (Requires login) (UNTESTED). Parameters: pool_id (int): Where pool_id is the pool id. version_id (int): """ return self._get('pools/{0}/revert.json'.format(pool_id), ...
[ "def", "pool_revert", "(", "self", ",", "pool_id", ",", "version_id", ")", ":", "return", "self", ".", "_get", "(", "'pools/{0}/revert.json'", ".", "format", "(", "pool_id", ")", ",", "{", "'version_id'", ":", "version_id", "}", ",", "method", "=", "'PUT'"...
Function to revert a specific pool (Requires login) (UNTESTED). Parameters: pool_id (int): Where pool_id is the pool id. version_id (int):
[ "Function", "to", "revert", "a", "specific", "pool", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L965-L973
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.pool_versions
def pool_versions(self, updater_id=None, updater_name=None, pool_id=None): """Get list of pool versions. Parameters: updater_id (int): updater_name (str): pool_id (int): """ params = { 'search[updater_id]': updater_id, 'search[...
python
def pool_versions(self, updater_id=None, updater_name=None, pool_id=None): """Get list of pool versions. Parameters: updater_id (int): updater_name (str): pool_id (int): """ params = { 'search[updater_id]': updater_id, 'search[...
[ "def", "pool_versions", "(", "self", ",", "updater_id", "=", "None", ",", "updater_name", "=", "None", ",", "pool_id", "=", "None", ")", ":", "params", "=", "{", "'search[updater_id]'", ":", "updater_id", ",", "'search[updater_name]'", ":", "updater_name", ","...
Get list of pool versions. Parameters: updater_id (int): updater_name (str): pool_id (int):
[ "Get", "list", "of", "pool", "versions", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L975-L988
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.tag_list
def tag_list(self, name_matches=None, name=None, category=None, hide_empty=None, has_wiki=None, has_artist=None, order=None): """Get a list of tags. Parameters: name_matches (str): Can be: part or full name. name (str): Allows searching for multiple tags with ex...
python
def tag_list(self, name_matches=None, name=None, category=None, hide_empty=None, has_wiki=None, has_artist=None, order=None): """Get a list of tags. Parameters: name_matches (str): Can be: part or full name. name (str): Allows searching for multiple tags with ex...
[ "def", "tag_list", "(", "self", ",", "name_matches", "=", "None", ",", "name", "=", "None", ",", "category", "=", "None", ",", "hide_empty", "=", "None", ",", "has_wiki", "=", "None", ",", "has_artist", "=", "None", ",", "order", "=", "None", ")", ":...
Get a list of tags. Parameters: name_matches (str): Can be: part or full name. name (str): Allows searching for multiple tags with exact given names, separated by commas. e.g. search[name]=touhou,original,k-on! would return the ...
[ "Get", "a", "list", "of", "tags", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L990-L1017
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.tag_update
def tag_update(self, tag_id, category): """Lets you update a tag (Requires login) (UNTESTED). Parameters: tag_id (int): category (str): Can be: 0, 1, 3, 4 (general, artist, copyright, character respectively). """ param = {'tag[category...
python
def tag_update(self, tag_id, category): """Lets you update a tag (Requires login) (UNTESTED). Parameters: tag_id (int): category (str): Can be: 0, 1, 3, 4 (general, artist, copyright, character respectively). """ param = {'tag[category...
[ "def", "tag_update", "(", "self", ",", "tag_id", ",", "category", ")", ":", "param", "=", "{", "'tag[category]'", ":", "category", "}", "return", "self", ".", "_get", "(", "'pools/{0}.json'", ".", "format", "(", "tag_id", ")", ",", "param", ",", "method"...
Lets you update a tag (Requires login) (UNTESTED). Parameters: tag_id (int): category (str): Can be: 0, 1, 3, 4 (general, artist, copyright, character respectively).
[ "Lets", "you", "update", "a", "tag", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1027-L1037
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.tag_aliases
def tag_aliases(self, name_matches=None, antecedent_name=None, tag_id=None): """Get tags aliases. Parameters: name_matches (str): Match antecedent or consequent name. antecedent_name (str): Match antecedent name (exact match). tag_id (int): The ta...
python
def tag_aliases(self, name_matches=None, antecedent_name=None, tag_id=None): """Get tags aliases. Parameters: name_matches (str): Match antecedent or consequent name. antecedent_name (str): Match antecedent name (exact match). tag_id (int): The ta...
[ "def", "tag_aliases", "(", "self", ",", "name_matches", "=", "None", ",", "antecedent_name", "=", "None", ",", "tag_id", "=", "None", ")", ":", "params", "=", "{", "'search[name_matches]'", ":", "name_matches", ",", "'search[antecedent_name]'", ":", "antecedent_...
Get tags aliases. Parameters: name_matches (str): Match antecedent or consequent name. antecedent_name (str): Match antecedent name (exact match). tag_id (int): The tag alias id.
[ "Get", "tags", "aliases", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1039-L1053
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.tag_implications
def tag_implications(self, name_matches=None, antecedent_name=None, tag_id=None): """Get tags implications. Parameters: name_matches (str): Match antecedent or consequent name. antecedent_name (str): Match antecedent name (exact match). tag_i...
python
def tag_implications(self, name_matches=None, antecedent_name=None, tag_id=None): """Get tags implications. Parameters: name_matches (str): Match antecedent or consequent name. antecedent_name (str): Match antecedent name (exact match). tag_i...
[ "def", "tag_implications", "(", "self", ",", "name_matches", "=", "None", ",", "antecedent_name", "=", "None", ",", "tag_id", "=", "None", ")", ":", "params", "=", "{", "'search[name_matches]'", ":", "name_matches", ",", "'search[antecedent_name]'", ":", "antece...
Get tags implications. Parameters: name_matches (str): Match antecedent or consequent name. antecedent_name (str): Match antecedent name (exact match). tag_id (int): Tag implication id.
[ "Get", "tags", "implications", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1055-L1069
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.tag_related
def tag_related(self, query, category=None): """Get related tags. Parameters: query (str): The tag to find the related tags for. category (str): If specified, show only tags of a specific category. Can be: General 0, Artist 1, Copyright ...
python
def tag_related(self, query, category=None): """Get related tags. Parameters: query (str): The tag to find the related tags for. category (str): If specified, show only tags of a specific category. Can be: General 0, Artist 1, Copyright ...
[ "def", "tag_related", "(", "self", ",", "query", ",", "category", "=", "None", ")", ":", "params", "=", "{", "'query'", ":", "query", ",", "'category'", ":", "category", "}", "return", "self", ".", "_get", "(", "'related_tag.json'", ",", "params", ")" ]
Get related tags. Parameters: query (str): The tag to find the related tags for. category (str): If specified, show only tags of a specific category. Can be: General 0, Artist 1, Copyright 3 and Character 4.
[ "Get", "related", "tags", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1071-L1081
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.wiki_list
def wiki_list(self, title=None, creator_id=None, body_matches=None, other_names_match=None, creator_name=None, hide_deleted=None, other_names_present=None, order=None): """Function to retrieves a list of every wiki page. Parameters: title (str): Page titl...
python
def wiki_list(self, title=None, creator_id=None, body_matches=None, other_names_match=None, creator_name=None, hide_deleted=None, other_names_present=None, order=None): """Function to retrieves a list of every wiki page. Parameters: title (str): Page titl...
[ "def", "wiki_list", "(", "self", ",", "title", "=", "None", ",", "creator_id", "=", "None", ",", "body_matches", "=", "None", ",", "other_names_match", "=", "None", ",", "creator_name", "=", "None", ",", "hide_deleted", "=", "None", ",", "other_names_present...
Function to retrieves a list of every wiki page. Parameters: title (str): Page title. creator_id (int): Creator id. body_matches (str): Page content. other_names_match (str): Other names. creator_name (str): Creator name. hide_deleted (str...
[ "Function", "to", "retrieves", "a", "list", "of", "every", "wiki", "page", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1083-L1108
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.wiki_create
def wiki_create(self, title, body, other_names=None): """Action to lets you create a wiki page (Requires login) (UNTESTED). Parameters: title (str): Page title. body (str): Page content. other_names (str): Other names. """ params = { 'wiki...
python
def wiki_create(self, title, body, other_names=None): """Action to lets you create a wiki page (Requires login) (UNTESTED). Parameters: title (str): Page title. body (str): Page content. other_names (str): Other names. """ params = { 'wiki...
[ "def", "wiki_create", "(", "self", ",", "title", ",", "body", ",", "other_names", "=", "None", ")", ":", "params", "=", "{", "'wiki_page[title]'", ":", "title", ",", "'wiki_page[body]'", ":", "body", ",", "'wiki_page[other_names]'", ":", "other_names", "}", ...
Action to lets you create a wiki page (Requires login) (UNTESTED). Parameters: title (str): Page title. body (str): Page content. other_names (str): Other names.
[ "Action", "to", "lets", "you", "create", "a", "wiki", "page", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1118-L1131
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.wiki_update
def wiki_update(self, page_id, title=None, body=None, other_names=None, is_locked=None, is_deleted=None): """Action to lets you update a wiki page (Requires login) (UNTESTED). Parameters: page_id (int): Whre page_id is the wiki page id. title (str): Page titl...
python
def wiki_update(self, page_id, title=None, body=None, other_names=None, is_locked=None, is_deleted=None): """Action to lets you update a wiki page (Requires login) (UNTESTED). Parameters: page_id (int): Whre page_id is the wiki page id. title (str): Page titl...
[ "def", "wiki_update", "(", "self", ",", "page_id", ",", "title", "=", "None", ",", "body", "=", "None", ",", "other_names", "=", "None", ",", "is_locked", "=", "None", ",", "is_deleted", "=", "None", ")", ":", "params", "=", "{", "'wiki_page[title]'", ...
Action to lets you update a wiki page (Requires login) (UNTESTED). Parameters: page_id (int): Whre page_id is the wiki page id. title (str): Page title. body (str): Page content. other_names (str): Other names. is_locked (int): Can be: 0, 1 (Builder+)...
[ "Action", "to", "lets", "you", "update", "a", "wiki", "page", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1133-L1151
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.wiki_delete
def wiki_delete(self, page_id): """Delete a specific page wiki (Requires login) (UNTESTED) (Builder+). Parameters: page_id (int): """ return self._get('wiki_pages/{0}.json'.format(page_id), auth=True, method='DELETE')
python
def wiki_delete(self, page_id): """Delete a specific page wiki (Requires login) (UNTESTED) (Builder+). Parameters: page_id (int): """ return self._get('wiki_pages/{0}.json'.format(page_id), auth=True, method='DELETE')
[ "def", "wiki_delete", "(", "self", ",", "page_id", ")", ":", "return", "self", ".", "_get", "(", "'wiki_pages/{0}.json'", ".", "format", "(", "page_id", ")", ",", "auth", "=", "True", ",", "method", "=", "'DELETE'", ")" ]
Delete a specific page wiki (Requires login) (UNTESTED) (Builder+). Parameters: page_id (int):
[ "Delete", "a", "specific", "page", "wiki", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "(", "Builder", "+", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1153-L1160
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.wiki_revert
def wiki_revert(self, wiki_page_id, version_id): """Revert page to a previeous version (Requires login) (UNTESTED). Parameters: wiki_page_id (int): Where page_id is the wiki page id. version_id (int): """ return self._get('wiki_pages/{0}/revert.json'.format(wiki_...
python
def wiki_revert(self, wiki_page_id, version_id): """Revert page to a previeous version (Requires login) (UNTESTED). Parameters: wiki_page_id (int): Where page_id is the wiki page id. version_id (int): """ return self._get('wiki_pages/{0}/revert.json'.format(wiki_...
[ "def", "wiki_revert", "(", "self", ",", "wiki_page_id", ",", "version_id", ")", ":", "return", "self", ".", "_get", "(", "'wiki_pages/{0}/revert.json'", ".", "format", "(", "wiki_page_id", ")", ",", "{", "'version_id'", ":", "version_id", "}", ",", "method", ...
Revert page to a previeous version (Requires login) (UNTESTED). Parameters: wiki_page_id (int): Where page_id is the wiki page id. version_id (int):
[ "Revert", "page", "to", "a", "previeous", "version", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1162-L1170
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.wiki_versions_list
def wiki_versions_list(self, page_id, updater_id): """Return a list of wiki page version. Parameters: page_id (int): updater_id (int): """ params = { 'earch[updater_id]': updater_id, 'search[wiki_page_id]': page_id } re...
python
def wiki_versions_list(self, page_id, updater_id): """Return a list of wiki page version. Parameters: page_id (int): updater_id (int): """ params = { 'earch[updater_id]': updater_id, 'search[wiki_page_id]': page_id } re...
[ "def", "wiki_versions_list", "(", "self", ",", "page_id", ",", "updater_id", ")", ":", "params", "=", "{", "'earch[updater_id]'", ":", "updater_id", ",", "'search[wiki_page_id]'", ":", "page_id", "}", "return", "self", ".", "_get", "(", "'wiki_page_versions.json'"...
Return a list of wiki page version. Parameters: page_id (int): updater_id (int):
[ "Return", "a", "list", "of", "wiki", "page", "version", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1172-L1183
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.forum_topic_list
def forum_topic_list(self, title_matches=None, title=None, category_id=None): """Function to get forum topics. Parameters: title_matches (str): Search body for the given terms. title (str): Exact title match. category_id (int): Can be: 0, 1, ...
python
def forum_topic_list(self, title_matches=None, title=None, category_id=None): """Function to get forum topics. Parameters: title_matches (str): Search body for the given terms. title (str): Exact title match. category_id (int): Can be: 0, 1, ...
[ "def", "forum_topic_list", "(", "self", ",", "title_matches", "=", "None", ",", "title", "=", "None", ",", "category_id", "=", "None", ")", ":", "params", "=", "{", "'search[title_matches]'", ":", "title_matches", ",", "'search[title]'", ":", "title", ",", "...
Function to get forum topics. Parameters: title_matches (str): Search body for the given terms. title (str): Exact title match. category_id (int): Can be: 0, 1, 2 (General, Tags, Bugs & Features respectively).
[ "Function", "to", "get", "forum", "topics", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1193-L1208
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.forum_topic_create
def forum_topic_create(self, title, body, category=None): """Function to create topic (Requires login) (UNTESTED). Parameters: title (str): topic title. body (str): Message of the initial post. category (str): Can be: 0, 1, 2 (General, Tags, Bugs & Features ...
python
def forum_topic_create(self, title, body, category=None): """Function to create topic (Requires login) (UNTESTED). Parameters: title (str): topic title. body (str): Message of the initial post. category (str): Can be: 0, 1, 2 (General, Tags, Bugs & Features ...
[ "def", "forum_topic_create", "(", "self", ",", "title", ",", "body", ",", "category", "=", "None", ")", ":", "params", "=", "{", "'forum_topic[title]'", ":", "title", ",", "'forum_topic[original_post_attributes][body]'", ":", "body", ",", "'forum_topic[category_id]'...
Function to create topic (Requires login) (UNTESTED). Parameters: title (str): topic title. body (str): Message of the initial post. category (str): Can be: 0, 1, 2 (General, Tags, Bugs & Features respectively).
[ "Function", "to", "create", "topic", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1218-L1232
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.forum_topic_update
def forum_topic_update(self, topic_id, title=None, category=None): """Update a specific topic (Login Requires) (UNTESTED). Parameters: topic_id (int): Where topic_id is the topic id. title (str): Topic title. category (str): Can be: 0, 1, 2 (General, Tags, Bugs & Fea...
python
def forum_topic_update(self, topic_id, title=None, category=None): """Update a specific topic (Login Requires) (UNTESTED). Parameters: topic_id (int): Where topic_id is the topic id. title (str): Topic title. category (str): Can be: 0, 1, 2 (General, Tags, Bugs & Fea...
[ "def", "forum_topic_update", "(", "self", ",", "topic_id", ",", "title", "=", "None", ",", "category", "=", "None", ")", ":", "params", "=", "{", "'forum_topic[title]'", ":", "title", ",", "'forum_topic[category_id]'", ":", "category", "}", "return", "self", ...
Update a specific topic (Login Requires) (UNTESTED). Parameters: topic_id (int): Where topic_id is the topic id. title (str): Topic title. category (str): Can be: 0, 1, 2 (General, Tags, Bugs & Features respectively).
[ "Update", "a", "specific", "topic", "(", "Login", "Requires", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1234-L1248
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.forum_topic_delete
def forum_topic_delete(self, topic_id): """Delete a topic (Login Requires) (Moderator+) (UNTESTED). Parameters: topic_id (int): Where topic_id is the topic id. """ return self._get('forum_topics/{0}.json'.format(topic_id), method='DELETE', auth=True)
python
def forum_topic_delete(self, topic_id): """Delete a topic (Login Requires) (Moderator+) (UNTESTED). Parameters: topic_id (int): Where topic_id is the topic id. """ return self._get('forum_topics/{0}.json'.format(topic_id), method='DELETE', auth=True)
[ "def", "forum_topic_delete", "(", "self", ",", "topic_id", ")", ":", "return", "self", ".", "_get", "(", "'forum_topics/{0}.json'", ".", "format", "(", "topic_id", ")", ",", "method", "=", "'DELETE'", ",", "auth", "=", "True", ")" ]
Delete a topic (Login Requires) (Moderator+) (UNTESTED). Parameters: topic_id (int): Where topic_id is the topic id.
[ "Delete", "a", "topic", "(", "Login", "Requires", ")", "(", "Moderator", "+", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1250-L1257
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.forum_topic_undelete
def forum_topic_undelete(self, topic_id): """Un delete a topic (Login requries) (Moderator+) (UNTESTED). Parameters: topic_id (int): Where topic_id is the topic id. """ return self._get('forum_topics/{0}/undelete.json'.format(topic_id), method='POST'...
python
def forum_topic_undelete(self, topic_id): """Un delete a topic (Login requries) (Moderator+) (UNTESTED). Parameters: topic_id (int): Where topic_id is the topic id. """ return self._get('forum_topics/{0}/undelete.json'.format(topic_id), method='POST'...
[ "def", "forum_topic_undelete", "(", "self", ",", "topic_id", ")", ":", "return", "self", ".", "_get", "(", "'forum_topics/{0}/undelete.json'", ".", "format", "(", "topic_id", ")", ",", "method", "=", "'POST'", ",", "auth", "=", "True", ")" ]
Un delete a topic (Login requries) (Moderator+) (UNTESTED). Parameters: topic_id (int): Where topic_id is the topic id.
[ "Un", "delete", "a", "topic", "(", "Login", "requries", ")", "(", "Moderator", "+", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1259-L1266
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.forum_post_list
def forum_post_list(self, creator_id=None, creator_name=None, topic_id=None, topic_title_matches=None, topic_category_id=None, body_matches=None): """Return a list of forum posts. Parameters: creator_id (int): creator_name (str): ...
python
def forum_post_list(self, creator_id=None, creator_name=None, topic_id=None, topic_title_matches=None, topic_category_id=None, body_matches=None): """Return a list of forum posts. Parameters: creator_id (int): creator_name (str): ...
[ "def", "forum_post_list", "(", "self", ",", "creator_id", "=", "None", ",", "creator_name", "=", "None", ",", "topic_id", "=", "None", ",", "topic_title_matches", "=", "None", ",", "topic_category_id", "=", "None", ",", "body_matches", "=", "None", ")", ":",...
Return a list of forum posts. Parameters: creator_id (int): creator_name (str): topic_id (int): topic_title_matches (str): topic_category_id (int): Can be: 0, 1, 2 (General, Tags, Bugs & Features respectively). ...
[ "Return", "a", "list", "of", "forum", "posts", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1268-L1290
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.forum_post_create
def forum_post_create(self, topic_id, body): """Create a forum post (Requires login). Parameters: topic_id (int): body (str): Post content. """ params = {'forum_post[topic_id]': topic_id, 'forum_post[body]': body} return self._get('forum_posts.json', para...
python
def forum_post_create(self, topic_id, body): """Create a forum post (Requires login). Parameters: topic_id (int): body (str): Post content. """ params = {'forum_post[topic_id]': topic_id, 'forum_post[body]': body} return self._get('forum_posts.json', para...
[ "def", "forum_post_create", "(", "self", ",", "topic_id", ",", "body", ")", ":", "params", "=", "{", "'forum_post[topic_id]'", ":", "topic_id", ",", "'forum_post[body]'", ":", "body", "}", "return", "self", ".", "_get", "(", "'forum_posts.json'", ",", "params"...
Create a forum post (Requires login). Parameters: topic_id (int): body (str): Post content.
[ "Create", "a", "forum", "post", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1292-L1300
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.forum_post_update
def forum_post_update(self, topic_id, body): """Update a specific forum post (Requries login)(Moderator+)(UNTESTED). Parameters: post_id (int): Forum topic id. body (str): Post content. """ params = {'forum_post[body]': body} return self._get('forum_posts...
python
def forum_post_update(self, topic_id, body): """Update a specific forum post (Requries login)(Moderator+)(UNTESTED). Parameters: post_id (int): Forum topic id. body (str): Post content. """ params = {'forum_post[body]': body} return self._get('forum_posts...
[ "def", "forum_post_update", "(", "self", ",", "topic_id", ",", "body", ")", ":", "params", "=", "{", "'forum_post[body]'", ":", "body", "}", "return", "self", ".", "_get", "(", "'forum_posts/{0}.json'", ".", "format", "(", "topic_id", ")", ",", "params", "...
Update a specific forum post (Requries login)(Moderator+)(UNTESTED). Parameters: post_id (int): Forum topic id. body (str): Post content.
[ "Update", "a", "specific", "forum", "post", "(", "Requries", "login", ")", "(", "Moderator", "+", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1302-L1311
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.forum_post_delete
def forum_post_delete(self, post_id): """Delete a specific forum post (Requires login)(Moderator+)(UNTESTED). Parameters: post_id (int): Forum post id. """ return self._get('forum_posts/{0}.json'.format(post_id), method='DELETE', auth=True)
python
def forum_post_delete(self, post_id): """Delete a specific forum post (Requires login)(Moderator+)(UNTESTED). Parameters: post_id (int): Forum post id. """ return self._get('forum_posts/{0}.json'.format(post_id), method='DELETE', auth=True)
[ "def", "forum_post_delete", "(", "self", ",", "post_id", ")", ":", "return", "self", ".", "_get", "(", "'forum_posts/{0}.json'", ".", "format", "(", "post_id", ")", ",", "method", "=", "'DELETE'", ",", "auth", "=", "True", ")" ]
Delete a specific forum post (Requires login)(Moderator+)(UNTESTED). Parameters: post_id (int): Forum post id.
[ "Delete", "a", "specific", "forum", "post", "(", "Requires", "login", ")", "(", "Moderator", "+", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1313-L1320
LuqueDaniel/pybooru
pybooru/api_danbooru.py
DanbooruApi_Mixin.forum_post_undelete
def forum_post_undelete(self, post_id): """Undelete a specific forum post (Requires login)(Moderator+)(UNTESTED). Parameters: post_id (int): Forum post id. """ return self._get('forum_posts/{0}/undelete.json'.format(post_id), method='POST', auth=True...
python
def forum_post_undelete(self, post_id): """Undelete a specific forum post (Requires login)(Moderator+)(UNTESTED). Parameters: post_id (int): Forum post id. """ return self._get('forum_posts/{0}/undelete.json'.format(post_id), method='POST', auth=True...
[ "def", "forum_post_undelete", "(", "self", ",", "post_id", ")", ":", "return", "self", ".", "_get", "(", "'forum_posts/{0}/undelete.json'", ".", "format", "(", "post_id", ")", ",", "method", "=", "'POST'", ",", "auth", "=", "True", ")" ]
Undelete a specific forum post (Requires login)(Moderator+)(UNTESTED). Parameters: post_id (int): Forum post id.
[ "Undelete", "a", "specific", "forum", "post", "(", "Requires", "login", ")", "(", "Moderator", "+", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_danbooru.py#L1322-L1329
LuqueDaniel/pybooru
pybooru/pybooru.py
_Pybooru.site_name
def site_name(self, site_name): """Function that sets and checks the site name and set url. Parameters: site_name (str): The site name in 'SITE_LIST', default sites. Raises: PybooruError: When 'site_name' isn't valid. """ if site_name in SITE_LIST: ...
python
def site_name(self, site_name): """Function that sets and checks the site name and set url. Parameters: site_name (str): The site name in 'SITE_LIST', default sites. Raises: PybooruError: When 'site_name' isn't valid. """ if site_name in SITE_LIST: ...
[ "def", "site_name", "(", "self", ",", "site_name", ")", ":", "if", "site_name", "in", "SITE_LIST", ":", "self", ".", "__site_name", "=", "site_name", "self", ".", "__site_url", "=", "SITE_LIST", "[", "site_name", "]", "[", "'url'", "]", "else", ":", "rai...
Function that sets and checks the site name and set url. Parameters: site_name (str): The site name in 'SITE_LIST', default sites. Raises: PybooruError: When 'site_name' isn't valid.
[ "Function", "that", "sets", "and", "checks", "the", "site", "name", "and", "set", "url", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/pybooru.py#L79-L93
LuqueDaniel/pybooru
pybooru/pybooru.py
_Pybooru.site_url
def site_url(self, url): """URL setter and validator for site_url property. Parameters: url (str): URL of on Moebooru/Danbooru based sites. Raises: PybooruError: When URL scheme or URL are invalid. """ # Regular expression to URL validate regex =...
python
def site_url(self, url): """URL setter and validator for site_url property. Parameters: url (str): URL of on Moebooru/Danbooru based sites. Raises: PybooruError: When URL scheme or URL are invalid. """ # Regular expression to URL validate regex =...
[ "def", "site_url", "(", "self", ",", "url", ")", ":", "# Regular expression to URL validate", "regex", "=", "re", ".", "compile", "(", "r'^(?:http|https)://'", "# Scheme only HTTP/HTTPS", "r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\\.)+(?:[A-Z]{2,6}\\.?| \\\n [A-Z0-9-]...
URL setter and validator for site_url property. Parameters: url (str): URL of on Moebooru/Danbooru based sites. Raises: PybooruError: When URL scheme or URL are invalid.
[ "URL", "setter", "and", "validator", "for", "site_url", "property", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/pybooru.py#L106-L134
LuqueDaniel/pybooru
pybooru/pybooru.py
_Pybooru._request
def _request(self, url, api_call, request_args, method='GET'): """Function to request and returning JSON data. Parameters: url (str): Base url call. api_call (str): API function to be called. request_args (dict): All requests parameters. method (str): (De...
python
def _request(self, url, api_call, request_args, method='GET'): """Function to request and returning JSON data. Parameters: url (str): Base url call. api_call (str): API function to be called. request_args (dict): All requests parameters. method (str): (De...
[ "def", "_request", "(", "self", ",", "url", ",", "api_call", ",", "request_args", ",", "method", "=", "'GET'", ")", ":", "try", ":", "if", "method", "!=", "'GET'", ":", "# Reset content-type for data encoded as a multipart form", "self", ".", "client", ".", "h...
Function to request and returning JSON data. Parameters: url (str): Base url call. api_call (str): API function to be called. request_args (dict): All requests parameters. method (str): (Defauld: GET) HTTP method 'GET' or 'POST' Raises: Pyboo...
[ "Function", "to", "request", "and", "returning", "JSON", "data", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/pybooru.py#L149-L186
LuqueDaniel/pybooru
pybooru/danbooru.py
Danbooru._get
def _get(self, api_call, params=None, method='GET', auth=False, file_=None): """Function to preapre API call. Parameters: api_call (str): API function to be called. params (str): API function parameters. method (str): (Defauld: GET) HTTP method (GET, POS...
python
def _get(self, api_call, params=None, method='GET', auth=False, file_=None): """Function to preapre API call. Parameters: api_call (str): API function to be called. params (str): API function parameters. method (str): (Defauld: GET) HTTP method (GET, POS...
[ "def", "_get", "(", "self", ",", "api_call", ",", "params", "=", "None", ",", "method", "=", "'GET'", ",", "auth", "=", "False", ",", "file_", "=", "None", ")", ":", "url", "=", "\"{0}/{1}\"", ".", "format", "(", "self", ".", "site_url", ",", "api_...
Function to preapre API call. Parameters: api_call (str): API function to be called. params (str): API function parameters. method (str): (Defauld: GET) HTTP method (GET, POST, PUT or DELETE) file_ (file): File to upload (only uploads)....
[ "Function", "to", "preapre", "API", "call", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/danbooru.py#L55-L86
LuqueDaniel/pybooru
pybooru/api_moebooru.py
MoebooruApi_Mixin.post_create
def post_create(self, tags, file_=None, rating=None, source=None, rating_locked=None, note_locked=None, parent_id=None, md5=None): """Function to create a new post (Requires login). There are only two mandatory fields: you need to supply the 'tags', and y...
python
def post_create(self, tags, file_=None, rating=None, source=None, rating_locked=None, note_locked=None, parent_id=None, md5=None): """Function to create a new post (Requires login). There are only two mandatory fields: you need to supply the 'tags', and y...
[ "def", "post_create", "(", "self", ",", "tags", ",", "file_", "=", "None", ",", "rating", "=", "None", ",", "source", "=", "None", ",", "rating_locked", "=", "None", ",", "note_locked", "=", "None", ",", "parent_id", "=", "None", ",", "md5", "=", "No...
Function to create a new post (Requires login). There are only two mandatory fields: you need to supply the 'tags', and you need to supply the 'file_', either through a multipart form or through a source URL (Requires login) (UNTESTED). Parameters: tags (str): A space delim...
[ "Function", "to", "create", "a", "new", "post", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_moebooru.py#L38-L77
LuqueDaniel/pybooru
pybooru/api_moebooru.py
MoebooruApi_Mixin.post_update
def post_update(self, post_id, tags=None, file_=None, rating=None, source=None, is_rating_locked=None, is_note_locked=None, parent_id=None): """Update a specific post. Only the 'post_id' parameter is required. Leave the other parameters blank if you don't...
python
def post_update(self, post_id, tags=None, file_=None, rating=None, source=None, is_rating_locked=None, is_note_locked=None, parent_id=None): """Update a specific post. Only the 'post_id' parameter is required. Leave the other parameters blank if you don't...
[ "def", "post_update", "(", "self", ",", "post_id", ",", "tags", "=", "None", ",", "file_", "=", "None", ",", "rating", "=", "None", ",", "source", "=", "None", ",", "is_rating_locked", "=", "None", ",", "is_note_locked", "=", "None", ",", "parent_id", ...
Update a specific post. Only the 'post_id' parameter is required. Leave the other parameters blank if you don't want to change them (Requires login). Parameters: post_id (int): The id number of the post to update. tags (str): A space delimited list of tags. Specify prev...
[ "Update", "a", "specific", "post", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_moebooru.py#L79-L113
LuqueDaniel/pybooru
pybooru/api_moebooru.py
MoebooruApi_Mixin.post_revert_tags
def post_revert_tags(self, post_id, history_id): """Function to reverts a post to a previous set of tags (Requires login) (UNTESTED). Parameters: post_id (int): The post id number to update. history_id (int): The id number of the tag history. """ params =...
python
def post_revert_tags(self, post_id, history_id): """Function to reverts a post to a previous set of tags (Requires login) (UNTESTED). Parameters: post_id (int): The post id number to update. history_id (int): The id number of the tag history. """ params =...
[ "def", "post_revert_tags", "(", "self", ",", "post_id", ",", "history_id", ")", ":", "params", "=", "{", "'id'", ":", "post_id", ",", "'history_id'", ":", "history_id", "}", "return", "self", ".", "_get", "(", "'post/revert_tags'", ",", "params", ",", "'PU...
Function to reverts a post to a previous set of tags (Requires login) (UNTESTED). Parameters: post_id (int): The post id number to update. history_id (int): The id number of the tag history.
[ "Function", "to", "reverts", "a", "post", "to", "a", "previous", "set", "of", "tags", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_moebooru.py#L126-L135
LuqueDaniel/pybooru
pybooru/api_moebooru.py
MoebooruApi_Mixin.post_vote
def post_vote(self, post_id, score): """Action lets you vote for a post (Requires login). Parameters: post_id (int): The post id. score (int): * 0: No voted or Remove vote. * 1: Good. * 2: Great. * 3: Favorite, add ...
python
def post_vote(self, post_id, score): """Action lets you vote for a post (Requires login). Parameters: post_id (int): The post id. score (int): * 0: No voted or Remove vote. * 1: Good. * 2: Great. * 3: Favorite, add ...
[ "def", "post_vote", "(", "self", ",", "post_id", ",", "score", ")", ":", "if", "score", "<=", "3", "and", "score", ">=", "0", ":", "params", "=", "{", "'id'", ":", "post_id", ",", "'score'", ":", "score", "}", "return", "self", ".", "_get", "(", ...
Action lets you vote for a post (Requires login). Parameters: post_id (int): The post id. score (int): * 0: No voted or Remove vote. * 1: Good. * 2: Great. * 3: Favorite, add post to favorites. Raises: ...
[ "Action", "lets", "you", "vote", "for", "a", "post", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_moebooru.py#L137-L155
LuqueDaniel/pybooru
pybooru/api_moebooru.py
MoebooruApi_Mixin.tag_update
def tag_update(self, name=None, tag_type=None, is_ambiguous=None): """Action to lets you update tag (Requires login) (UNTESTED). Parameters: name (str): The name of the tag to update. tag_type (int): * General: 0. * artist: 1. * co...
python
def tag_update(self, name=None, tag_type=None, is_ambiguous=None): """Action to lets you update tag (Requires login) (UNTESTED). Parameters: name (str): The name of the tag to update. tag_type (int): * General: 0. * artist: 1. * co...
[ "def", "tag_update", "(", "self", ",", "name", "=", "None", ",", "tag_type", "=", "None", ",", "is_ambiguous", "=", "None", ")", ":", "params", "=", "{", "'name'", ":", "name", ",", "'tag[tag_type]'", ":", "tag_type", ",", "'tag[is_ambiguous]'", ":", "is...
Action to lets you update tag (Requires login) (UNTESTED). Parameters: name (str): The name of the tag to update. tag_type (int): * General: 0. * artist: 1. * copyright: 3. * character: 4. is_ambiguous (int): Wh...
[ "Action", "to", "lets", "you", "update", "tag", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_moebooru.py#L172-L190
LuqueDaniel/pybooru
pybooru/api_moebooru.py
MoebooruApi_Mixin.artist_create
def artist_create(self, name, urls=None, alias=None, group=None): """Function to create an artist (Requires login) (UNTESTED). Parameters: name (str): The artist's name. urls (str): A list of URLs associated with the artist, whitespace delimited. ...
python
def artist_create(self, name, urls=None, alias=None, group=None): """Function to create an artist (Requires login) (UNTESTED). Parameters: name (str): The artist's name. urls (str): A list of URLs associated with the artist, whitespace delimited. ...
[ "def", "artist_create", "(", "self", ",", "name", ",", "urls", "=", "None", ",", "alias", "=", "None", ",", "group", "=", "None", ")", ":", "params", "=", "{", "'artist[name]'", ":", "name", ",", "'artist[urls]'", ":", "urls", ",", "'artist[alias]'", "...
Function to create an artist (Requires login) (UNTESTED). Parameters: name (str): The artist's name. urls (str): A list of URLs associated with the artist, whitespace delimited. alias (str): The artist that this artist is an alias for. Simply ...
[ "Function", "to", "create", "an", "artist", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_moebooru.py#L212-L230
LuqueDaniel/pybooru
pybooru/api_moebooru.py
MoebooruApi_Mixin.artist_update
def artist_update(self, artist_id, name=None, urls=None, alias=None, group=None): """Function to update artists (Requires Login) (UNTESTED). Only the artist_id parameter is required. The other parameters are optional. Parameters: artist_id (int): The i...
python
def artist_update(self, artist_id, name=None, urls=None, alias=None, group=None): """Function to update artists (Requires Login) (UNTESTED). Only the artist_id parameter is required. The other parameters are optional. Parameters: artist_id (int): The i...
[ "def", "artist_update", "(", "self", ",", "artist_id", ",", "name", "=", "None", ",", "urls", "=", "None", ",", "alias", "=", "None", ",", "group", "=", "None", ")", ":", "params", "=", "{", "'id'", ":", "artist_id", ",", "'artist[name]'", ":", "name...
Function to update artists (Requires Login) (UNTESTED). Only the artist_id parameter is required. The other parameters are optional. Parameters: artist_id (int): The id of thr artist to update (Type: INT). name (str): The artist's name. urls (str): A list of...
[ "Function", "to", "update", "artists", "(", "Requires", "Login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_moebooru.py#L232-L256
LuqueDaniel/pybooru
pybooru/api_moebooru.py
MoebooruApi_Mixin.comment_create
def comment_create(self, post_id, comment_body, anonymous=None): """Action to lets you create a comment (Requires login). Parameters: post_id (int): The post id number to which you are responding. comment_body (str): The body of the comment. anonymous (int): Set to 1...
python
def comment_create(self, post_id, comment_body, anonymous=None): """Action to lets you create a comment (Requires login). Parameters: post_id (int): The post id number to which you are responding. comment_body (str): The body of the comment. anonymous (int): Set to 1...
[ "def", "comment_create", "(", "self", ",", "post_id", ",", "comment_body", ",", "anonymous", "=", "None", ")", ":", "params", "=", "{", "'comment[post_id]'", ":", "post_id", ",", "'comment[body]'", ":", "comment_body", ",", "'comment[anonymous]'", ":", "anonymou...
Action to lets you create a comment (Requires login). Parameters: post_id (int): The post id number to which you are responding. comment_body (str): The body of the comment. anonymous (int): Set to 1 if you want to post this comment anonymously.
[ "Action", "to", "lets", "you", "create", "a", "comment", "(", "Requires", "login", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_moebooru.py#L274-L288
LuqueDaniel/pybooru
pybooru/api_moebooru.py
MoebooruApi_Mixin.wiki_create
def wiki_create(self, title, body): """Action to lets you create a wiki page (Requires login) (UNTESTED). Parameters: title (str): The title of the wiki page. body (str): The body of the wiki page. """ params = {'wiki_page[title]': title, 'wiki_page[body]': body}...
python
def wiki_create(self, title, body): """Action to lets you create a wiki page (Requires login) (UNTESTED). Parameters: title (str): The title of the wiki page. body (str): The body of the wiki page. """ params = {'wiki_page[title]': title, 'wiki_page[body]': body}...
[ "def", "wiki_create", "(", "self", ",", "title", ",", "body", ")", ":", "params", "=", "{", "'wiki_page[title]'", ":", "title", ",", "'wiki_page[body]'", ":", "body", "}", "return", "self", ".", "_get", "(", "'wiki/create'", ",", "params", ",", "method", ...
Action to lets you create a wiki page (Requires login) (UNTESTED). Parameters: title (str): The title of the wiki page. body (str): The body of the wiki page.
[ "Action", "to", "lets", "you", "create", "a", "wiki", "page", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_moebooru.py#L309-L317
LuqueDaniel/pybooru
pybooru/api_moebooru.py
MoebooruApi_Mixin.wiki_update
def wiki_update(self, title, new_title=None, page_body=None): """Action to lets you update a wiki page (Requires login) (UNTESTED). Parameters: title (str): The title of the wiki page to update. new_title (str): The new title of the wiki page. page_body (str): The ne...
python
def wiki_update(self, title, new_title=None, page_body=None): """Action to lets you update a wiki page (Requires login) (UNTESTED). Parameters: title (str): The title of the wiki page to update. new_title (str): The new title of the wiki page. page_body (str): The ne...
[ "def", "wiki_update", "(", "self", ",", "title", ",", "new_title", "=", "None", ",", "page_body", "=", "None", ")", ":", "params", "=", "{", "'title'", ":", "title", ",", "'wiki_page[title]'", ":", "new_title", ",", "'wiki_page[body]'", ":", "page_body", "...
Action to lets you update a wiki page (Requires login) (UNTESTED). Parameters: title (str): The title of the wiki page to update. new_title (str): The new title of the wiki page. page_body (str): The new body of the wiki page.
[ "Action", "to", "lets", "you", "update", "a", "wiki", "page", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_moebooru.py#L319-L332
LuqueDaniel/pybooru
pybooru/api_moebooru.py
MoebooruApi_Mixin.wiki_revert
def wiki_revert(self, title, version): """Function to revert a specific wiki page (Requires login) (UNTESTED). Parameters: title (str): The title of the wiki page to update. version (int): The version to revert to. """ params = {'title': title, 'version': version...
python
def wiki_revert(self, title, version): """Function to revert a specific wiki page (Requires login) (UNTESTED). Parameters: title (str): The title of the wiki page to update. version (int): The version to revert to. """ params = {'title': title, 'version': version...
[ "def", "wiki_revert", "(", "self", ",", "title", ",", "version", ")", ":", "params", "=", "{", "'title'", ":", "title", ",", "'version'", ":", "version", "}", "return", "self", ".", "_get", "(", "'wiki/revert'", ",", "params", ",", "method", "=", "'PUT...
Function to revert a specific wiki page (Requires login) (UNTESTED). Parameters: title (str): The title of the wiki page to update. version (int): The version to revert to.
[ "Function", "to", "revert", "a", "specific", "wiki", "page", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_moebooru.py#L370-L378
LuqueDaniel/pybooru
pybooru/api_moebooru.py
MoebooruApi_Mixin.note_revert
def note_revert(self, note_id, version): """Function to revert a specific note (Requires login) (UNTESTED). Parameters: note_id (int): The note id to update. version (int): The version to revert to. """ params = {'id': note_id, 'version': version} return ...
python
def note_revert(self, note_id, version): """Function to revert a specific note (Requires login) (UNTESTED). Parameters: note_id (int): The note id to update. version (int): The version to revert to. """ params = {'id': note_id, 'version': version} return ...
[ "def", "note_revert", "(", "self", ",", "note_id", ",", "version", ")", ":", "params", "=", "{", "'id'", ":", "note_id", ",", "'version'", ":", "version", "}", "return", "self", ".", "_get", "(", "'note/revert'", ",", "params", ",", "method", "=", "'PU...
Function to revert a specific note (Requires login) (UNTESTED). Parameters: note_id (int): The note id to update. version (int): The version to revert to.
[ "Function", "to", "revert", "a", "specific", "note", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_moebooru.py#L415-L423
LuqueDaniel/pybooru
pybooru/api_moebooru.py
MoebooruApi_Mixin.note_create_update
def note_create_update(self, post_id=None, coor_x=None, coor_y=None, width=None, height=None, is_active=None, body=None, note_id=None): """Function to create or update note (Requires login) (UNTESTED). Parameters: post_id (int): The post...
python
def note_create_update(self, post_id=None, coor_x=None, coor_y=None, width=None, height=None, is_active=None, body=None, note_id=None): """Function to create or update note (Requires login) (UNTESTED). Parameters: post_id (int): The post...
[ "def", "note_create_update", "(", "self", ",", "post_id", "=", "None", ",", "coor_x", "=", "None", ",", "coor_y", "=", "None", ",", "width", "=", "None", ",", "height", "=", "None", ",", "is_active", "=", "None", ",", "body", "=", "None", ",", "note_...
Function to create or update note (Requires login) (UNTESTED). Parameters: post_id (int): The post id number this note belongs to. coor_x (int): The X coordinate of the note. coor_y (int): The Y coordinate of the note. width (int): The width of the note. ...
[ "Function", "to", "create", "or", "update", "note", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_moebooru.py#L425-L452
LuqueDaniel/pybooru
pybooru/api_moebooru.py
MoebooruApi_Mixin.pool_update
def pool_update(self, pool_id, name=None, is_public=None, description=None): """Function to update a pool (Requires login) (UNTESTED). Parameters: pool_id (int): The pool id number. name (str): The name. is_public (int): 1 or 0, whether or not the...
python
def pool_update(self, pool_id, name=None, is_public=None, description=None): """Function to update a pool (Requires login) (UNTESTED). Parameters: pool_id (int): The pool id number. name (str): The name. is_public (int): 1 or 0, whether or not the...
[ "def", "pool_update", "(", "self", ",", "pool_id", ",", "name", "=", "None", ",", "is_public", "=", "None", ",", "description", "=", "None", ")", ":", "params", "=", "{", "'id'", ":", "pool_id", ",", "'pool[name]'", ":", "name", ",", "'pool[is_public]'",...
Function to update a pool (Requires login) (UNTESTED). Parameters: pool_id (int): The pool id number. name (str): The name. is_public (int): 1 or 0, whether or not the pool is public. description (str): A description of the pool.
[ "Function", "to", "update", "a", "pool", "(", "Requires", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_moebooru.py#L498-L514
LuqueDaniel/pybooru
pybooru/api_moebooru.py
MoebooruApi_Mixin.pool_create
def pool_create(self, name, description, is_public): """Function to create a pool (Require login) (UNTESTED). Parameters: name (str): The name. description (str): A description of the pool. is_public (int): 1 or 0, whether or not the pool is public. """ ...
python
def pool_create(self, name, description, is_public): """Function to create a pool (Require login) (UNTESTED). Parameters: name (str): The name. description (str): A description of the pool. is_public (int): 1 or 0, whether or not the pool is public. """ ...
[ "def", "pool_create", "(", "self", ",", "name", ",", "description", ",", "is_public", ")", ":", "params", "=", "{", "'pool[name]'", ":", "name", ",", "'pool[description]'", ":", "description", ",", "'pool[is_public]'", ":", "is_public", "}", "return", "self", ...
Function to create a pool (Require login) (UNTESTED). Parameters: name (str): The name. description (str): A description of the pool. is_public (int): 1 or 0, whether or not the pool is public.
[ "Function", "to", "create", "a", "pool", "(", "Require", "login", ")", "(", "UNTESTED", ")", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/api_moebooru.py#L516-L526
LuqueDaniel/pybooru
pybooru/moebooru.py
Moebooru.site_name
def site_name(self, site_name): """Sets api_version and hash_string. Parameters: site_name (str): The site name in 'SITE_LIST', default sites. Raises: PybooruError: When 'site_name' isn't valid. """ # Set base class property site_name _Pybooru.si...
python
def site_name(self, site_name): """Sets api_version and hash_string. Parameters: site_name (str): The site name in 'SITE_LIST', default sites. Raises: PybooruError: When 'site_name' isn't valid. """ # Set base class property site_name _Pybooru.si...
[ "def", "site_name", "(", "self", ",", "site_name", ")", ":", "# Set base class property site_name", "_Pybooru", ".", "site_name", ".", "fset", "(", "self", ",", "site_name", ")", "if", "(", "'api_version'", "and", "'hashed_string'", ")", "in", "SITE_LIST", "[", ...
Sets api_version and hash_string. Parameters: site_name (str): The site name in 'SITE_LIST', default sites. Raises: PybooruError: When 'site_name' isn't valid.
[ "Sets", "api_version", "and", "hash_string", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/moebooru.py#L74-L88
LuqueDaniel/pybooru
pybooru/moebooru.py
Moebooru._build_url
def _build_url(self, api_call): """Build request url. Parameters: api_call (str): Base API Call. Returns: Complete url (str). """ if self.api_version in ('1.13.0', '1.13.0+update.1', '1.13.0+update.2'): if '/' not in api_call: ...
python
def _build_url(self, api_call): """Build request url. Parameters: api_call (str): Base API Call. Returns: Complete url (str). """ if self.api_version in ('1.13.0', '1.13.0+update.1', '1.13.0+update.2'): if '/' not in api_call: ...
[ "def", "_build_url", "(", "self", ",", "api_call", ")", ":", "if", "self", ".", "api_version", "in", "(", "'1.13.0'", ",", "'1.13.0+update.1'", ",", "'1.13.0+update.2'", ")", ":", "if", "'/'", "not", "in", "api_call", ":", "return", "\"{0}/{1}/index.json\"", ...
Build request url. Parameters: api_call (str): Base API Call. Returns: Complete url (str).
[ "Build", "request", "url", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/moebooru.py#L90-L102
LuqueDaniel/pybooru
pybooru/moebooru.py
Moebooru._build_hash_string
def _build_hash_string(self): """Function for build password hash string. Raises: PybooruError: When isn't provide hash string. PybooruError: When aren't provide username or password. PybooruError: When Pybooru can't add password to hash strring. """ ...
python
def _build_hash_string(self): """Function for build password hash string. Raises: PybooruError: When isn't provide hash string. PybooruError: When aren't provide username or password. PybooruError: When Pybooru can't add password to hash strring. """ ...
[ "def", "_build_hash_string", "(", "self", ")", ":", "# Build AUTENTICATION hash_string", "# Check if hash_string exists", "if", "self", ".", "site_name", "in", "SITE_LIST", "or", "self", ".", "hash_string", ":", "if", "self", ".", "username", "and", "self", ".", "...
Function for build password hash string. Raises: PybooruError: When isn't provide hash string. PybooruError: When aren't provide username or password. PybooruError: When Pybooru can't add password to hash strring.
[ "Function", "for", "build", "password", "hash", "string", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/moebooru.py#L104-L131
LuqueDaniel/pybooru
pybooru/moebooru.py
Moebooru._get
def _get(self, api_call, params, method='GET', file_=None): """Function to preapre API call. Parameters: api_call (str): API function to be called. params (dict): API function parameters. method (str): (Defauld: GET) HTTP method 'GET' or 'POST' file_ (fil...
python
def _get(self, api_call, params, method='GET', file_=None): """Function to preapre API call. Parameters: api_call (str): API function to be called. params (dict): API function parameters. method (str): (Defauld: GET) HTTP method 'GET' or 'POST' file_ (fil...
[ "def", "_get", "(", "self", ",", "api_call", ",", "params", ",", "method", "=", "'GET'", ",", "file_", "=", "None", ")", ":", "url", "=", "self", ".", "_build_url", "(", "api_call", ")", "if", "method", "==", "'GET'", ":", "request_args", "=", "{", ...
Function to preapre API call. Parameters: api_call (str): API function to be called. params (dict): API function parameters. method (str): (Defauld: GET) HTTP method 'GET' or 'POST' file_ (file): File to upload.
[ "Function", "to", "preapre", "API", "call", "." ]
train
https://github.com/LuqueDaniel/pybooru/blob/60cd5254684d293b308f0b11b8f4ac2dce101479/pybooru/moebooru.py#L133-L156
bjodah/pyodesys
pyodesys/symbolic.py
_is_autonomous
def _is_autonomous(indep, exprs): """ Whether the expressions for the dependent variables are autonomous. Note that the system may still behave as an autonomous system on the interface of :meth:`integrate` due to use of pre-/post-processors. """ if indep is None: return True for expr in...
python
def _is_autonomous(indep, exprs): """ Whether the expressions for the dependent variables are autonomous. Note that the system may still behave as an autonomous system on the interface of :meth:`integrate` due to use of pre-/post-processors. """ if indep is None: return True for expr in...
[ "def", "_is_autonomous", "(", "indep", ",", "exprs", ")", ":", "if", "indep", "is", "None", ":", "return", "True", "for", "expr", "in", "exprs", ":", "try", ":", "in_there", "=", "indep", "in", "expr", ".", "free_symbols", "except", ":", "in_there", "=...
Whether the expressions for the dependent variables are autonomous. Note that the system may still behave as an autonomous system on the interface of :meth:`integrate` due to use of pre-/post-processors.
[ "Whether", "the", "expressions", "for", "the", "dependent", "variables", "are", "autonomous", "." ]
train
https://github.com/bjodah/pyodesys/blob/0034a6165b550d8d9808baef58678dca5a493ab7/pyodesys/symbolic.py#L81-L96
bjodah/pyodesys
pyodesys/symbolic.py
symmetricsys
def symmetricsys(dep_tr=None, indep_tr=None, SuperClass=TransformedSys, **kwargs): """ A factory function for creating symmetrically transformed systems. Creates a new subclass which applies the same transformation for each dependent variable. Parameters ---------- dep_tr : pair of callables (defa...
python
def symmetricsys(dep_tr=None, indep_tr=None, SuperClass=TransformedSys, **kwargs): """ A factory function for creating symmetrically transformed systems. Creates a new subclass which applies the same transformation for each dependent variable. Parameters ---------- dep_tr : pair of callables (defa...
[ "def", "symmetricsys", "(", "dep_tr", "=", "None", ",", "indep_tr", "=", "None", ",", "SuperClass", "=", "TransformedSys", ",", "*", "*", "kwargs", ")", ":", "if", "dep_tr", "is", "not", "None", ":", "if", "not", "callable", "(", "dep_tr", "[", "0", ...
A factory function for creating symmetrically transformed systems. Creates a new subclass which applies the same transformation for each dependent variable. Parameters ---------- dep_tr : pair of callables (default: None) Forward and backward transformation callbacks to be applied to the ...
[ "A", "factory", "function", "for", "creating", "symmetrically", "transformed", "systems", "." ]
train
https://github.com/bjodah/pyodesys/blob/0034a6165b550d8d9808baef58678dca5a493ab7/pyodesys/symbolic.py#L961-L1027
bjodah/pyodesys
pyodesys/symbolic.py
get_logexp
def get_logexp(a=1, b=0, a2=None, b2=None, backend=None): """ Utility function for use with :func:symmetricsys. Creates a pair of callbacks for logarithmic transformation (including scaling and shifting): ``u = ln(a*x + b)``. Parameters ---------- a : number Scaling (forward). b : ...
python
def get_logexp(a=1, b=0, a2=None, b2=None, backend=None): """ Utility function for use with :func:symmetricsys. Creates a pair of callbacks for logarithmic transformation (including scaling and shifting): ``u = ln(a*x + b)``. Parameters ---------- a : number Scaling (forward). b : ...
[ "def", "get_logexp", "(", "a", "=", "1", ",", "b", "=", "0", ",", "a2", "=", "None", ",", "b2", "=", "None", ",", "backend", "=", "None", ")", ":", "if", "a2", "is", "None", ":", "a2", "=", "a", "if", "b2", "is", "None", ":", "b2", "=", "...
Utility function for use with :func:symmetricsys. Creates a pair of callbacks for logarithmic transformation (including scaling and shifting): ``u = ln(a*x + b)``. Parameters ---------- a : number Scaling (forward). b : number Shift (forward). a2 : number Scaling (b...
[ "Utility", "function", "for", "use", "with", ":", "func", ":", "symmetricsys", "." ]
train
https://github.com/bjodah/pyodesys/blob/0034a6165b550d8d9808baef58678dca5a493ab7/pyodesys/symbolic.py#L1361-L1390
bjodah/pyodesys
pyodesys/symbolic.py
SymbolicSys.from_callback
def from_callback(cls, rhs, ny=None, nparams=None, first_step_factory=None, roots_cb=None, indep_name=None, **kwargs): """ Create an instance from a callback. Parameters ---------- rhs : callbable Signature ``rhs(x, y[:], p[:], backend=math) -> f[:]``. ...
python
def from_callback(cls, rhs, ny=None, nparams=None, first_step_factory=None, roots_cb=None, indep_name=None, **kwargs): """ Create an instance from a callback. Parameters ---------- rhs : callbable Signature ``rhs(x, y[:], p[:], backend=math) -> f[:]``. ...
[ "def", "from_callback", "(", "cls", ",", "rhs", ",", "ny", "=", "None", ",", "nparams", "=", "None", ",", "first_step_factory", "=", "None", ",", "roots_cb", "=", "None", ",", "indep_name", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ny", ",", ...
Create an instance from a callback. Parameters ---------- rhs : callbable Signature ``rhs(x, y[:], p[:], backend=math) -> f[:]``. ny : int Length of ``y`` in ``rhs``. nparams : int Length of ``p`` in ``rhs``. first_step_factory : calla...
[ "Create", "an", "instance", "from", "a", "callback", "." ]
train
https://github.com/bjodah/pyodesys/blob/0034a6165b550d8d9808baef58678dca5a493ab7/pyodesys/symbolic.py#L385-L463