@unavatar/core 3.35.0 → 3.36.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 +7 -0
- package/package.json +1 -1
- package/src/providers/index.js +2 -0
- package/src/providers/strava.js +12 -0
package/README.md
CHANGED
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
- [Spotify](#spotify)
|
|
62
62
|
- [Stack Overflow](#stack-overflow)
|
|
63
63
|
- [Steam](#steam)
|
|
64
|
+
- [Strava](#strava)
|
|
64
65
|
- [Substack](#substack)
|
|
65
66
|
- [Telegram](#telegram)
|
|
66
67
|
- [Thingiverse](#thingiverse)
|
|
@@ -901,6 +902,12 @@ Available inputs:
|
|
|
901
902
|
- `profile`: [unavatar.io/steam/profile:76561198044605749](https://unavatar.io/steam/profile:76561198044605749)
|
|
902
903
|
- `group`: [unavatar.io/steam/group:murcia-gaming](https://unavatar.io/steam/group:murcia-gaming)
|
|
903
904
|
|
|
905
|
+
### Strava
|
|
906
|
+
|
|
907
|
+
Get any Strava athlete's profile picture by their username or athlete ID.
|
|
908
|
+
|
|
909
|
+
e.g., [unavatar.io/strava/kikobeats](https://unavatar.io/strava/kikobeats)
|
|
910
|
+
|
|
904
911
|
### Substack
|
|
905
912
|
|
|
906
913
|
Get any Substack author's profile picture by their publication 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.36.0",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./src/index.js",
|
package/src/providers/index.js
CHANGED
|
@@ -42,6 +42,7 @@ const providersBy = {
|
|
|
42
42
|
'spotify',
|
|
43
43
|
'stackoverflow',
|
|
44
44
|
'steam',
|
|
45
|
+
'strava',
|
|
45
46
|
'substack',
|
|
46
47
|
'telegram',
|
|
47
48
|
'thingiverse',
|
|
@@ -102,6 +103,7 @@ module.exports = ctx => {
|
|
|
102
103
|
spotify: require('./spotify')(ctx),
|
|
103
104
|
stackoverflow: require('./stackoverflow')(ctx),
|
|
104
105
|
steam: require('./steam')(ctx),
|
|
106
|
+
strava: require('./strava')(ctx),
|
|
105
107
|
substack: require('./substack')(ctx),
|
|
106
108
|
telegram: require('./telegram')(ctx),
|
|
107
109
|
thingiverse: require('./thingiverse')(ctx),
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const getAvatarUrl = input => `https://www.strava.com/athletes/${input}`
|
|
4
|
+
|
|
5
|
+
module.exports = ({ createHtmlProvider, getOgImage }) =>
|
|
6
|
+
createHtmlProvider({
|
|
7
|
+
name: 'strava',
|
|
8
|
+
url: getAvatarUrl,
|
|
9
|
+
getter: getOgImage
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
module.exports.getAvatarUrl = getAvatarUrl
|