Skip to content

Latest commit

 

History

History
149 lines (100 loc) · 5.27 KB

FeedApi.md

File metadata and controls

149 lines (100 loc) · 5.27 KB

openapi.api.FeedApi

Load the API package

import 'package:wikipedia_api/api.dart';

All URIs are relative to /api/rest_v1

Method HTTP request Description
aggregatedFeed GET /feed/featured/{yyyy}/{mm}/{dd} Aggregated featured content
feedAnnouncementsGet GET /feed/announcements Current announcements to display
onThisDay GET /feed/onthisday/{type}/{mm}/{dd} Events on this day

aggregatedFeed

Feed aggregatedFeed(yyyy, mm, dd)

Aggregated featured content

Provides the aggregated feed content for the given date. The endpoint returns the featured article of the day, most read articles for the previous day, news content and the featured image and video of the day. Stability: unstable

Example

import 'package:wikipedia_api/api.dart';

final api_instance = FeedApi();
final yyyy = yyyy_example; // String | Year the aggregated content is requested for
final mm = mm_example; // String | Month the aggregated content is requested for, 0-padded
final dd = dd_example; // String | Day of the month the aggregated content is requested for, 0-padded

try {
    final result = api_instance.aggregatedFeed(yyyy, mm, dd);
    print(result);
} catch (e) {
    print('Exception when calling FeedApi->aggregatedFeed: $e\n');
}

Parameters

Name Type Description Notes
yyyy String Year the aggregated content is requested for
mm String Month the aggregated content is requested for, 0-padded
dd String Day of the month the aggregated content is requested for, 0-padded

Return type

Feed

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

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

feedAnnouncementsGet

AnnouncementsResponse feedAnnouncementsGet()

Current announcements to display

Gets announcements for display in the official Wikipedia iOS and Android apps. Stability: experimental

Example

import 'package:wikipedia_api/api.dart';

final api_instance = FeedApi();

try {
    final result = api_instance.feedAnnouncementsGet();
    print(result);
} catch (e) {
    print('Exception when calling FeedApi->feedAnnouncementsGet: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

AnnouncementsResponse

Authorization

No authorization required

HTTP request headers

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

onThisDay

OnthisdayResponse onThisDay(type, mm, dd)

Events on this day

Provides events that historically happened on the provided day and month. Supported types of events are: - All: all of the following - Selected: a list of a few selected anniversaries which occur on the provided day and month; often the entries are curated for the current year - Births: a list of birthdays which happened on the provided day and month - Deaths: a list of deaths which happened on the provided day and month - Holidays: a list of fixed holidays celebrated on the provided day and month - Events: a list of significant events which happened on the provided day and month and which are not covered by the other types yet Stability: experimental

Example

import 'package:wikipedia_api/api.dart';

final api_instance = FeedApi();
final type = type_example; // String | Type of events
final mm = mm_example; // String | Month events are requested for, 0-padded
final dd = dd_example; // String | Day of the month events are requested for, 0-padded

try {
    final result = api_instance.onThisDay(type, mm, dd);
    print(result);
} catch (e) {
    print('Exception when calling FeedApi->onThisDay: $e\n');
}

Parameters

Name Type Description Notes
type String Type of events
mm String Month events are requested for, 0-padded
dd String Day of the month events are requested for, 0-padded

Return type

OnthisdayResponse

Authorization

No authorization required

HTTP request headers

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