/**
 * Feeds resource.
 */

import { del, get, post, put } from './client';

export const fetchFeeds = () => get( '/feeds' );

export const fetchFeed = ( id ) => get( `/feeds/${ id }` );

export const createFeed = ( feed ) => post( '/feeds', feed );

export const updateFeed = ( id, feed ) => put( `/feeds/${ id }`, feed );

export const deleteFeed = ( id ) => del( `/feeds/${ id }` );

export const duplicateFeed = ( id ) => post( `/feeds/${ id }/duplicate`, {} );
