@sankei-arc-shared-components/content-source_story-by-url
v0.1.0
Published
Content Story By URL Feature.
Downloads
97
Readme
Content Story By URL: A Sankei Shared Fusion Component
How do I use it in my Fusion Project?
/**
- Makes a call to the url
- https://{CONTENT_BASE}/content/v4/stories/?website_url={hierarchy}&website={arc-site}&included_fields={includedFields}
- @param website_url String: the website url (if null uses default)
- @param page Number: the page number for pagination of the article
- @param pagination String: determines whether or not to use the pagination transform
- */
import { createContentSource } from '@sankei-arc-shared-components/content-source_story-by-url';
import includedFields from './common/included-fields/article';
import paginationTransform from '../transforms/pagination-transform';
import filter from '../filters/article';
const { params, resolve } = createContentSource({
defaultSite: 'sankei',
includedFields,
});
export default {
resolve,
params: {
...params,
paginate: 'text',
page: 'number',
},
filter,
transform(data, query) {
return paginationTransform(data, query);
},
};