Skip to content

Commit

Permalink
Merge pull request #1 from cfinke/master
Browse files Browse the repository at this point in the history
Add all of the supported parameters for the API endpoints.

Thanks! :)
Nekmo authored Feb 11, 2017
2 parents 39f7370 + 4fbce3c commit ab8b9ba
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions akismet/__init__.py
Original file line number Diff line number Diff line change
@@ -86,17 +86,20 @@ def check(self, user_ip, user_agent, comment_author=None, comment_author_email=N

def submit_spam(self, user_ip, user_agent, comment_author=None, comment_author_email=None,
comment_author_url=None, comment_content=None, referrer='unknown', blog=None, permalink=None,
comment_type=None, is_test=False):
comment_type=None, is_test=False, blog_lang=None, comment_date=None, comment_post_modified=None,
user_role=None):
self.submit(True, **remove_self(locals()))

def submit_ham(self, user_ip, user_agent, comment_author=None, comment_author_email=None,
comment_author_url=None, comment_content=None, referrer='unknown', blog=None, permalink=None,
comment_type=None, is_test=False):
comment_type=None, is_test=False, blog_lang=None, comment_date=None, comment_post_modified=None,
user_role=None):
self.submit(False, **remove_self(locals()))

def submit(self, is_spam, user_ip, user_agent, comment_author=None, comment_author_email=None,
comment_author_url=None, comment_content=None, referrer='unknown', blog=None, permalink=None,
comment_type=None, is_test=False):
comment_type=None, is_test=False, blog_lang=None, comment_date=None, comment_post_modified=None,
user_role=None):
parameters = self._get_parameters(locals())
r = self._request(self.get_submit_spam_url() if is_spam else self.get_submit_ham_url(), parameters)
if r.text != "Thanks for making the web a better place.":

0 comments on commit ab8b9ba

Please sign in to comment.