import http from '../http';

export default class collections {

    static getAll() {
        return http.get(`/zebedee/collections`)
            .then(response => {
                return response;
            })
    }

}

import http from '../http';

export default class collections {

    static getAll() {
        return http.get(`/zebedee/collections`)
            .then(response => {
                return response;
            })
    }

    static addAPIDataset(collectionID, instanceID) {
        // return http.put(`/zebedee/collections/${collectionID}/dataset/${instanceID}`, body , true)
        //     .then(response => {
        //         return response;
        //     })

        // mocked ok response from Zebedee
        return new Promise(resolve => {
            setTimeout(() => { resolve(); }, 2000);
        })

    }

    static removeAPIDataset(collectionID, instanceID) {
        // return http.delete(`/zebedee/collections/${collectionID}/dataset/${instanceID}`, true)
        //     .then(response => {
        //         return response;
        //     })

        // mocked ok response from Zebedee
        return new Promise(resolve => {
            setTimeout(() => { resolve(); }, 1000);
        })


    }

}

Add add and remove methods - currently returns promise after set time until api is ready
Add add and remove methods - currently returns promise after set time until api is ready


Former-commit-id: d3431ae4976bf3c953b43f859e3c028b694c5e98
Former-commit-id: daaea3ba37d95e67470dae733967f1b89c5e225b
Former-commit-id: f914e882d910e625258589ee26d68932feaca92d