https://github.com/wfcd/profile-parser
https://github.com/wfcd/profile-parser
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/wfcd/profile-parser
- Owner: WFCD
- License: mit
- Created: 2024-02-08T04:12:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-19T22:04:48.000Z (over 1 year ago)
- Last Synced: 2025-04-04T05:45:47.603Z (about 1 year ago)
- Language: JavaScript
- Size: 1.32 MB
- Stars: 5
- Watchers: 7
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# profile-parser
Parse warframe profile data into useable javascript objects.
[](https://github.com/WFCD/banner/blob/master/PROJECTS.md)
[](https://coveralls.io/github/WFCD/profile-parser?branch=master)
[](https://discord.gg/jGZxH9f)
[](https://github.com/semantic-release/semantic-release)
## Documentation
You can find the documentation [here](https://wfcd.github.io/profile-parser/)
## Installation
```shell
$ npm i -S @wfcd/profile-parser
```
## Example usage
```javascript
import { ProfileParser } from 'profile-parser';
const profileData = await fetch('https://content.warframe.com/dynamic/getProfileViewingData.php?n=${username}');
const user = new ProfileParser(await profileData.json());
console.log(user.profile.displayName);
```
If this data is stale, you can check the `Cache-Control` header of the response from DE's server to see how long to wait for retry, and you could have the above retry after that amount of time. However, this may cause _significant_ delay if the data is not saved/hydrated in a fully asynchronous or event-based timeframe.