transformWikitextToLintTitlePostWithHttpInfo method

Future<Response> transformWikitextToLintTitlePostWithHttpInfo(
  1. String title,
  2. String wikitext
)

Check Wikitext for lint errors

Parse the supplied wikitext and check it for lint errors. - Stability: experimental - Rate limit: 25 req/s

Note: This method returns the HTTP Response.

Parameters:

  • String title (required): Page title. Use underscores instead of spaces. Use percent-encoding. Example: Main_Page.

  • String wikitext (required): The Wikitext to check

Implementation

Future<Response> transformWikitextToLintTitlePostWithHttpInfo(
  String title,
  String wikitext,
) async {
  // ignore: prefer_const_declarations
  final path =
      r'/transform/wikitext/to/lint/{title}'.replaceAll('{title}', title);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['multipart/form-data'];

  bool hasFields = false;
  final mp = MultipartRequest('POST', Uri.parse(path));
  hasFields = true;
  mp.fields[r'wikitext'] = parameterToString(wikitext);
  if (hasFields) {
    postBody = mp;
  }

  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}