Skip to content

Latest commit

 

History

History
107 lines (72 loc) · 4.68 KB

TalkPagesApi.md

File metadata and controls

107 lines (72 loc) · 4.68 KB

openapi.api.TalkPagesApi

Load the API package

import 'package:wikipedia_api/api.dart';

All URIs are relative to /api/rest_v1

Method HTTP request Description
pageTalkTitleGet GET /page/talk/{title} Get structured talk page contents
pageTalkTitleRevisionGet GET /page/talk/{title}/{revision} Get structured talk page contents

pageTalkTitleGet

String pageTalkTitleGet(title, redirect)

Get structured talk page contents

Gets structured talk page contents for the provided title. Stability: experimental

Example

import 'package:wikipedia_api/api.dart';

final api_instance = TalkPagesApi();
final title = title_example; // String | Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.
final redirect = true; // bool | Requests for [redirect pages](https://www.mediawiki.org/wiki/Help:Redirects) return HTTP 302 with a redirect target in `Location` header and content in the body. To get a 200 response instead, supply `false` to the `redirect` parameter. 

try {
    final result = api_instance.pageTalkTitleGet(title, redirect);
    print(result);
} catch (e) {
    print('Exception when calling TalkPagesApi->pageTalkTitleGet: $e\n');
}

Parameters

Name Type Description Notes
title String Page title. Use underscores instead of spaces. Use percent-encoding. Example: Main_Page.
redirect bool Requests for redirect pages return HTTP 302 with a redirect target in Location header and content in the body. To get a 200 response instead, supply false to the redirect parameter. [optional]

Return type

String

Authorization

No authorization required

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

pageTalkTitleRevisionGet

String pageTalkTitleRevisionGet(title, revision, redirect)

Get structured talk page contents

Gets structured talk page contents for the provided title. Stability: experimental

Example

import 'package:wikipedia_api/api.dart';

final api_instance = TalkPagesApi();
final title = title_example; // String | Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.
final revision = 56; // int | Optional page revision. Note that older revisions are not stored, so request latency with the revision would be higher. 
final redirect = true; // bool | Requests for [redirect pages](https://www.mediawiki.org/wiki/Help:Redirects) return HTTP 302 with a redirect target in `Location` header and content in the body. To get a 200 response instead, supply `false` to the `redirect` parameter. 

try {
    final result = api_instance.pageTalkTitleRevisionGet(title, revision, redirect);
    print(result);
} catch (e) {
    print('Exception when calling TalkPagesApi->pageTalkTitleRevisionGet: $e\n');
}

Parameters

Name Type Description Notes
title String Page title. Use underscores instead of spaces. Use percent-encoding. Example: Main_Page.
revision int Optional page revision. Note that older revisions are not stored, so request latency with the revision would be higher.
redirect bool Requests for redirect pages return HTTP 302 with a redirect target in Location header and content in the body. To get a 200 response instead, supply false to the redirect parameter. [optional]

Return type

String

Authorization

No authorization required

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]