Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feeds: Update AS schema to v2 #593

Open
silverbucket opened this issue Sep 25, 2021 · 0 comments
Open

Feeds: Update AS schema to v2 #593

silverbucket opened this issue Sep 25, 2021 · 0 comments

Comments

@silverbucket
Copy link
Member

silverbucket commented Sep 25, 2021

The Feeds platform needs some reworking in how the AS objects look. Using collections type

{
  context: "feeds",
  type: "fetch",
  actor: {
     id: 'aUniqueUserString',
     type: "person",
  },
  target: {
     id: 'https://blog.example.com/rss',
     type: "page"
  },
  object: {
     type: "parameters",
     limit: 10,    // default 10
     property: 'date',
     after: 'Tue Nov 26 2013 02:11:59 GMT+0100 (CET)',
 }

Without any parameters specified, the platform will return most recent 10 articles fetched from the feed.

Example of the resulting JSON AS Object:

  {
    context: 'feeds',
    type: 'collection',
    actor: {
      type: 'page',
      name: 'Best Feed Inc.',
       id: 'https://blog.example.com/rss',
       description: 'Where the best feed comes to be the best',
       image: {
         type: 'image',
         width: '144',
         height: '144',
        url: 'https://example.com/images/bestfeed.jpg',
         mediaType: "image/jpeg"
      },
      favicon: 'https://example.com/favicon.ico',
      categories: ['best', 'feed', 'aminals'],
      language: 'en',
      author: 'John Doe'
    },
    totalItems: 10,
    items: [{
      id: "https://example.com/articles/about-stuff",
      type: 'document',
      title: 'About stuff...',
      url: "https://example.com/articles/about-stuff",
      date: "2013-05-28T12:00:00.000Z",
      datenum: 1369742400000,
      brief_html: "Brief synopsis of stuff...",
      brief_text: "Brief synopsis of stuff...",
      html: "Once upon a time...",
      text: "Once upon a time...",
      media: [{
        type: 'audio',
        length: '13908973',
        mediaType: 'audio/mpeg',
        url: 'https://example.com/media/thing.mpg'
      }],
      tags: ['foo', 'bar']
    }, {
      id: "https://example.com/articles/blog-post",
      type: 'document',
      title: 'Blog post...',
      url: "https://example.com/articles/blog-post",
      date: "2013-05-29T14:00:00.000Z",
      datenum: 1369742400000,
      brief_html: "Brief synopsis of stuff...",
      brief_text: "Brief synopsis of stuff...",
      html: "Another blog post...",
      text: "Another blog post...",
      media: [{
        length: '13908973',
        type: 'audio/mpeg',
        url: 'https://example.com/media/thing.mpg'
      }],
      tags: ['foo']
    }, { ... }]
  }

#594

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant