MCPcopy Index your code
hub / github.com/clips/pattern / _authenticate

Method _authenticate

pattern/web/__init__.py:1416–1430  ·  view source on GitHub ↗
(self, url)

Source from the content-addressed store, hash-verified

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.

Callers 3

searchMethod · 0.95
trendsMethod · 0.95
streamMethod · 0.95

Calls 3

timestampMethod · 0.80
updateMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected