- GET /podcast
Params:
2. url
Hitting it with podcast feed url tribes server will parse xml and return a json with this structure:
{
`id` : int,
`title`: string,
`url` : string,
`description` : string,
`author` : string,
`image` : string,
`link` : string,
`lastUpdateTime` : int / date,
`contentType` : string,
`language` : string,
`episodes`: Array<Episode>,
`value` : Value
}
Episode:
{
`id` : int
`title` : string,
`description` : string,
`datePublished` : int/date,
`enclosureUrl` : string,
`enclosureType` : string,
`enclosureLength` : int,
`image` : string,
`link` : string,
}
Value
{
`model` : Model,
`destination` : Array<Destination>,
}
Model
{
`type` : string,
`suggested` : string,
}
Destination
{
`address` : string,
`split` : double,
`type` : string,
`customKey` : string,
`customValue` : string,
}
- GET /feed
Params:
1. tribe_uuid
From the UUID on tribes server we can get the feed_url and the feed_content_type, then request the feed_url, parse the xml depending on the source and return a generic response with all the needed fields no matter the type of the content.
{
`id` : string,
`feedType` : int, (PODCAST / VIDEO / NEWSLETTER)
`title`: string,
`url` : string,
`description` : string,
`author` : string,
`generator` : string,
`imageUrl` : string,
`ownerUrl` : string,
`link` : string,
`datePublished`: int / date,
`dateUpdated` : int / date,
`contentType` : string,
`language` : string,
`items`: Array<Item>,
`value` : Value
}
ITEM
{
`id` : string
`title` : string,
`description` : string,
`datePublished` : int/date,
`dateUpdated` : int/date,
`author` : string,
`contentType` : string,
`enclosureUrl` : string,
`enclosureType` : string,
`enclosureLength` : int,
`imageUrl` : string,
`thumbnailUrl` : string,
`link` : string,
}
Value
{
`model` : Model,
`destination` : Array<Destination>,
}
Model
{
`type` : string,
`suggested` : string,
}
Destination
{
`address` : string,
`split` : double,
`type` : string,
`customKey` : string,
`customValue` : string,
}
Those are the sources we are supporting right now and each one should be handled in a different way to be parsed and return the same json structure to the app. This way if we want to include a new source in the future we just need to handle it on tribes server and app will keep receiving the same.