Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ sed -i 's/IsRequired = true/IsRequired = false/g' src/VRChat.API/Model/CurrentUs
# Add RequiresTwoFactorAuth property to CurrentUser
sed -i '/public string UserIcon { get; set; }/a\\n /// <summary>\n /// An array of two-factor authentication methods available to use to with two factor authentication.\n /// </summary>\n [DataMember(Name = "requiresTwoFactorAuth", IsRequired = false, EmitDefaultValue = true)]\n public List<string> RequiresTwoFactorAuth { get; set; }' src/VRChat.API/Model/CurrentUser.cs

# Avoid percent-encoding for "(" and ")" characters in URI
sed -i 's/Uri.EscapeDataString(\([\.a-zA-Z _]*\))\([^\.]\)/Uri.EscapeDataString(\1).Replace("%28", "(").Replace("%29", ")")\2/g' src/VRChat.API/Client/WebRequestPathBuilder.cs

# Remove messily pasted markdown at top of every file
for i in src/VRChat.API/*/*.cs; do
sed -i '/VRChat API Banner/d' $i
Expand Down
4 changes: 2 additions & 2 deletions src/VRChat.API/Client/WebRequestPathBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void AddPathParameters(Dictionary<string, string> parameters)
{
foreach (var parameter in parameters)
{
_path = _path.Replace("{" + parameter.Key + "}", Uri.EscapeDataString(parameter.Value));
_path = _path.Replace("{" + parameter.Key + "}", Uri.EscapeDataString(parameter.Value).Replace("%28", "(").Replace("%29", ")"));
}
}

Expand All @@ -40,7 +40,7 @@ public void AddQueryParameters(Multimap<string, string> parameters)
{
foreach (var value in parameter.Value)
{
_query = _query + parameter.Key + "=" + Uri.EscapeDataString(value) + "&";
_query = _query + parameter.Key + "=" + Uri.EscapeDataString(value).Replace("%28", "(").Replace("%29", ")") + "&";
}
}
}
Expand Down