All files / client/methods listfolder.js

100% Statements 4/4
0% Branches 0/1
100% Functions 3/3
100% Lines 4/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19              12x 4x   4x         3x      
/* @flow */
 
import invariant from 'invariant';
import type { MethodApi } from '../types';
//import deepAssign from 'deep-assign';
 
export default ({ client }: MethodApi) =>
  (folderid: number = 0): Promise<Object> => {
    invariant(typeof folderid === 'number', '`folderid must be a number.`');
 
    return client.api('listfolder', {
      params: {
        folderid: folderid
      }
    }).then((response) => {
      return response.metadata;
    });
  };