@unavatar/core 3.38.0 → 3.40.0
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 +14 -0
- package/package.json +1 -1
- package/src/providers/index.js +4 -0
- package/src/providers/paypal.js +28 -0
- package/src/providers/wise.js +30 -0
package/README.md
CHANGED
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
- [OnlyFans](#onlyfans)
|
|
50
50
|
- [OpenStreetMap](#openstreetmap)
|
|
51
51
|
- [Patreon](#patreon)
|
|
52
|
+
- [PayPal](#paypal)
|
|
52
53
|
- [Pinterest](#pinterest)
|
|
53
54
|
- [Printables](#printables)
|
|
54
55
|
- [Product Hunt](#product-hunt)
|
|
@@ -69,6 +70,7 @@
|
|
|
69
70
|
- [Twitch](#twitch)
|
|
70
71
|
- [Vimeo](#vimeo)
|
|
71
72
|
- [WhatsApp](#whatsapp)
|
|
73
|
+
- [Wise](#wise)
|
|
72
74
|
- [X/Twitter](#xtwitter)
|
|
73
75
|
- [Xbox Gamertag](#xbox-gamertag)
|
|
74
76
|
- [YouTube](#youtube)
|
|
@@ -797,6 +799,12 @@ Get any Patreon creator's profile picture by their username.
|
|
|
797
799
|
|
|
798
800
|
e.g., [unavatar.io/patreon/gametestro](https://unavatar.io/patreon/gametestro)
|
|
799
801
|
|
|
802
|
+
### PayPal
|
|
803
|
+
|
|
804
|
+
Get any PayPal user's profile picture by their PayPal.Me username.
|
|
805
|
+
|
|
806
|
+
e.g., [unavatar.io/paypal/kikobeats](https://unavatar.io/paypal/kikobeats)
|
|
807
|
+
|
|
800
808
|
### Pinterest
|
|
801
809
|
|
|
802
810
|
Get any Pinterest user's profile picture by their username.
|
|
@@ -955,6 +963,12 @@ Available inputs:
|
|
|
955
963
|
- `channel`: [unavatar.io/whatsapp/channel:0029VaARuQ7KwqSXh9fiMc0m](https://unavatar.io/whatsapp/channel:0029VaARuQ7KwqSXh9fiMc0m)
|
|
956
964
|
- `chat`: [unavatar.io/whatsapp/chat:D2FFycjQXrEIKG8qQjbwZz](https://unavatar.io/whatsapp/chat:D2FFycjQXrEIKG8qQjbwZz)
|
|
957
965
|
|
|
966
|
+
### Wise
|
|
967
|
+
|
|
968
|
+
Get any Wise user's profile picture by their Wisetag.
|
|
969
|
+
|
|
970
|
+
e.g., [unavatar.io/wise/josev2264](https://unavatar.io/wise/josev2264)
|
|
971
|
+
|
|
958
972
|
### X/Twitter
|
|
959
973
|
|
|
960
974
|
Get any X (formerly Twitter) user's profile picture by their username.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@unavatar/core",
|
|
3
3
|
"description": "Get unified user avatar from social networks, including Instagram, SoundCloud, Telegram, Twitter, YouTube & more.",
|
|
4
4
|
"homepage": "https://unavatar.io",
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.40.0",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./src/index.js",
|
package/src/providers/index.js
CHANGED
|
@@ -31,6 +31,7 @@ const providersBy = {
|
|
|
31
31
|
'onlyfans',
|
|
32
32
|
'openstreetmap',
|
|
33
33
|
'patreon',
|
|
34
|
+
'paypal',
|
|
34
35
|
'pinterest',
|
|
35
36
|
'printables',
|
|
36
37
|
'primal',
|
|
@@ -53,6 +54,7 @@ const providersBy = {
|
|
|
53
54
|
'tumblr',
|
|
54
55
|
'twitch',
|
|
55
56
|
'vimeo',
|
|
57
|
+
'wise',
|
|
56
58
|
'x',
|
|
57
59
|
'xboxgamertag',
|
|
58
60
|
'youtube'
|
|
@@ -94,6 +96,7 @@ module.exports = ctx => {
|
|
|
94
96
|
onlyfans: require('./onlyfans')(ctx),
|
|
95
97
|
openstreetmap: require('./openstreetmap')(ctx),
|
|
96
98
|
patreon: require('./patreon')(ctx),
|
|
99
|
+
paypal: require('./paypal')(ctx),
|
|
97
100
|
pinterest: require('./pinterest')(ctx),
|
|
98
101
|
printables: require('./printables')(ctx),
|
|
99
102
|
primal: require('./primal')(ctx),
|
|
@@ -117,6 +120,7 @@ module.exports = ctx => {
|
|
|
117
120
|
twitch: require('./twitch')(ctx),
|
|
118
121
|
vimeo: require('./vimeo')(ctx),
|
|
119
122
|
whatsapp: require('./whatsapp')(ctx),
|
|
123
|
+
wise: require('./wise')(ctx),
|
|
120
124
|
x: require('./x')(ctx),
|
|
121
125
|
xboxgamertag: require('./xboxgamertag')(ctx),
|
|
122
126
|
youtube: require('./youtube')(ctx)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const { get } = require('lodash')
|
|
4
|
+
|
|
5
|
+
const getAvatarUrl = input => `https://www.paypal.com/paypalme/${input}`
|
|
6
|
+
|
|
7
|
+
const getAvatar = $ => {
|
|
8
|
+
const text = $('#client-data').contents().text()
|
|
9
|
+
if (!text) return
|
|
10
|
+
return get(JSON.parse(text), [
|
|
11
|
+
'recipientSlugDetails',
|
|
12
|
+
'slugDetails',
|
|
13
|
+
'userInfo',
|
|
14
|
+
'profilePhotoUrl'
|
|
15
|
+
])
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const factory = ({ createHtmlProvider }) =>
|
|
19
|
+
createHtmlProvider({
|
|
20
|
+
name: 'paypal',
|
|
21
|
+
url: getAvatarUrl,
|
|
22
|
+
getter: getAvatar
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
factory.getAvatarUrl = getAvatarUrl
|
|
26
|
+
factory.getAvatar = getAvatar
|
|
27
|
+
|
|
28
|
+
module.exports = factory
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const { get } = require('lodash')
|
|
4
|
+
|
|
5
|
+
const getAvatarUrl = input => `https://wise.com/pay/me/${input}`
|
|
6
|
+
|
|
7
|
+
const getAvatar = $ => {
|
|
8
|
+
const text = $('#__NEXT_DATA__').contents().text()
|
|
9
|
+
if (!text) return
|
|
10
|
+
return get(JSON.parse(text), [
|
|
11
|
+
'props',
|
|
12
|
+
'pageProps',
|
|
13
|
+
'match',
|
|
14
|
+
'display',
|
|
15
|
+
'avatar',
|
|
16
|
+
'value'
|
|
17
|
+
])
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const factory = ({ createHtmlProvider }) =>
|
|
21
|
+
createHtmlProvider({
|
|
22
|
+
name: 'wise',
|
|
23
|
+
url: getAvatarUrl,
|
|
24
|
+
getter: getAvatar
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
factory.getAvatarUrl = getAvatarUrl
|
|
28
|
+
factory.getAvatar = getAvatar
|
|
29
|
+
|
|
30
|
+
module.exports = factory
|