You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The README can show one single code snippet that explains how to use the wrapper/client.
The lines in the README can become code comments.
With that in place, the developer looking to use this code can easily copy the example and give the wrapper a try.
For example:
import{Wrapper}from'irods_client_http_typescript'import{CollectionTypes}from"irods-http-api-wrapper"// Create a url configuration object, containing info about// the irods http api that's running on your local machine.consturlComponents: URLComponentsType={host: '<host>',port: '<port>',version: '<version>',}// Create a wrapper object, passing in the url components, as// well as the username and password you want to log in with.constapi=newWrapper(urlComponents,'<username>','<password>')// Authenticate the wrapper object within an asynchronous context.(async()=>{awaitapi.authenticate()})// Declare type of res if working in typescript, otherwise just// put 'let res'letres: CollectionTypes.CollectionCreateResponse|nullletlpath="/tempZone/home/user/newCollection"(async()=>{res=awaitapi.collections.create({lpath: lpath})})
The text was updated successfully, but these errors were encountered:
The README can show one single code snippet that explains how to use the wrapper/client.
The lines in the README can become code comments.
With that in place, the developer looking to use this code can easily copy the example and give the wrapper a try.
For example:
The text was updated successfully, but these errors were encountered: