createPage method

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

Implementation

Future<Map> createPage({
  required String access_token,
  required String title,
  String? author_name,
  String? author_url,
  required List content,
  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: "createPage",
    parameters: parameters,
    method_request: "post",
    httpClient: httpClient,
  );

  return result;
}