Skip to content

Commit

Permalink
PEP8ified. :)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrouchy committed Oct 17, 2011
1 parent b8529fe commit 9bdf780
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions spamcheck/spamcheck.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
from requests import post as POST
from json import loads


class SpamCheck():

postmark_spamcheck_url = "http://spamcheck.postmarkapp.com/filter"
def postmark_spamcheck(self,message, options):
data = {'email':message,'options':options}
result = POST(self.postmark_spamcheck_url,data)

def postmark_spamcheck(self, message, options):
data = {'email': message, 'options': options}
result = POST(self.postmark_spamcheck_url, data)
result.raise_for_status()
content = loads(result.content)
if 'error' in content:
raise Exception(content['message'])
return content


def GetScore(self,email):
results = self.postmark_spamcheck(email,"short")

def GetScore(self, email):
results = self.postmark_spamcheck(email, "short")
return results['score']
def GetReport(self,email):
results = self.postmark_spamcheck(email,"long")
return results['report']

def GetReport(self, email):
results = self.postmark_spamcheck(email, "long")
return results['report']

0 comments on commit 9bdf780

Please sign in to comment.