@hubs101/js-api-skd-client 1.0.10221

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +29 -0
  2. package/package.json +55 -0
package/README.md ADDED
@@ -0,0 +1,29 @@
1
+ ## API Doc
2
+
3
+ [API Documentation](https://github.com/We-Conect/event-app-api/blob/main/src/README.md)
4
+
5
+ ## Using BaseAPI, stateless
6
+
7
+ Used before initWithToken
8
+ `BaseAPI.login(basePath, username, password)`
9
+
10
+ Accessing API via stateless interface:
11
+ `BaseAPI.fetchAttendees(basePath, token, eventID)`
12
+
13
+ ## Using EventAPIProvider
14
+
15
+ 1. Wrap app with Provider:
16
+ `import { EventAPIProvider } from 'event-app-api';`
17
+ 2. Access api via hook:
18
+ ` const { fetchAttendees } = useAPIContext();`
19
+
20
+ \*\*First init or initWithToken needs to be called in order to have authentication setup.
21
+
22
+ ## Creating new release
23
+
24
+ 1. Commit al changes to git.
25
+ 2. Prepare build: `npm run build`
26
+ 3. Create new patch version run: `npm version patch`
27
+ 4. Publish package to NPM: `npm publish`
28
+
29
+ All in one publish alternative run: `npm run new-version`
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@hubs101/js-api-skd-client",
3
+ "version": "1.0.10221",
4
+ "author": "Liveware",
5
+ "scripts": {
6
+ "test": "jest --config jestconfig.json",
7
+ "build": "tsc",
8
+ "format": "prettier --write \"src/**/*.ts\" \"src/**/*.ts\"",
9
+ "lint": "tslint -p tsconfig.json",
10
+ "prepare": "npm run build",
11
+ "prepublishOnly": "npm test && npm run lint",
12
+ "preversion": "npm run lint",
13
+ "version": "npm run format && git add -A src",
14
+ "postversion": "git push && git push --tags",
15
+ "new-version": "git pull && npm run build && git commit -m 'update api' -a --no-verify && npm version patch && npm publish"
16
+ },
17
+ "meta": {},
18
+ "description": "Package for easy access to Event App API",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/We-Conect/event-app-api.git"
22
+ },
23
+ "keywords": [
24
+ "We-Conect",
25
+ "Liveware",
26
+ "EventApp"
27
+ ],
28
+ "license": "ISC",
29
+ "dependencies": {
30
+ "@types/react": "*",
31
+ "react": "^18.2.0"
32
+ },
33
+ "peerDependencies": {
34
+ "react": "^18.2.0"
35
+ },
36
+ "main": "lib/index",
37
+ "react-native": "lib/index",
38
+ "types": "lib/index.d.ts",
39
+ "source": "src/index",
40
+ "directories": {
41
+ "test": "test"
42
+ },
43
+ "devDependencies": {
44
+ "@types/jest": "^29.5.0",
45
+ "jest": "^29.5.0",
46
+ "prettier": "^2.8.7",
47
+ "ts-jest": "^29.1.0",
48
+ "tslint": "^6.1.3",
49
+ "tslint-config-prettier": "^1.18.0",
50
+ "typescript": "^5.0.4"
51
+ },
52
+ "files": [
53
+ "lib/**/*"
54
+ ]
55
+ }