Skip to content

WFCD/profile-parser

Repository files navigation

profile-parser

Parse warframe profile data into useable javascript objects.

Supported by the Warframe Community Developers Coverage Status Discord semantic-release: angular

Documentation

You can find the documentation here

Installation

$ npm i -S @wfcd/profile-parser

Example usage

import { ProfileParser } from 'profile-parser';

const profileData = await fetch('https://content.warframe.com/dynamic/getProfileViewingData.php?n=${username}');
const user = new ProfileParser(await profileData.text());

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.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •