MCPcopy
hub / github.com/pyload/pyload / api_response

Method api_response

module/plugins/accounts/LinkifierCom.py:27–36  ·  view source on GitHub ↗
(self, method, user, password, **kwargs)

Source from the content-addressed store, hash-verified

25 API_URL = "https://api.linkifier.com/downloadapi.svc/"
26
27 def api_response(self, method, user, password, **kwargs):
28 post = {'login': user,
29 'md5Pass': hashlib.md5(password).hexdigest(),
30 'apiKey': self.API_KEY}
31 post.update(kwargs)
32 self.req.http.c.setopt(pycurl.HTTPHEADER, ["Content-Type: application/json; charset=utf-8"])
33 res = json.loads(self.load(self.API_URL + method,
34 post=json.dumps(post)))
35 self.req.http.c.setopt(pycurl.HTTPHEADER, ["Content-Type: text/html; charset=utf-8"])
36 return res
37
38 def grab_hosters(self, user, password, data):
39 json_data = self.api_response("hosters", user, password)

Callers 3

grab_hostersMethod · 0.95
grab_infoMethod · 0.95
signinMethod · 0.95

Calls 3

hexdigestMethod · 0.80
updateMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected