editPage method

Future<Map> editPage({
  1. required String access_token,
  2. required String path,
  3. required String title,
  4. required List content,
  5. String? author_name,
  6. String? author_url,
  7. bool return_content = true,
  8. Client? httpClient,
})

Implementation

Future<Map> editPage({
  required String access_token,
  required String path,
  required String title,
  required List content,
  String? author_name,
  String? author_url,
  bool return_content = true,
  Client? httpClient,
}) async {
  Map parameters = {
    "access_token": access_token,
    "title": title,
    "content": content,
    "return_content": return_content,
  };

  if (author_name != null) {
    parameters["author_name"] = author_name;
  }
  if (author_url != null) {
    parameters["author_url"] = author_url;
  }

  Map result = await invoke(
    method: "editPage",
    parameters: parameters,
    path_api: path,
    method_request: "post",
    httpClient: httpClient,
  );

  return result;
}