codementor 1.0.12 → 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.
- package/LICENSE +1 -1
- package/README.md +14 -2
- package/lib/index.js +9 -8
- package/package.json +5 -3
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2016-
|
|
3
|
+
Copyright (c) 2016-25 Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
# codementor
|
|
21
21
|
|
|
22
|
-
[![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [](https://github.com/IonicaBizau/ama) [](https://www.npmjs.com/package/codementor) [](https://www.npmjs.com/package/codementor) [](https://www.codementor.io
|
|
22
|
+
[![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [](https://github.com/IonicaBizau/ama) [](https://www.npmjs.com/package/codementor) [](https://www.npmjs.com/package/codementor) [](https://www.codementor.io/@johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github)
|
|
23
23
|
|
|
24
24
|
<a href="https://www.buymeacoffee.com/H96WwChMy" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png" alt="Buy Me A Coffee"></a>
|
|
25
25
|
|
|
@@ -79,7 +79,7 @@ yarn add codementor
|
|
|
79
79
|
```js
|
|
80
80
|
const CodeMentor = require("codementor");
|
|
81
81
|
|
|
82
|
-
CodeMentor.mentorProfile("johnnyb", (err, data) => {
|
|
82
|
+
CodeMentor.mentorProfile("johnnyb", (err, { data }) => {
|
|
83
83
|
console.log(JSON.stringify(data, null, 4));
|
|
84
84
|
// =>
|
|
85
85
|
// {
|
|
@@ -160,6 +160,7 @@ CodeMentor.mentorProfile("johnnyb", (err, data) => {
|
|
|
160
160
|
|
|
161
161
|
|
|
162
162
|
|
|
163
|
+
|
|
163
164
|
## :question: Get Help
|
|
164
165
|
|
|
165
166
|
There are few ways to get help:
|
|
@@ -174,6 +175,8 @@ There are few ways to get help:
|
|
|
174
175
|
|
|
175
176
|
|
|
176
177
|
|
|
178
|
+
|
|
179
|
+
|
|
177
180
|
## :memo: Documentation
|
|
178
181
|
|
|
179
182
|
|
|
@@ -259,6 +262,15 @@ Thanks! :heart:
|
|
|
259
262
|
|
|
260
263
|
|
|
261
264
|
|
|
265
|
+
## :dizzy: Where is this library used?
|
|
266
|
+
If you are using this library in one of your projects, add it in this list. :sparkles:
|
|
267
|
+
|
|
268
|
+
- `codescriptwiz`
|
|
269
|
+
- `devprogrammer`
|
|
270
|
+
- `scriptcodesavvy`
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
262
274
|
|
|
263
275
|
|
|
264
276
|
|
package/lib/index.js
CHANGED
|
@@ -28,7 +28,7 @@ module.exports = function () {
|
|
|
28
28
|
* @returns {String} The user profile url.
|
|
29
29
|
*/
|
|
30
30
|
value: function userUrl(user) {
|
|
31
|
-
return CODEMENTOR_HOST + user;
|
|
31
|
+
return CODEMENTOR_HOST + "@" + user;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
@@ -45,29 +45,30 @@ module.exports = function () {
|
|
|
45
45
|
}, {
|
|
46
46
|
key: "mentorProfile",
|
|
47
47
|
value: function mentorProfile(user, cb) {
|
|
48
|
+
debugger;
|
|
48
49
|
return scrape(CodeMentor.userUrl(user), {
|
|
49
50
|
reviews: {
|
|
50
|
-
listItem: "
|
|
51
|
+
listItem: "[class^='Review__StyledReview']",
|
|
51
52
|
data: {
|
|
52
53
|
avatar: {
|
|
53
|
-
selector: "avatar",
|
|
54
|
-
attr: "
|
|
54
|
+
selector: ".cui-avatar-image > img",
|
|
55
|
+
attr: "src"
|
|
55
56
|
},
|
|
56
57
|
content: ".content",
|
|
57
58
|
name: {
|
|
58
|
-
selector: ".
|
|
59
|
+
selector: ".name",
|
|
59
60
|
eq: 0
|
|
60
61
|
},
|
|
61
|
-
date: ".
|
|
62
|
+
date: ".time"
|
|
62
63
|
}
|
|
63
64
|
},
|
|
64
|
-
description: ".
|
|
65
|
+
description: ".headline",
|
|
65
66
|
timezone: {
|
|
66
67
|
selector: ".timezone",
|
|
67
68
|
how: "text"
|
|
68
69
|
},
|
|
69
70
|
languages: {
|
|
70
|
-
selector: ".
|
|
71
|
+
selector: ".additional-info .languages > span:nth-child(2n)",
|
|
71
72
|
convert: splitByComma
|
|
72
73
|
},
|
|
73
74
|
skills: {
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"io"
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "
|
|
12
|
+
"version": "2.0.1",
|
|
13
13
|
"main": "lib/index.js",
|
|
14
14
|
"scripts": {
|
|
15
15
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"homepage": "https://github.com/IonicaBizau/codementor#readme",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"match-it": "^1.0.1",
|
|
28
|
-
"scrape-it": "^
|
|
28
|
+
"scrape-it": "^5.2.4",
|
|
29
29
|
"split-by-comma": "^1.0.0"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
"menu/",
|
|
40
40
|
"cli.js",
|
|
41
41
|
"index.js",
|
|
42
|
+
"index.d.ts",
|
|
43
|
+
"package-lock.json",
|
|
42
44
|
"bloggify.js",
|
|
43
45
|
"bloggify.json",
|
|
44
46
|
"bloggify/"
|
|
@@ -52,4 +54,4 @@
|
|
|
52
54
|
"example": "example"
|
|
53
55
|
},
|
|
54
56
|
"devDependencies": {}
|
|
55
|
-
}
|
|
57
|
+
}
|