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({
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
}, (err, response, body) => {
if (err) {
@ -148,7 +148,7 @@ CMarketItem.prototype.updatePriceForNonCommodity = function(currency, callback)
}
this._community.httpRequest({
uri: 'https://steamcommunity.com/market/listings/' +
url: 'https://steamcommunity.com/market/listings/' +
this._appid + '/' +
encodeURIComponent(this._hashName) +
'/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 = [];
const performSearch = () => {
this.httpRequest({
uri: 'https://steamcommunity.com/market/search/render/',
url: 'https://steamcommunity.com/market/search/render/',
qs: qs,
headers: {
referer: 'https://steamcommunity.com/market/search'

View File

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

View File

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

View File

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

View File

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