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

Method _authenticate

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

Source from the content-addressed store, hash-verified

1124 SearchEngine.__init__(self, license or YAHOO_LICENSE, throttle, language)
1125
1126 def _authenticate(self, url):
1127 url.query.update({
1128 "oauth_version": "1.0",
1129 "oauth_nonce": oauth.nonce(),
1130 "oauth_timestamp": oauth.timestamp(),
1131 "oauth_consumer_key": self.license[0],
1132 "oauth_signature_method": "HMAC-SHA1"
1133 })
1134 url.query["oauth_signature"] = oauth.sign(url.string.split("?")[0], url.query,
1135 method = GET,
1136 secret = self.license[1]
1137 )
1138 return url
1139
1140 def search(self, query, type=SEARCH, start=1, count=10, sort=RELEVANCY, size=None, cached=True, **kwargs):
1141 """ Returns a list of results from Yahoo for the given query.

Callers 1

searchMethod · 0.95

Calls 3

timestampMethod · 0.80
updateMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected