MCPcopy
hub / github.com/TheCraigHewitt/seomachine / _first_task

Method _first_task

data_sources/modules/dataforseo.py:50–56  ·  view source on GitHub ↗
(self, response: Dict[str, Any])

Source from the content-addressed store, hash-verified

48 return response.json()
49
50 def _first_task(self, response: Dict[str, Any]) -> Optional[Dict[str, Any]]:
51 tasks = response.get("tasks")
52 if isinstance(tasks, list) and tasks:
53 first = tasks[0]
54 if isinstance(first, dict):
55 return first
56 return None
57
58 def _first_result(self, task: Dict[str, Any]) -> Optional[Dict[str, Any]]:
59 result = task.get("result")

Callers 5

get_serp_dataMethod · 0.95
get_keyword_ideasMethod · 0.95
get_questionsMethod · 0.95
get_domain_metricsMethod · 0.95
check_ranking_historyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected