-
Notifications
You must be signed in to change notification settings - Fork 1
User Section
All user methods that take an {ids} parameter have a /me equivalent method that takes an access_token instead.
// users objectconst stack_users = stackexchange.users;
Get all users on the site.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// using users endpointstack_users.users(users_options, (response) => {console.log(response);});
Get the users identified by a set of ids.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using users_by_ids endpointstack_users.users_by_ids(user_ids, users_options, (response) => {console.log(response);});
Get the answers posted by the users identified by a set of ids.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using answers_on_users endpointstack_users.answers_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the badges earned by the users identified by a set of ids.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using badges_on_users endpointstack_users.badges_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the comments posted by the users identified by a set of ids.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using comments_on_users endpointstack_users.comments_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the comments posted by a set of users in reply to another user.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// id of another userlet toid = 1427878;// using comments_by_users_to_user endpointstack_users.comments_by_users_to_user(user_ids, toid , users_options, (response) => {console.log(response);});
Get the questions favorited by users identified by a set of ids.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using favorites_on_users endpointstack_users.favorites_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the comments that mention one of the users identified by a set of ids.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using mentions_on_users endpointstack_users.mentions_on_users(user_ids, users_options, (response) => {console.log(response);});
Gets a user's activity across the Stack Exchange network.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using users_network_activity endpointstack_users.users_network_activity(user_ids, users_options, (response) => {console.log(response);});
Get a user's notifications.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using user_notifications endpointstack_users.user_notifications(user_ids, users_options, (response) => {console.log(response);});
Get a user's unread notifications.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using user_unread_notifications endpointstack_users.user_unread_notifications(user_ids, users_options, (response) => {console.log(response);});
Get all posts (questions and answers) owned by a set of users.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using posts_on_users endpointstack_users.posts_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the privileges the given user has on the site.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using privileges_on_users endpointstack_users.privileges_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the questions asked by the users identified by a set of ids.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using questions_on_users endpointstack_users.questions_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the questions on which a set of users, have active bounties.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using featured_questions_on_users endpointstack_users.featured_questions_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the questions asked by a set of users, which have no answers.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using no_answer_questions_on_users endpointstack_users.no_answer_questions_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the questions asked by a set of users, which have at least one answer but no accepted answer.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using unaccepted_questions_on_users endpointstack_users.unaccepted_questions_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the questions asked by a set of users, which are not considered to be adequately answered.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using unanswered_questions_on_users endpointstack_users.unanswered_questions_on_users(user_ids, users_options, (response) => {console.log(response);});
Get a subset of the reputation changes experienced by the users identified by a set of ids.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using reputation_on_users endpointstack_users.reputation_on_users(user_ids, users_options, (response) => {console.log(response);});
Get a history of a user's reputation, excluding private events.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using reputation_history endpointstack_users.reputation_history(user_ids, users_options, (response) => {console.log(response);});
Get a full history of a user's reputation. auth required
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using full_reputation_history endpointstack_users.full_reputation_history(user_ids, users_options, (response) => {console.log(response);});
Get the tags that the users (identified by a set of ids) have been active in.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using tags_on_users endpointstack_users.tags_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the suggested edits provided by users identified by a set of ids.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using suggested_edits_on_users endpointstack_users.suggested_edits_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the top answers a user has posted on questions with a set of tags.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";//user tagslet tags = "nodejs";// using top_user_answers_in_tags endpointstack_users.top_user_answers_in_tags(user_ids, tags, users_options, (response) => {console.log(response);});
Get the top questions a user has posted with a set of tags.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";//user tagslet tags = "nodejs";// using top_user_questions_in_tags endpointstack_users.top_user_questions_in_tags(user_ids, tags, users_options, (response) => {console.log(response);});
Get a subset of the actions of that have been taken by the users identified by a set of ids.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using timeline_on_users endpointstack_users.timeline_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the top tags (by score) a single user has posted answers in.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using top_answer_tags_on_users endpointstack_users.top_answer_tags_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the top tags (by score) a single user has posted in.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using top_tags_on_users endpointstack_users.top_tags_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the top tags (by score) a single user has asked questions in.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using top_question_tags_on_users endpointstack_users.top_question_tags_on_users(user_ids, users_options, (response) => {console.log(response);});
Get the users who have moderation powers on the site.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// using moderators endpointstack_users.moderators(users_options, (response) => {console.log(response);});
Get the users who are active moderators who have also won a moderator election.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// using elected_moderators endpointstack_users.elected_moderators(users_options, (response) => {console.log(response);});
Get a user's inbox. auth required
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using user_inbox endpointstack_users.user_inbox(user_ids, users_options, (response) => {console.log(response);});
Get the unread items in a user's inbox. auth required
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using user_unread_inbox endpointstack_users.user_unread_inbox(user_ids, users_options, (response) => {console.log(response);});
Get a user's associated accounts.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using associated_users endpointstack_users.associated_users(user_ids, users_options, (response) => {console.log(response);});
Get the merges a user's accounts has undergone.
//options for userslet users_options = {"key": "your_key","access_token": "your_token"}// id of the userlet user_ids = "6414102";// using merge_history endpointstack_users.merge_history(user_ids, users_options, (response) => {console.log(response);});