CNXT commited on
Commit
f9afbde
·
1 Parent(s): dae9876

Create #ReaDx ❌ #WRiTex #CoDex

Browse files
Files changed (1) hide show
  1. #ReaDx ❌ #WRiTex #CoDex +118 -0
#ReaDx ❌ #WRiTex #CoDex ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Read function for #://CNXT endpoint
2
+ async function readCNXT() {
3
+ const endpoint = "https://dev.cnxt.app/api/";
4
+ try {
5
+ // Perform GET request to retrieve CNXT data
6
+ const response = await fetch(endpoint);
7
+ const data = await response.json();
8
+ // Process data and return it
9
+ return data;
10
+ } catch (error) {
11
+ console.error(error);
12
+ }
13
+ }
14
+
15
+ // Write function for #://CNXT endpoint
16
+ async function writeCNXT(data) {
17
+ const endpoint = "https://dev.cnxt.app/api/";
18
+ try {
19
+ // Perform POST request to send CNXT data
20
+ const response = await fetch(endpoint, {
21
+ method: "POST",
22
+ headers: {
23
+ "Content-Type": "application/json",
24
+ },
25
+ body: JSON.stringify(data),
26
+ });
27
+ const responseData = await response.json();
28
+ // Process response and return it
29
+ return responseData;
30
+ } catch (error) {
31
+ console.error(error);
32
+ }
33
+ }
34
+
35
+ // Read function for $://THeXDesK endpoint
36
+ async function readTHeXDesK() {
37
+ const endpoint = "https://dev.xdesk/api";
38
+ try {
39
+ // Perform GET request to retrieve THeXDesK data
40
+ const response = await fetch(endpoint);
41
+ const data = await response.json();
42
+ // Process data and return it
43
+ return data;
44
+ } catch (error) {
45
+ console.error(error);
46
+ }
47
+ }
48
+
49
+ // Write function for $://THeXDesK endpoint
50
+ async function writeTHeXDesK(data) {
51
+ const endpoint = "https://dev.xdesk/api";
52
+ try {
53
+ // Perform POST request to send THeXDesK data
54
+ const response = await fetch(endpoint, {
55
+ method: "POST",
56
+ headers: {
57
+ "Content-Type": "application/json",
58
+ },
59
+ body: JSON.stringify(data),
60
+ });
61
+ const responseData = await response.json();
62
+ // Process response and return it
63
+ return responseData;
64
+ } catch (error) {
65
+ console.error(error);
66
+ }
67
+ }
68
+
69
+ // Read function for Chat-GPT endpoint
70
+ async function readChatGPT() {
71
+ const endpoint = "https://openai.api/chat-gpt4";
72
+ try {
73
+ // Perform GET request to retrieve Chat-GPT data
74
+ const response = await fetch(endpoint);
75
+ const data = await response.json();
76
+ // Process data and return it
77
+ return data;
78
+ } catch (error) {
79
+ console.error(error);
80
+ }
81
+ }
82
+
83
+ // Write function for Chat-GPT endpoint
84
+ async function writeChatGPT(data) {
85
+ const endpoint = "https://openai.api/chat-gpt4";
86
+ try {
87
+ // Perform POST request to send Chat-GPT data
88
+ const response = await fetch(endpoint, {
89
+ method: "POST",
90
+ headers: {
91
+ "Content-Type": "application/json",
92
+ },
93
+ body: JSON.stringify(data),
94
+ });
95
+ const responseData = await response.json();
96
+ // Process response and return it
97
+ return responseData;
98
+ } catch (error) {
99
+ console.error(error);
100
+ }
101
+ }
102
+
103
+ // Read function for #://CHaTx endpoint
104
+ async function readCHaTx() {
105
+ const endpoint = "https://cnxt.app/api/chatx";
106
+ try {
107
+ // Perform GET request to retrieve CHaTx data
108
+ const response = await fetch(endpoint);
109
+ const data = await response.json();
110
+ // Process data and return it
111
+ return data;
112
+ } catch (error) {
113
+ console.error(error);
114
+ }
115
+ }
116
+
117
+ // Write function for #://CHaTx endpoint
118
+ async function writeCHaTx(data) {