Commit 4e3a38e4 authored by Maxime Chaillet's avatar Maxime Chaillet

Merge branch 'issue_110_bis' into 'master'

add methods that got lost...

See merge request !93
parents ce1ab0c2 acb7eddd
Pipeline #8630 passed with stages
in 5 minutes and 50 seconds
......@@ -62,11 +62,10 @@
"jest": "^23.5.0",
"react-doc-generator": "^1.2.5"
},
"jest": {
"moduleNameMapper": {
"\\.(css|less)$": "identity-obj-proxy",
"\\.(gif)$": "<rootDir>/tests/fileMock.js"
}
"jest": {
"moduleNameMapper": {
"\\.(css|less)$": "identity-obj-proxy",
"\\.(gif)$": "<rootDir>/tests/fileMock.js"
}
}
\ No newline at end of file
}
......@@ -29,6 +29,19 @@ export class URL {
.replace("investigationId", investigationId);
}
/**
* Get URL used to create a new event for a given investigation on ICAT+
* @param {*} investigationId investigation indentifier
* @param {String} sessionId session identifier
* @return {String} URL to get the requested events
*/
static createEvent(sessionId, investigationId) {
return ICATPLUS.server + "/logbook/sessionId/investigation/id/investigationId/event/create"
.replace("sessionId", sessionId)
.replace("investigationId", investigationId);
}
/**
* Get URL used to update an event on a given investigation on ICAT+
* @param {String} sessionId the session identifier
......@@ -41,6 +54,17 @@ export class URL {
.replace("investigationId", investigationId);
}
/**
* Get URL used to upload data such as a file to ICAT+.
* @param {*} investigationId the investigationId
*/
static uploadFile(sessionId, investigationId) {
return ICATPLUS.server + "/resource/sessionId/file/investigation/id/investigationId/upload"
.replace("sessionId", sessionId)
.replace("investigationId", investigationId);
}
/**
* Get URL used to retrieve the file of an event which category is 'file'
* @param {string} sessionId session identifier
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment