skapi-js 0.0.4 → 0.0.41

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.
package/index.html DELETED
@@ -1,90 +0,0 @@
1
- <html>
2
-
3
- <head>
4
- <meta charset="utf-8">
5
- <script src="dist/skapi.js"></script>
6
- </head>
7
-
8
- <body>
9
- <div>Signup</div>
10
- <form onsubmit="skapi.signup(this,{response: log, onerror:log});return false;">
11
- <input name='email' placeholder="email" />
12
- <br>
13
- <input name='password' placeholder="password" />
14
- <br>
15
- <input name='name' placeholder="name" />
16
- <br>
17
- <input name='gender' placeholder="gender" />
18
- <br>
19
- <p>Gender public</p>
20
- <input name="gender_public" type="checkbox">
21
- <br>
22
- <input type=submit></input>
23
- </form>
24
-
25
- <h1>Raffina 방명록</h1>
26
-
27
- <div>Login</div>
28
- <form onsubmit="skapi.login(this,{response: log, onerror:log});return false;">
29
- <input name='email' placeholder="email" />
30
- <br>
31
- <input name='password' placeholder="password" />
32
- <br>
33
- <input type=submit></input>
34
- </form>
35
-
36
- <form onsubmit="skapi.uploadUserData(this,{response: log, onerror:log});return false;">
37
- <textarea name='aboutme' placeholder="aboutme"></textarea>
38
- <input type=submit></input>
39
- </form>
40
- <br>
41
-
42
- <br>
43
- <div>Post 방명록</div>
44
- <form onsubmit="skapi.postRecord(this,{table:'friendsPost', access_group:0, response: log, onerror:log});return false;">
45
- <input name='title' placeholder="name" />
46
- <br>
47
- <textarea name="comment" placeholder="comment"></textarea>
48
- <br>
49
- <input type="file" name="myPhoto"></textarea>
50
- <br>
51
- <input type=submit></input>
52
- </form>
53
- <hr>
54
- <button onclick="getRecords()">Get Post</button>
55
- <div id="postdiv"></div>
56
- </body>
57
- <script>
58
- let skapi = new Skapi(
59
- 'us31la69ajk61c015d77ea',
60
- '7aa4ffe1-1b06-4375-9be2-47d89da9d206'
61
- );
62
- function log(v) {
63
- console.log(v);
64
- alert(v.toString());
65
- }
66
- async function getRecords() {
67
- let p = await skapi.getRecords({
68
- table: 'friendsPost',
69
- access_group: 0
70
- });
71
- console.log({ p });
72
- for(let post of p.list) {
73
- let d = document.createElement('div');
74
- d.innerHTML = `
75
- <h1>${post.data.title}</h1>
76
- <img src="${post.data?.myPhoto?.url}">
77
- <p>${post.data.comment}</p>
78
- <hr>
79
- `
80
- postdiv.append(d);
81
- }
82
- return p;
83
- }
84
- </script>
85
- <style>
86
- h1 {
87
- color: blue;
88
- }
89
- </style>
90
- </html>