How to use the phovea_core/src/ajax.sendAPI function in phovea_core

To help you get started, we’ve selected a few phovea_core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Caleydo / ordino / src / storage.ts View on Github external
export function editNamedSet(id:string, data: {[key: string]: string}) {
  return sendAPI(`/targid/storage/namedset/${id}`, data, 'PUT');
}
github Caleydo / ordino / src / storage.ts View on Github external
export function deleteNamedSet(id:string) {
  return sendAPI(`/targid/storage/namedset/${id}`, {}, 'DELETE');
}
github Caleydo / ordino / src / storage.ts View on Github external
export function saveNamedSet(name: string, idType: IDType|string, ids: RangeLike, subType: {key:string, value:string}, description = '') {
  const data = {
    name,
    type: ENamedSetType.NAMEDSET,
    creator: retrieve('username', 'Anonymous'),
    idType: resolve(idType).id,
    ids: parse(ids).toString(),
    subTypeKey: subType.key,
    subTypeValue: subType.value,
    description
  };
  return sendAPI('/targid/storage/namedsets/', data, 'POST');
}