shoonyatech / frontend-social-api

API endpoint for frontend.social
6 stars 12 forks source link

Podcast: CRUD methods #166

Closed souvikbasu closed 4 years ago

souvikbasu commented 4 years ago

Implement new model, controller and route for podcasts

podcast = { title: string, description: string, episodes: [title:string, overview: string, participants:[string]], skills: [string], url: string, }

GET call will return a list of podcast for given criteria (similar to jobs) POST call will create an entry. PUT call will be used to edit an entry DELETE call for deleting entry

User ratings and comments will added the same way as in Tools page

iyosayi commented 4 years ago

Can this be assigned to me?

jabbar86 commented 4 years ago

@souvikbasu Assign to me i will work on it.

megabyte98 commented 4 years ago

can you assign this to me please

megabyte98 commented 4 years ago

can you please give some more info about the get call like do you need helper functions same as jobs to fetch podcast related to a particular category?

souvikbasu commented 4 years ago

Assigned to @iyosayi on first come first serve basis. If you face any issues, please join the #frontend-social-dev slack channel using this invite: https://join.slack.com/t/shoonya-tech/shared_invite/zt-i783y3rk-5I97wQmTZ~4zchNZdKJs2w

iyosayi commented 4 years ago

Thank you @souvikbasu

iyosayi commented 4 years ago

GET call will return a list of the podcast for given criteria (similar to jobs)

Please what are the criteria?

souvikbasu commented 4 years ago

Podcasts can be searched by searchText and skills. A typical GET call will look like this:

https://frontend-social-api.herokuapp.com/podcast?searchText=performance&skills=react,angular&limit=10&page=2

In this request, searchText: string to be search against title, description, episodes.title, episodes.overview and episodes.participants skills: array of strings. If the skills field in the podcast document has any item matching with any item in this param then return it limit, page: used for pagination. limit=10&page=2 means return 10 items in 2nd page If searchText and skills are not specified then return all items in podcast but limit to 20 items in response

To give an example of data stored for a podcast, here is a sample podcast document

{
  title: 'Frontend Happy Hour',
  description:
    'A podcast featuring a panel of Software Engineers from Netflix, Twitch, & Atlassian talking over drinks about all things Front End development.',
  episodes: [
    {
      title: 'Severless - serving(less) drinks',
      overview:
        'Do you remember the days of FTP? In this episode, we are joined by Jerome Hardaway to talk with us about the changes made to hosting websites and how serverless has improved the ways we serve up websites and applications.',
      url:
        'https://frontendhappyhour.com/episodes/severless-serving(less)-drinks/',
        participants: ['Jerome Hardaway', 'Ryan Burgess', 'Augustus Yuan'],
    },
    {
        title: 'SEO - Searching for our drinks',
        overview:
          'Do you remember the days of FTP? In this episode, we are joined by Jerome Hardaway to talk with us about the changes made to hosting websites and how serverless has improved the ways we serve up websites and applications.',
        url:
          'https://frontendhappyhour.com/episodes/severless-serving(less)-drinks/',
          participants: ['Cole Turner', 'Ryan Burgess']
      },
    ],
  skills: ['react', 'angular', 'vue', 'svelte'],
  url: 'https://frontendhappyhour.com/',
}
souvikbasu commented 4 years ago

@iyosayi please raise PR when ready

souvikbasu commented 4 years ago

Hi @jabbar86 , @megabyte98 please let me know if you would be interested to pick up this issue. Will assign on first come basis

megabyte98 commented 4 years ago

interested

souvikbasu commented 4 years ago

That great, thanks! Assigned to @megabyte98
Please raise PR when ready. The api details are available in above comments. Please let me know if you need more details.

megabyte98 commented 4 years ago

ok sure :)

souvikbasu commented 4 years ago

@megabyte98 please raise PR when ready

megabyte98 commented 4 years ago

can you give me 1-2 days

souvikbasu commented 4 years ago

yes sure, thanks. Since the web changes are done, we wanted to test it out soon with the API

souvikbasu commented 4 years ago

Hi @megabyte98 please raise the PR soon as we need to complete web pages for podcast based on this api

souvikbasu commented 4 years ago

Hi @megabyte98 please let me know if the changes are ready as we need to get this out soon. Some issues in web are pending on this change