weclapp-connect

1.0.2 • Public • Published

weclapp connect

This module can use for call any weclapp API or simple validating an user from external software.
How to use

  • Create a file called handshake-config.json in root directory
  • fill all tenant details. like this
    	{
    		"username": "*",
    		"password": "123456",
    		"tenant": "gupta",
    		"apiKey": "KjpkNTYzMTEzYi01NjU2LTRkNDMtOGU2Ni0wNmJiMTY5Mjc3NzU=",
    		"allowed": ["get", "post", "delete"],
    		"debug":"true"
    	}
    	
  • add this line where you want to access this - import $con from '~/lib/connect.js'
  • add this line of code inside methods or created (E.g in nuxt)
    		async testCall(){		
    			var config = {
    				'method': 'get',
    				'url': '/done.json',
    				'params': {}
    			}
    			var resp  = await $con.call(config)
    			console.log('Final Response = ', resp)
    		}
    	

Package Sidebar

Install

npm i weclapp-connect

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

3.84 kB

Total Files

4

Last publish

Collaborators

  • sudhir600