Rename uri to url everywhere

This commit is contained in:
Alex Corn 2023-06-27 04:31:25 -04:00
parent c006526f69
commit 25dfa2cdd2
No known key found for this signature in database
GPG Key ID: E51989A3E7A27FDF
7 changed files with 38 additions and 38 deletions

View File

@ -105,7 +105,7 @@ CMarketItem.prototype.updatePriceForCommodity = function(currency, callback) {
} }
this._community.httpRequest({ this._community.httpRequest({
uri: 'https://steamcommunity.com/market/itemordershistogram?country=US&language=english&currency=' + currency + '&item_nameid=' + this.commodityID, url: 'https://steamcommunity.com/market/itemordershistogram?country=US&language=english&currency=' + currency + '&item_nameid=' + this.commodityID,
json: true json: true
}, (err, response, body) => { }, (err, response, body) => {
if (err) { if (err) {
@ -148,7 +148,7 @@ CMarketItem.prototype.updatePriceForNonCommodity = function(currency, callback)
} }
this._community.httpRequest({ this._community.httpRequest({
uri: 'https://steamcommunity.com/market/listings/' + url: 'https://steamcommunity.com/market/listings/' +
this._appid + '/' + this._appid + '/' +
encodeURIComponent(this._hashName) + encodeURIComponent(this._hashName) +
'/render/?query=&start=0&count=10&country=US&language=english&currency=' + currency, '/render/?query=&start=0&count=10&country=US&language=english&currency=' + currency,

View File

@ -32,7 +32,7 @@ SteamCommunity.prototype.marketSearch = function(options, callback) {
let results = []; let results = [];
const performSearch = () => { const performSearch = () => {
this.httpRequest({ this.httpRequest({
uri: 'https://steamcommunity.com/market/search/render/', url: 'https://steamcommunity.com/market/search/render/',
qs: qs, qs: qs,
headers: { headers: {
referer: 'https://steamcommunity.com/market/search' referer: 'https://steamcommunity.com/market/search'

View File

@ -76,7 +76,7 @@ SteamCommunity.prototype.joinGroup = function(gid, callback) {
} }
this.httpRequestPost({ this.httpRequestPost({
uri: `https://steamcommunity.com/gid/${gid.getSteamID64()}`, url: `https://steamcommunity.com/gid/${gid.getSteamID64()}`,
form: { form: {
action: 'join', action: 'join',
sessionID: this.getSessionID() sessionID: this.getSessionID()
@ -119,7 +119,7 @@ SteamCommunity.prototype.getAllGroupAnnouncements = function(gid, time, callback
} }
this.httpRequest({ this.httpRequest({
uri: `https://steamcommunity.com/gid/${gid.getSteamID64()}/rss/` url: `https://steamcommunity.com/gid/${gid.getSteamID64()}/rss/`
}, (err, response, body) => { }, (err, response, body) => {
if (err) { if (err) {
callback(err); callback(err);
@ -175,7 +175,7 @@ SteamCommunity.prototype.postGroupAnnouncement = function(gid, headline, content
} }
this.httpRequestPost({ this.httpRequestPost({
uri: `https://steamcommunity.com/gid/${gid.getSteamID64()}/announcements`, url: `https://steamcommunity.com/gid/${gid.getSteamID64()}/announcements`,
form form
}, (err, response, body) => { }, (err, response, body) => {
if (!callback) { if (!callback) {
@ -192,7 +192,7 @@ SteamCommunity.prototype.editGroupAnnouncement = function(gid, aid, headline, co
} }
let submitData = { let submitData = {
uri: `https://steamcommunity.com/gid/${gid.getSteamID64()}/announcements`, url: `https://steamcommunity.com/gid/${gid.getSteamID64()}/announcements`,
form: { form: {
sessionID: this.getSessionID(), sessionID: this.getSessionID(),
gid: aid, gid: aid,
@ -220,7 +220,7 @@ SteamCommunity.prototype.deleteGroupAnnouncement = function(gid, aid, callback)
} }
let submitData = { let submitData = {
uri: `https://steamcommunity.com/gid/${gid.getSteamID64()}/announcements/delete/${aid}?sessionID=${this.getSessionID()}` url: `https://steamcommunity.com/gid/${gid.getSteamID64()}/announcements/delete/${aid}?sessionID=${this.getSessionID()}`
}; };
this.httpRequestGet(submitData, (err, response, body) => { this.httpRequestGet(submitData, (err, response, body) => {
@ -284,7 +284,7 @@ SteamCommunity.prototype.scheduleGroupEvent = function(gid, name, type, descript
} }
this.httpRequestPost({ this.httpRequestPost({
uri: `https://steamcommunity.com/gid/${gid.toString()}/eventEdit`, url: `https://steamcommunity.com/gid/${gid.toString()}/eventEdit`,
form form
}, (err, response, body) => { }, (err, response, body) => {
if (!callback) { if (!callback) {
@ -348,7 +348,7 @@ SteamCommunity.prototype.editGroupEvent = function(gid, id, name, type, descript
} }
this.httpRequestPost({ this.httpRequestPost({
uri: `https://steamcommunity.com/gid/${gid.toString()}/eventEdit`, url: `https://steamcommunity.com/gid/${gid.toString()}/eventEdit`,
form form
}, (err, response, body) => { }, (err, response, body) => {
if (!callback) { if (!callback) {
@ -371,7 +371,7 @@ SteamCommunity.prototype.deleteGroupEvent = function(gid, id, callback) {
}; };
this.httpRequestPost({ this.httpRequestPost({
uri: `https://steamcommunity.com/gid/${gid.toString()}/eventEdit`, url: `https://steamcommunity.com/gid/${gid.toString()}/eventEdit`,
form form
}, (err, response, body) => { }, (err, response, body) => {
if (!callback) { if (!callback) {
@ -392,7 +392,7 @@ SteamCommunity.prototype.setGroupPlayerOfTheWeek = function(gid, steamID, callba
} }
this.httpRequestPost({ this.httpRequestPost({
uri: `https://steamcommunity.com/gid/${gid.getSteamID64()}/potwEdit`, url: `https://steamcommunity.com/gid/${gid.getSteamID64()}/potwEdit`,
form: { form: {
xml: 1, xml: 1,
action: 'potw', action: 'potw',
@ -434,7 +434,7 @@ SteamCommunity.prototype.kickGroupMember = function(gid, steamID, callback) {
} }
this.httpRequestPost({ this.httpRequestPost({
uri: `https://steamcommunity.com/gid/${gid.getSteamID64()}/membersManage`, url: `https://steamcommunity.com/gid/${gid.getSteamID64()}/membersManage`,
form: { form: {
sessionID: this.getSessionID(), sessionID: this.getSessionID(),
action: 'kick', action: 'kick',
@ -535,7 +535,7 @@ SteamCommunity.prototype.getAllGroupComments = function(gid, from, count, callba
} }
let options = { let options = {
uri: `https://steamcommunity.com/comment/Clan/render/${gid.getSteamID64()}/-1/`, url: `https://steamcommunity.com/comment/Clan/render/${gid.getSteamID64()}/-1/`,
form: { form: {
start: from, start: from,
count count
@ -582,7 +582,7 @@ SteamCommunity.prototype.deleteGroupComment = function(gid, cid, callback) {
} }
let options = { let options = {
uri: `https://steamcommunity.com/comment/Clan/delete/${gid.getSteamID64()}/-1/`, url: `https://steamcommunity.com/comment/Clan/delete/${gid.getSteamID64()}/-1/`,
form: { form: {
sessionid: this.getSessionID(), sessionid: this.getSessionID(),
gidcomment: cid gidcomment: cid
@ -604,7 +604,7 @@ SteamCommunity.prototype.postGroupComment = function(gid, message, callback) {
} }
let options = { let options = {
uri: `https://steamcommunity.com/comment/Clan/post/${gid.getSteamID64()}/-1/`, url: `https://steamcommunity.com/comment/Clan/post/${gid.getSteamID64()}/-1/`,
form: { form: {
comment: message, comment: message,
count: 6, count: 6,
@ -668,7 +668,7 @@ SteamCommunity.prototype.respondToGroupJoinRequests = function(gid, steamIDs, ap
let rgAccounts = (!Array.isArray(steamIDs) ? [steamIDs] : steamIDs).map(sid => sid.toString()); let rgAccounts = (!Array.isArray(steamIDs) ? [steamIDs] : steamIDs).map(sid => sid.toString());
this.httpRequestPost({ this.httpRequestPost({
uri: `https://steamcommunity.com/gid/${gid.getSteamID64()}/joinRequestsManage`, url: `https://steamcommunity.com/gid/${gid.getSteamID64()}/joinRequestsManage`,
form: { form: {
rgAccounts: rgAccounts, rgAccounts: rgAccounts,
bapprove: approve ? '1' : '0', bapprove: approve ? '1' : '0',
@ -703,7 +703,7 @@ SteamCommunity.prototype.respondToAllGroupJoinRequests = function(gid, approve,
} }
this.httpRequestPost({ this.httpRequestPost({
uri: `https://steamcommunity.com/gid/${gid.getSteamID64()}/joinRequestsManage`, url: `https://steamcommunity.com/gid/${gid.getSteamID64()}/joinRequestsManage`,
form: { form: {
bapprove: approve ? '1' : '0', bapprove: approve ? '1' : '0',
json: '1', json: '1',

View File

@ -221,7 +221,7 @@ SteamCommunity.prototype.createBoosterPack = function(appid, useUntradableGems,
} }
this.httpRequestPost({ this.httpRequestPost({
uri: 'https://steamcommunity.com/tradingcards/ajaxcreatebooster/', url: 'https://steamcommunity.com/tradingcards/ajaxcreatebooster/',
form: { form: {
sessionid: this.getSessionID(), sessionid: this.getSessionID(),
appid, appid,
@ -267,7 +267,7 @@ SteamCommunity.prototype.createBoosterPack = function(appid, useUntradableGems,
*/ */
SteamCommunity.prototype.getGiftDetails = function(giftID, callback) { SteamCommunity.prototype.getGiftDetails = function(giftID, callback) {
this.httpRequestPost({ this.httpRequestPost({
uri: `https://steamcommunity.com/gifts/${giftID}/validateunpack`, url: `https://steamcommunity.com/gifts/${giftID}/validateunpack`,
form: { form: {
sessionid: this.getSessionID() sessionid: this.getSessionID()
}, },
@ -303,7 +303,7 @@ SteamCommunity.prototype.getGiftDetails = function(giftID, callback) {
*/ */
SteamCommunity.prototype.redeemGift = function(giftID, callback) { SteamCommunity.prototype.redeemGift = function(giftID, callback) {
this.httpRequestPost({ this.httpRequestPost({
uri: `https://steamcommunity.com/gifts/${giftID}/unpack`, url: `https://steamcommunity.com/gifts/${giftID}/unpack`,
form: { form: {
sessionid: this.getSessionID() sessionid: this.getSessionID()
}, },

View File

@ -304,7 +304,7 @@ SteamCommunity.prototype.uploadAvatar = function(image, format, callback) {
} }
this.httpRequestPost({ this.httpRequestPost({
uri: 'https://steamcommunity.com/actions/FileUploader', url: 'https://steamcommunity.com/actions/FileUploader',
formData: { formData: {
MAX_FILE_SIZE: buffer.length, MAX_FILE_SIZE: buffer.length,
type: 'player_avatar_image', type: 'player_avatar_image',
@ -350,7 +350,7 @@ SteamCommunity.prototype.uploadAvatar = function(image, format, callback) {
doUpload(image); doUpload(image);
} else if (image.match(/^https?:\/\//)) { } else if (image.match(/^https?:\/\//)) {
this.httpRequestGet({ this.httpRequestGet({
uri: image, url: image,
encoding: null encoding: null
}, (err, response, body) => { }, (err, response, body) => {
if (err || response.statusCode != 200) { if (err || response.statusCode != 200) {

View File

@ -14,7 +14,7 @@ SteamCommunity.prototype.addFriend = function(userID, callback) {
} }
this.httpRequestPost({ this.httpRequestPost({
uri: 'https://steamcommunity.com/actions/AddFriendAjax', url: 'https://steamcommunity.com/actions/AddFriendAjax',
form: { form: {
accept_invite: 0, accept_invite: 0,
sessionID: this.getSessionID(), sessionID: this.getSessionID(),
@ -44,7 +44,7 @@ SteamCommunity.prototype.acceptFriendRequest = function(userID, callback) {
} }
this.httpRequestPost({ this.httpRequestPost({
uri: 'https://steamcommunity.com/actions/AddFriendAjax', url: 'https://steamcommunity.com/actions/AddFriendAjax',
form: { form: {
accept_invite: 1, accept_invite: 1,
sessionID: this.getSessionID(), sessionID: this.getSessionID(),
@ -65,7 +65,7 @@ SteamCommunity.prototype.removeFriend = function(userID, callback) {
} }
this.httpRequestPost({ this.httpRequestPost({
uri: 'https://steamcommunity.com/actions/RemoveFriendAjax', url: 'https://steamcommunity.com/actions/RemoveFriendAjax',
form: { form: {
sessionID: this.getSessionID(), sessionID: this.getSessionID(),
steamid: userID.toString() steamid: userID.toString()
@ -85,7 +85,7 @@ SteamCommunity.prototype.blockCommunication = function(userID, callback) {
} }
this.httpRequestPost({ this.httpRequestPost({
uri: 'https://steamcommunity.com/actions/BlockUserAjax', url: 'https://steamcommunity.com/actions/BlockUserAjax',
form: { form: {
sessionID: this.getSessionID(), sessionID: this.getSessionID(),
steamid: userID.toString() steamid: userID.toString()
@ -127,7 +127,7 @@ SteamCommunity.prototype.postUserComment = function(userID, message, callback) {
} }
this.httpRequestPost({ this.httpRequestPost({
uri: `https://steamcommunity.com/comment/Profile/post/${userID.toString()}/-1`, url: `https://steamcommunity.com/comment/Profile/post/${userID.toString()}/-1`,
form: { form: {
comment: message, comment: message,
count: 1, count: 1,
@ -163,7 +163,7 @@ SteamCommunity.prototype.deleteUserComment = function(userID, commentID, callbac
} }
this.httpRequestPost({ this.httpRequestPost({
uri: `https://steamcommunity.com/comment/Profile/delete/${userID.toString()}/-1`, url: `https://steamcommunity.com/comment/Profile/delete/${userID.toString()}/-1`,
form: { form: {
gidcomment: commentID, gidcomment: commentID,
start: 0, start: 0,
@ -212,7 +212,7 @@ SteamCommunity.prototype.getUserComments = function(userID, options, callback) {
}, options); }, options);
this.httpRequestPost({ this.httpRequestPost({
uri: `https://steamcommunity.com/comment/Profile/render/${userID.toString()}/-1`, url: `https://steamcommunity.com/comment/Profile/render/${userID.toString()}/-1`,
form, form,
json: true json: true
}, (err, response, body) => { }, (err, response, body) => {
@ -259,7 +259,7 @@ SteamCommunity.prototype.inviteUserToGroup = function(userID, groupID, callback)
} }
this.httpRequestPost({ this.httpRequestPost({
uri: 'https://steamcommunity.com/actions/GroupInvite', url: 'https://steamcommunity.com/actions/GroupInvite',
form: { form: {
group: groupID.toString(), group: groupID.toString(),
invitee: userID.toString(), invitee: userID.toString(),
@ -294,7 +294,7 @@ SteamCommunity.prototype.getUserAliases = function(userID, callback) {
} }
this.httpRequestGet({ this.httpRequestGet({
uri: `https://steamcommunity.com/profiles/${userID.getSteamID64()}/ajaxaliases`, url: `https://steamcommunity.com/profiles/${userID.getSteamID64()}/ajaxaliases`,
json: true json: true
}, (err, response, body) => { }, (err, response, body) => {
if (err) { if (err) {
@ -423,7 +423,7 @@ SteamCommunity.prototype.getUserInventory = function(userID, appID, contextID, t
const get = (inventory, currency, start) => { const get = (inventory, currency, start) => {
this.httpRequest({ this.httpRequest({
uri: `https://steamcommunity.com${endpoint}/inventory/json/${appID}/${contextID}`, url: `https://steamcommunity.com${endpoint}/inventory/json/${appID}/${contextID}`,
headers: { headers: {
Referer: `https://steamcommunity.com${endpoint}/inventory` Referer: `https://steamcommunity.com${endpoint}/inventory`
}, },
@ -516,7 +516,7 @@ SteamCommunity.prototype.getUserInventoryContents = function(userID, appID, cont
const get = (inventory, currency, start) => { const get = (inventory, currency, start) => {
this.httpRequest({ this.httpRequest({
uri: `https://steamcommunity.com/inventory/${userID.getSteamID64()}/${appID}/${contextID}`, url: `https://steamcommunity.com/inventory/${userID.getSteamID64()}/${appID}/${contextID}`,
headers: { headers: {
Referer: `https://steamcommunity.com/profiles/${userID.getSteamID64()}/inventory` Referer: `https://steamcommunity.com/profiles/${userID.getSteamID64()}/inventory`
}, },
@ -637,7 +637,7 @@ SteamCommunity.prototype.sendImageToUser = function(userID, imageContentsBuffer,
let filename = Date.now() + '_image.' + imageDetails.type; let filename = Date.now() + '_image.' + imageDetails.type;
this.httpRequestPost({ this.httpRequestPost({
uri: 'https://steamcommunity.com/chat/beginfileupload/?l=english', url: 'https://steamcommunity.com/chat/beginfileupload/?l=english',
headers: { headers: {
referer: 'https://steamcommunity.com/chat/' referer: 'https://steamcommunity.com/chat/'
}, },
@ -688,7 +688,7 @@ SteamCommunity.prototype.sendImageToUser = function(userID, imageContentsBuffer,
}); });
this.httpRequest({ this.httpRequest({
uri: uploadUrl, url: uploadUrl,
method: 'PUT', method: 'PUT',
headers, headers,
body: imageContentsBuffer body: imageContentsBuffer
@ -700,7 +700,7 @@ SteamCommunity.prototype.sendImageToUser = function(userID, imageContentsBuffer,
// Now we need to commit the upload // Now we need to commit the upload
this.httpRequestPost({ this.httpRequestPost({
uri: 'https://steamcommunity.com/chat/commitfileupload/', url: 'https://steamcommunity.com/chat/commitfileupload/',
headers: { headers: {
referer: 'https://steamcommunity.com/chat/' referer: 'https://steamcommunity.com/chat/'
}, },

View File

@ -156,7 +156,7 @@ SteamCommunity.prototype.getClientLogonToken = function(callback) {
return StdLib.Promises.callbackPromise(null, callback, false, async (resolve, reject) => { return StdLib.Promises.callbackPromise(null, callback, false, async (resolve, reject) => {
let {jsonBody} = await this.httpRequest({ let {jsonBody} = await this.httpRequest({
method: 'GET', method: 'GET',
uri: 'https://steamcommunity.com/chat/clientjstoken', url: 'https://steamcommunity.com/chat/clientjstoken',
source: 'steamcommunity' source: 'steamcommunity'
}); });