For the given author id or alias, returns a (id, name, date of birth, gender, locale)-tuple.
(self, id=None, **kwargs)
| 2366 | return results |
| 2367 | |
| 2368 | def profile(self, id=None, **kwargs): |
| 2369 | """ For the given author id or alias, |
| 2370 | returns a (id, name, date of birth, gender, locale)-tuple. |
| 2371 | """ |
| 2372 | url = FACEBOOK + (u(id or "me")).replace(FACEBOOK, "") |
| 2373 | url = URL(url, method=GET, query={"access_token": self.license}) |
| 2374 | kwargs.setdefault("cached", False) |
| 2375 | kwargs.setdefault("unicode", True) |
| 2376 | kwargs.setdefault("throttle", self.throttle) |
| 2377 | try: |
| 2378 | data = URL(url).download(**kwargs) |
| 2379 | data = json.loads(data) |
| 2380 | except HTTP400BadRequest: |
| 2381 | raise HTTP401Authentication |
| 2382 | return ( |
| 2383 | u(data.get("id", "")), |
| 2384 | u(data.get("name", "")), |
| 2385 | u(data.get("birthday", "")), |
| 2386 | u(data.get("gender", "")[:1]), |
| 2387 | u(data.get("locale", "")) |
| 2388 | ) |
| 2389 | |
| 2390 | #--- PRODUCT REVIEWS ------------------------------------------------------------------------------- |
| 2391 | # ProductWiki is an open web-based product information resource. |
no test coverage detected