def add_item(self, url, title=""):
        """ Method to add a new item to a instapaper account
            Returns 0 on success and -1 if something went wrong
        """
        parameters = {'username' : self.user,'password' : self.password,
                      'url' : url, 'title' : title}
        headerdata = urllib.urlencode(parameters)
        try:
            request = urllib2.Request(self.addurl, headerdata)
            response = urllib2.urlopen(request).read()
            if (int(response) == 201):
                return 0
            elif (int(response) == 403):
                return -2
            elif (int(response) == 500):
                return -3
            else:
                return -1
        except __HOLE__:
            return -1
dataset/ETHPy150Open mrtazz/instapaper.py/instapaper.py/Instapaper.add_item