snaptrade-typescript-sdk 2.0.0 → 2.0.1

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.
@@ -1 +1 @@
1
- ba5c7e08-b43f-410b-a71b-d37e65071ba4
1
+ d4383e74-ba60-4145-8f92-fbb08b91c38f
package/README.md CHANGED
@@ -47,29 +47,6 @@ const {
47
47
  AccountInformationApi,
48
48
  } = require("snaptrade-typescript-sdk");
49
49
 
50
- // Should be replaced with function to get user ID
51
- function getUserId() {
52
- var d = new Date().getTime(); //Timestamp
53
- var d2 =
54
- (typeof performance !== "undefined" &&
55
- performance.now &&
56
- performance.now() * 1000) ||
57
- 0; //Time in microseconds since page-load or 0 if unsupported
58
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
59
- var r = Math.random() * 16; //random number between 0 and 16
60
- if (d > 0) {
61
- //Use timestamp until depleted
62
- r = (d + r) % 16 | 0;
63
- d = Math.floor(d / 16);
64
- } else {
65
- //Use microseconds since page-load if supported
66
- r = (d2 + r) % 16 | 0;
67
- d2 = Math.floor(d2 / 16);
68
- }
69
- return (c === "x" ? r : (r & 0x3) | 0x8).toString(16);
70
- });
71
- }
72
-
73
50
  async function main() {
74
51
  // 1) Initialize a configuration with your clientID and consumerKey.
75
52
  const config = new Configuration({
@@ -116,5 +93,28 @@ async function main() {
116
93
  console.log("deleteResponse:", deleteResponse);
117
94
  }
118
95
 
96
+ // Should be replaced with function to get user ID
97
+ function getUserId() {
98
+ var d = new Date().getTime(); //Timestamp
99
+ var d2 =
100
+ (typeof performance !== "undefined" &&
101
+ performance.now &&
102
+ performance.now() * 1000) ||
103
+ 0; //Time in microseconds since page-load or 0 if unsupported
104
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
105
+ var r = Math.random() * 16; //random number between 0 and 16
106
+ if (d > 0) {
107
+ //Use timestamp until depleted
108
+ r = (d + r) % 16 | 0;
109
+ d = Math.floor(d / 16);
110
+ } else {
111
+ //Use microseconds since page-load if supported
112
+ r = (d2 + r) % 16 | 0;
113
+ d2 = Math.floor(d2 / 16);
114
+ }
115
+ return (c === "x" ? r : (r & 0x3) | 0x8).toString(16);
116
+ });
117
+ }
118
+
119
119
  main();
120
120
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snaptrade-typescript-sdk",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Client for SnapTrade",
5
5
  "author": "Konfig",
6
6
  "repository": {