dashattach 0.0.1 → 0.0.2
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/README.md +11 -0
- package/index.js +2 -2
- package/package.json +3 -3
- package/test.js +9 -0
package/README.md
ADDED
package/index.js
CHANGED
|
@@ -5,8 +5,8 @@ import info from "./src/components/information.js"
|
|
|
5
5
|
import actions from "./src/components/actions.js"
|
|
6
6
|
|
|
7
7
|
const DashAttach = {
|
|
8
|
-
featuredProjects: async () => {
|
|
9
|
-
const result = await (await fetch(
|
|
8
|
+
featuredProjects: async (offset, limit) => {
|
|
9
|
+
const result = await (await fetch(`https://api.dashblocks.org/featured-projects?offset=${+offset || 0}&limit=${+limit || 5}`)).json()
|
|
10
10
|
return result
|
|
11
11
|
},
|
|
12
12
|
auth,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dashattach",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Library for interacting with the Dash API.",
|
|
5
5
|
"homepage": "https://github.com/shaman2016scratch/DashAttach",
|
|
6
6
|
"bugs": {
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "GPL-3.0",
|
|
14
14
|
"author": "polzovatel_8787",
|
|
15
|
-
"type": "
|
|
15
|
+
"type": "module",
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"scripts": {
|
|
18
|
-
"test": "
|
|
18
|
+
"test": "node test.js"
|
|
19
19
|
}
|
|
20
20
|
}
|
package/test.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import DashAttach from "./index.js";
|
|
2
|
+
|
|
3
|
+
console.log(await DashAttach.info.users.getRole(7))
|
|
4
|
+
console.log(await DashAttach.info.users.getGradient(7))
|
|
5
|
+
console.log(await DashAttach.info.users.getId(7))
|
|
6
|
+
console.log(await DashAttach.info.users.getUsername(7))
|
|
7
|
+
console.log(await DashAttach.info.projects.getAuthorUsername(100))
|
|
8
|
+
console.log(await DashAttach.featuredProjects(0, 10))
|
|
9
|
+
console.log(await DashAttach.auth.myInfo.isLogin())
|