fixing Client::api function using array_merge_recursive_distinct