1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 19x 5x 5x 4x | /* @flow */
import invariant from "invariant";
import type { MethodApi } from "../types";
export default ({ client }: MethodApi) => (folderid: number = 0, optionalParams?: object): Promise<Object> => {
invariant(typeof folderid === "number", "`folderid` must be a number.");
return client
.api("listfolder", {
params: {
folderid: folderid,
...optionalParams
}
})
.then(response => {
return response.metadata;
});
};
|