Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getFriendActivity([startDate,] daysSince, callback) #203

Open
Revadike opened this issue Jun 25, 2018 · 0 comments · May be fixed by #297
Open

Add getFriendActivity([startDate,] daysSince, callback) #203

Revadike opened this issue Jun 25, 2018 · 0 comments · May be fixed by #297

Comments

@Revadike
Copy link
Contributor

This function will parse the results of https://steamcommunity.com/my/home into a JSON object.
It could be done along the lines of this:

function getFriendActivity(startDate, daysSince, callback) {
    if (typeof startDate === "number") {
        callback = daysSince;
        daysSince = startDate;
        startDate = new Date();
        startDate.setHours(0);
        startDate.setMinutes(0);
        startDate.setSeconds(0);
        startDate = Math.floor(startDate.valueOf() / 1000);
    }
    daysSince *= 250;

    this.httpRequestGet("https://steamcommunity.com/id/royalgamer06/ajaxgetusernews?start=" + startDate + "&startoffset=" + daysSince, (error, response, data) => { /* Parsing result, error and callback handling */ });
}

Thank you

@Revadike Revadike linked a pull request Oct 12, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants