3.0.4 • Published 3 days ago

@sankei-arc-shared-components/content-source_story-feed-by-search v3.0.4

Weekly downloads
36
License
ISC
Repository
github
Last release
3 days ago

Content Source Story Feed By Search: A Sankei Shared Fusion Component

How to make calls to Content API:

General Content API

How do I use it in my Fusion Project?

/**
* Makes a call to the url
* https://{CONTENT_BASE}/content/v4/search/published?website=${website}&size=${size}&from=${offset}&body=${encodedBody}&_sourceInclude=${includedFields}&sort=display_date:desc
*
* @param website_url String: the website url (if null uses default)
* */

import { createContentSource } from '@sankei-arc-shared-components/content-source_story-feed-by-search';
import addResizedUrls from '../transforms/image-resizer';

const schemaName = 'ans-feed';

const queryStringFunction = () => 'q=type:story+AND+credits.by._id:user';

const { params, resolve } = createContentSource({
  defaultSite: 'my-site',
  defaultFeedOffset: 0,
  defaultFeedSize: 10,
  queryStringFunction,
  includedFields,
  sort: 'display_date:desc',
});

export default {
  resolve,
  schemaName,
  params,
  transform(data) {
    return addResizedUrls(data);
  },
};
3.0.4

3 days ago

3.0.3

7 months ago

3.0.2

2 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

0.1.3

4 years ago

2.0.1

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago