https://github.com/cilginsinek/steam-profile-api
Steam Profile API with CheerioJS
https://github.com/cilginsinek/steam-profile-api
cheerio npm-package typescript
Last synced: 2 months ago
JSON representation
Steam Profile API with CheerioJS
- Host: GitHub
- URL: https://github.com/cilginsinek/steam-profile-api
- Owner: CilginSinek
- License: mit
- Created: 2024-01-04T11:49:15.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-21T02:20:02.000Z (about 1 year ago)
- Last Synced: 2024-10-06T08:07:06.462Z (8 months ago)
- Topics: cheerio, npm-package, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/steam-profile-api
- Size: 194 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Steam Profile Api
Get Steam profile data with cheerio## Using
```JavaScript
import SteamProfile from 'SteamProfile';const steamHtml = await fetch("https://steamcommunity.com/id/"+steamid).then(res=>res.body.json())
const profile = new SteamProfile(steamHtml);
const StatusData = profile.getStatus();
console.log(StatusData);
// return status, status game information, status text
```
or
```JavaScript
import {getStatus} from 'SteamProfile';const steamHtml = await fetch("https://steamcommunity.com/id/"+steamid).then(res=>res.body.json())
const StatusData = getStatus(steamHtml);
console.log(StatusData);
// return status, status game information, status text
```### getCostumeUser Flags
- selectUser:
- status
- userInfo
- recentGames
- showcaseSelect
- favoriteGame#### Example:
```JavaScript
import {getCostumeUser} from 'SteamProfile';const userDataWithPlus = getCostumeUser("+status","favoriteGame","steamHtml");
console.log(userDataWithPlus)
// return UserComponents:status, ShowCaseComponents:favoriteGameconst userDataWithouPlus = getCostumeUser("-userInfo, recentGames","favoriteGame","steamHtml");
console.log(userDataWithouPlus)
// return UserComponents:status, ShowCaseComponents:favoriteGame
```## TO Do
- [x] write test file
- [ ] write miniprofile functions
- [ ] add other special components