Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1014 Bytes

README.md

File metadata and controls

43 lines (32 loc) · 1014 Bytes

Build status

Demo and API docs

<dcache-namespace>

dcache-namespace can be used to perform an ajax call to dcache using dcache-restful api.

An example of how to use dcache-namespace to create a new directory inside dcache:

<dcache-namespace id="namespace"></dcache-namespace>

...

    var namespace = document.getElementById('namespace')

    //supply credential
    namespace.auth = 'YW5vbnltb3VzOm5vcGFzc3dvcmQ';

    namespace.promise.then(
        function(req) {
            //Successful - do something 
        }
    ).catch(
        function(err) {
            //Fail - do something
        }
    );

    namespace.mkdir({
      url: '/api/v1/namespace/', 
      path: '/public', 
      name: folderName
    });

Task list

  • add unit test