stackexchange-api
Version:
A Node.js wrapper for the StackExchange API
244 lines (243 loc) • 8.9 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fields = {
Answer: {
accepted: 'answer.accepted',
answerId: 'answer.answer_id',
awardedBountyAmount: 'answer.awarded_bounty_amount',
awardedBountyUsers: 'answer.awarded_bounty_users',
body: 'answer.body',
bodyMarkdown: 'answer.body_markdown',
canFlag: 'answer.can_flag',
commentCount: 'answer.comment_count',
comments: 'answer.comments',
communityOwnedDate: 'answer.community_owned_date',
creationDate: 'answer.creation_date',
downVoteCount: 'answer.down_vote_count',
downvoted: 'answer.downvoted',
isAccepted: 'answer.is_accepted',
lastActivityDate: 'answer.last_activity_date',
lastEditDate: 'answer.last_edit_date',
lastEditor: 'answer.last_editor',
link: 'answer.link',
lockedDate: 'answer.locked_date',
owner: 'answer.owner',
questionId: 'answer.question_id',
score: 'answer.score',
shareLink: 'answer.share_link',
tags: 'answer.tags',
title: 'answer.title',
upVoteCount: 'answer.up_vote_count',
upvoted: 'answer.upvoted',
},
Badge: {
awardCount: 'badge.award_count',
badgeId: 'badge.badge_id',
badgeType: 'badge.badge_type',
description: 'badge.description',
link: 'badge.link',
name: 'badge.name',
rank: 'badge.rank',
user: 'badge.user',
},
BadgeCount: {
bronze: 'badge_count.bronze',
gold: 'badge_count.gold',
silver: 'badge_count.silver',
},
ClosedDetails: {
byUsers: 'closed_details.by_users',
description: 'closed_details.description',
onHold: 'closed_details.on_hold',
originalQuestions: 'closed_details.original_questions',
reason: 'closed_details.reason',
},
Comment: {
body: 'comment.body',
bodyMarkdown: 'comment.body_markdown',
canFlag: 'comment.can_flag',
commentId: 'comment.comment_id',
creationDate: 'comment.creation_date',
edited: 'comment.edited',
link: 'comment.link',
owner: 'comment.owner',
postId: 'comment.post_id',
postType: 'comment.post_type',
replyToUser: 'comment.reply_to_user',
score: 'comment.score',
upvoted: 'comment.upvoted',
},
Filter: {
filter: 'filter.filter',
filterType: 'filter.filter_type',
includedFields: 'filter.included_fields',
},
Info: {
answersPerMinute: 'info.answers_per_minute',
apiRevision: 'info.api_revision',
badgesPerMinute: 'info.badges_per_minute',
newActiveUsers: 'info.new_active_users',
questionsPerMinute: 'info.questions_per_minute',
site: 'info.site',
totalAccepted: 'info.total_accepted',
totalAnswers: 'info.total_answers',
totalBadges: 'info.total_badges',
totalComments: 'info.total_comments',
totalQuestions: 'info.total_questions',
totalUnanswered: 'info.total_unanswered',
totalUsers: 'info.total_users',
totalVotes: 'info.total_votes',
},
MigrationInfo: {
onDate: 'migration_info.on_date',
otherSite: 'migration_info.other_site',
questionId: 'migration_info.question_id',
},
Notice: {
body: 'notice.body',
creationDate: 'notice.creation_date',
ownerUserId: 'notice.owner_user_id',
},
OriginalQuestion: {
acceptedAnswerId: 'original_question.accepted_answer_id',
answerCount: 'original_question.answer_count',
questionId: 'original_question.question_id',
title: 'original_question.title',
},
Post: {
body: 'post.body',
bodyMarkdown: 'post.body_markdown',
commentCount: 'post.comment_count',
comments: 'post.comments',
creationDate: 'post.creation_date',
downVoteCount: 'post.down_vote_count',
downvoted: 'post.downvoted',
lastActivityDate: 'post.last_activity_date',
lastEditDate: 'post.last_edit_date',
lastEditor: 'post.last_editor',
link: 'post.link',
owner: 'post.owner',
postId: 'post.post_id',
postType: 'post.post_type',
score: 'post.score',
shareLink: 'post.share_link',
title: 'post.title',
upVoteCount: 'post.up_vote_count',
upvoted: 'post.upvoted',
},
Privilege: {
description: 'privilege.description',
reputation: 'privilege.reputation',
shortDescription: 'privilege.short_description',
},
Question: {
acceptedAnswerId: 'question.accepted_answer_id',
answerCount: 'question.answer_count',
answers: 'question.answers',
body: 'question.body',
bodyMarkdown: 'question.body_markdown',
bountyAmount: 'question.bounty_amount',
bountyClosesDate: 'question.bounty_closes_date',
bountyUser: 'question.bounty_user',
canClose: 'question.can_close',
canFlag: 'question.can_flag',
closeVoteCount: 'question.close_vote_count',
closedDate: 'question.closed_date',
closedDetails: 'question.closed_details',
closedReason: 'question.closed_reason',
commentCount: 'question.comment_count',
comments: 'question.comments',
communityOwnedDate: 'question.community_owned_date',
creationDate: 'question.creation_date',
deleteVoteCount: 'question.delete_vote_count',
downVoteCount: 'question.down_vote_count',
downvoted: 'question.downvoted',
favoriteCount: 'question.favorite_count',
favorited: 'question.favorited',
isAnswered: 'question.is_answered',
lastActivityDate: 'question.last_activity_date',
lastEditDate: 'question.last_edit_date',
lastEditor: 'question.last_editor',
link: 'question.link',
lockedDate: 'question.locked_date',
migratedFrom: 'question.migrated_from',
migratedTo: 'question.migrated_to',
notice: 'question.notice',
owner: 'question.owner',
protectedDate: 'question.protected_date',
questionId: 'question.question_id',
reopenVoteCount: 'question.reopen_vote_count',
score: 'question.score',
shareLink: 'question.share_link',
tags: 'question.tags',
title: 'question.title',
upVoteCount: 'question.up_vote_count',
upvoted: 'question.upvoted',
viewCount: 'question.view_count',
},
RelatedSite: {
apiSiteParameter: 'related_site.api_site_parameter',
name: 'related_site.name',
relation: 'related_site.relation',
siteUrl: 'related_site.site_url',
},
ShallowUser: {
acceptRate: 'shallow_user.accept_rate',
badgeCounts: 'shallow_user.badge_counts',
displayName: 'shallow_user.display_name',
link: 'shallow_user.link',
profileImage: 'shallow_user.profile_image',
reputation: 'shallow_user.reputation',
userId: 'shallow_user.user_id',
userType: 'shallow_user.user_type',
},
Site: {
aliases: 'site.aliases',
apiSiteParameter: 'site.api_site_parameter',
audience: 'site.audience',
closedBetaDate: 'site.closed_beta_date',
faviconUrl: 'site.favicon_url',
highResolutionIconUrl: 'site.high_resolution_icon_url',
iconUrl: 'site.icon_url',
launchDate: 'site.launch_date',
logoUrl: 'site.logo_url',
markdownExtensions: 'site.markdown_extensions',
name: 'site.name',
openBetaDate: 'site.open_beta_date',
relatedSites: 'site.related_sites',
siteState: 'site.site_state',
siteType: 'site.site_type',
siteUrl: 'site.site_url',
styling: 'site.styling',
twitterAccount: 'site.twitter_account',
},
Styling: {
linkColor: 'styling.link_color',
tagBackgroundColor: 'styling.tag_background_color',
tagForegroundColor: 'styling.tag_foreground_color',
},
Tag: {
count: 'tag.count',
hasSynonyms: 'tag.has_synonyms',
isModeratorOnly: 'tag.is_moderator_only',
isRequired: 'tag.is_required',
lastActivityDate: 'tag.last_activity_date',
name: 'tag.name',
synonyms: 'tag.synonyms',
userId: 'tag.user_id',
},
Wrapper: {
backoff: '.backoff',
errorId: '.error_id',
errorMessage: '.error_message',
errorName: '.error_name',
hasMore: '.has_more',
items: '.items',
page: '.page',
pageSize: '.page_size',
quotaMax: '.quota_max',
quotaRemaining: '.quota_remaining',
total: '.total',
type: '.type',
},
};