1.0.7 • Published 2 years ago

vr-test-utils v1.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

About The Project

We need to perform utility before we use it.

Here's why:

  • Your time should be focused on creating something amazing. A project that solves a problem and helps others
  • You shouldn't be doing the same tasks over and over like creating a README from scratch
  • You should implement DRY principles to the rest of your life :smile:

Of course, no one template will serve all projects since your needs may be different. So I'll be adding more in the near future. You may also suggest changes by forking this repo and creating a pull request or opening an issue. Thanks to all the people have contributed to expanding this template!

Built With

This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.

  • Node.js
  • TypeScript
  • Cloudant

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
    npm install npm@latest -g

REST Client

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
    npm install npm@latest -g
  • .env
    API_KEY=Key
    API_URL=url
    db=database

Rest Client Usage

This is an example of how to list things you need to use the software and how to install them.

  • node

    Sample Node.js express client request.
    
    app.post("/getRecord", sanitizeRequest, async (req, res): Promise<void> => {
      let result = await getRecord(req.body.docId).catch((e) => { return e });
      res.send(result)
    });
                                 

Cli Client

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
    npm install npm@latest -g
  • .env
    API_KEY=Key
    API_URL=url
    db=database

Cli Client Usage

This is an example of how to list things you need to use the software and how to install them.

  • node

    Get help:
    index.js --help
    
    Get Rev details:
    index.js getRev --docId="{'docId': 'MachineID'}"
    
    Get a record:
    index.js get --docId="{'docId': 'MachineID'}"
    
    Add a record: 
    index.js add --record="{'type':'Machine','':'',...}"
    
    Update a record: 
    index.js update --docId="{'docId': 'Machine2'}"  --record="{'type':'Machine','':'',...}"
    
    Delete a resource:                           
    index.js delete --docId="{'docId': 'MachineID'}"
    
    Check resource availability:
    index.js checkAvailability --docId="{'docId':
                                 'MachineID'}"
    
    Check resource subscription:
    index.js checkSubscription --record="{'docId': 'Machine1', 'clientID': 'client ID'}"
    
    Reserve a resource: 
    index.js reserve --record="{'docId': 'MachineID',
                                 'hours': 'hours'}"     
    
    Release a resource:
    index.js release --record="{'docId': 'MachineID',
                                 'hours': 'hours'}"
    
    Subscribe a service:
    index.js release --record="{'docId': 'MachineID',
                                 'clientID': 'clientID' , 'SubscribedTill':
                                 '02/11/2022'}"
    
    Unsubscribe a service:
    index.js release --record="{'docId': 'MachineID',
                                 'clientID': 'clientID' , 'SubscribedTill':
                                 '02/11/2022'}"
    
    Modify a subscription:
    index.js modifySubscription --record="{'docId':'Machine1', 'clientID': 'edcrf', 'SubscribedTill':'02/18/2023'}"
                                 

REPL Client

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
    npm install npm@latest -g
  • .env
    API_KEY=Key
    API_URL=url
    db=database

REPL Client Usage

This is an example of how to list things you need to use the software and how to install them.

  • node

    Get REPL:
    Go to Node.js REPL CLI tool.
    
    > node
    > let dbUtils = require("./test-utils/dbUtils");
    > let result = await dbUtils.getRecord("Machine1").catch((e) => { return e });
    > let seizureCliUtils = require("./test-utils/seizureCLIUtils");
    > let result = seizureCliUtils.checkAvailabilityCLI("Machine1")
                                 

Contact

Your Name - email@example.com

Project Link: https://github.com/your_username/repo_name

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago