| 1414 | self._pagination = {} |
| 1415 | |
| 1416 | def _authenticate(self, url): |
| 1417 | url.query.update({ |
| 1418 | "oauth_version": "1.0", |
| 1419 | "oauth_nonce": oauth.nonce(), |
| 1420 | "oauth_timestamp": oauth.timestamp(), |
| 1421 | "oauth_consumer_key": self.license[0], |
| 1422 | "oauth_token": self.license[2][0], |
| 1423 | "oauth_signature_method": "HMAC-SHA1" |
| 1424 | }) |
| 1425 | url.query["oauth_signature"] = oauth.sign(url.string.split("?")[0], url.query, |
| 1426 | method = GET, |
| 1427 | secret = self.license[1], |
| 1428 | token = self.license[2][1] |
| 1429 | ) |
| 1430 | return url |
| 1431 | |
| 1432 | def search(self, query, type=SEARCH, start=1, count=10, sort=RELEVANCY, size=None, cached=False, **kwargs): |
| 1433 | """ Returns a list of results from Twitter for the given query. |