Skip to main content
Version: latest

Publications

This method is used to retrieve a list of publications based on the selected domain (region).

Parameters

ParameterTypeDescription
domainStringThe domain (region) code for retrieving publications.
langDataLanguageThe language for publication data (default: DataLanguage.id).
pageintThe page number (default: 1).
keywordString?A keyword for searching publications (optional).
monthint?The month for filtering publications (optional - 1..12).
yearint?The year for filtering publications (optional).

Example

Example usage and sample output:

Preview

// Fetch publication data from BPS API
final publicationResult = await StadataFlutter.instance.list.publications(
domain: 'example_domain_code', // Replace with the desired domain code
lang: DataLanguage.id,
page: 1,
keyword: 'example_keyword', // Replace with desired keyword or null
month: null, // Replace with desired month or null
year: null, // Replace with desired year or null
);

final publicationList = publicationResult.data;
final pagination = publicationResult.pagination;

// Print pagination info
print('Current Page: ${pagination.page}');
print('Total Pages: ${pagination.pages}');
print('Data Count in This Page: ${pagination.count}');
print('Per Page: ${pagination.perPage}');
print('Total: ${pagination.total}');
print('------------------------');

// Print the retrieved publication data
for (final publication in publicationList) {
print('Publication ID: ${publication.id}');
print('Title: ${publication.title}');
print('ISSN: ${publication.issn}');
print('Scheduled Date: ${publication.scheduledDate}');
print('Release Date: ${publication.releaseDate}');
print('Update Date: ${publication.updateDate}');
print('Cover Image URL: ${publication.cover}');
print('PDF File URL: ${publication.pdf}');
print('Size: ${publication.size}');
print('Abstract: ${publication.abstract ?? 'Not available'}');
print('Catalogue Number: ${publication.catalogueNumber ?? 'Not available'}');
print('Publication Number: ${publication.publicationNumber ?? 'Not available'}');
print('------------------------');
}

Properties (Publication)

PropertyTypeDescription
idStringUnique identifier for the publication.
titleStringThe title of the publication.
issnStringThe International Standard Serial Number (ISSN).
scheduledDateDateTime?The scheduled date for the publication (optional).
releaseDateDateTime?The release date of the publication (optional).
updateDateDateTime?The date when the publication was last updated (optional).
coverStringThe cover image URL of the publication.
pdfStringThe PDF file URL of the publication.
sizeStringThe size of the publication (e.g., file size).
abstractString?An optional abstract or summary of the publication in HTML Format (optional).
catalogueNumberString?An optional catalogue number associated with the publication (optional).
publicationNumberString?An optional publication number or code (optional).