Skip to content

Commit

Permalink
restored namings
Browse files Browse the repository at this point in the history
  • Loading branch information
EliphasNUIT committed Jul 29, 2023
1 parent 541b3a3 commit 37c069e
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions GW2EIDPSReport/DPSReportController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ private static string GetGetUploadsURL(GetUploadsParameters parameters, string u
return GetURL(url, userToken);
}
///////////////// APIs
public static UploadObject UploadUsingEI(FileInfo fi, List<string> traces, string userToken, bool anonymous = false, bool detailedWvW = false)
public static DPSReportUploadObject UploadUsingEI(FileInfo fi, List<string> traces, string userToken, bool anonymous = false, bool detailedWvW = false)
{
return UploadToDPSR(fi, GetUploadContentURL(BaseUploadContentURL, userToken, anonymous, detailedWvW) + "&generator=ei", traces);
}

public static GetUploadsObject GetUploads(List<string> traces, string userToken, GetUploadsParameters parameters)
public static DPSReportGetUploadsObject GetUploads(List<string> traces, string userToken, GetUploadsParameters parameters)
{
return GetDPSReportResponse<GetUploadsObject>("GetUploads", GetGetUploadsURL(parameters, userToken), traces);
return GetDPSReportResponse<DPSReportGetUploadsObject>("GetUploads", GetGetUploadsURL(parameters, userToken), traces);
}
public static string GenerateUserToken(List<string> traces)
{
Expand All @@ -109,21 +109,21 @@ public static string GenerateUserToken(List<string> traces)
}
return "";
}
public static UploadObject GetUploadMetaDataWithID(string id, List<string> traces)
public static DPSReportUploadObject GetUploadMetaDataWithID(string id, List<string> traces)
{
if (id == null || id.Length == 0)
{
throw new InvalidDataException("Missing ID for GetUploadMetaData end point");
}
return GetDPSReportResponse<UploadObject>("GetUploadMetaDataWithID", BaseGetUploadMetadataURL + "id=" + id, traces);
return GetDPSReportResponse<DPSReportUploadObject>("GetUploadMetaDataWithID", BaseGetUploadMetadataURL + "id=" + id, traces);
}
public static UploadObject GetUploadMetaDataWithPermalink(string permalink, List<string> traces)
public static DPSReportUploadObject GetUploadMetaDataWithPermalink(string permalink, List<string> traces)
{
if (permalink == null || permalink.Length == 0)
{
throw new InvalidDataException("Missing Permalink for GetUploadMetaData end point");
}
return GetDPSReportResponse<UploadObject>("GetUploadMetaDataWithPermalink", BaseGetUploadMetadataURL + "permalink=" + permalink, traces);
return GetDPSReportResponse<DPSReportUploadObject>("GetUploadMetaDataWithPermalink", BaseGetUploadMetadataURL + "permalink=" + permalink, traces);
}

public static T GetJsonWithID<T>(string id, List<string> traces)
Expand Down Expand Up @@ -192,7 +192,7 @@ private static T GetDPSReportResponse<T>(string requestName, string URI, List<st
}
return default;
}
private static UploadObject UploadToDPSR(FileInfo fi, string URI, List<string> traces)
private static DPSReportUploadObject UploadToDPSR(FileInfo fi, string URI, List<string> traces)
{
string fileName = fi.Name;
byte[] fileContents = File.ReadAllBytes(fi.FullName);
Expand Down Expand Up @@ -228,7 +228,7 @@ private static UploadObject UploadToDPSR(FileInfo fi, string URI, List<string> t
{
Task<string> stringContentsTask = responseContent.ReadAsStringAsync();
string stringContents = stringContentsTask.Result;
UploadObject item = JsonConvert.DeserializeObject<UploadObject>(stringContents, new JsonSerializerSettings
DPSReportUploadObject item = JsonConvert.DeserializeObject<DPSReportUploadObject>(stringContents, new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore,
ContractResolver = DefaultJsonContractResolver,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace GW2EIDPSReport.DPSReportJsons
{
public class GetUploadsObject
public class DPSReportGetUploadsObject
{
[JsonProperty]
public int Pages { get; internal set; }
Expand All @@ -15,6 +15,6 @@ public class GetUploadsObject
[JsonProperty]
public string UserToken { get; internal set; }
[JsonProperty]
public UploadObject[] Uploads { get; internal set; }
public DPSReportUploadObject[] Uploads { get; internal set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace GW2EIDPSReport.DPSReportJsons
{
public class ReportObject
public class DPSReportObject
{
[JsonProperty]
public bool Anonymous { get; internal set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace GW2EIDPSReport.DPSReportJsons
{
public class UploadEncounterObject
public class DPSReportUploadEncounterObject
{
[JsonProperty]
public string UniqueId { get; internal set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace GW2EIDPSReport.DPSReportJsons
{
public class UploadEvtcObject
public class DPSReportUploadEvtcObject
{
[JsonProperty]
public string Type { get; internal set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace GW2EIDPSReport.DPSReportJsons
{
public class UploadObject
public class DPSReportUploadObject
{
[JsonProperty]
public string Id { get; internal set; }
Expand All @@ -30,13 +30,13 @@ public class UploadObject
[JsonProperty]
public string Error { get; internal set; }
[JsonProperty]
public UploadEncounterObject Encounter { get; internal set; }
public DPSReportUploadEncounterObject Encounter { get; internal set; }
[JsonProperty]
public UploadEvtcObject Evtc { get; internal set; }
public DPSReportUploadEvtcObject Evtc { get; internal set; }
[JsonProperty]
public Dictionary<string, UploadPlayerObject> Players { get; internal set; }
public Dictionary<string, DPSReportUploadPlayerObject> Players { get; internal set; }
[JsonProperty]
public ReportObject Report { get; internal set; }
public DPSReportObject Report { get; internal set; }
[JsonProperty]
public string TempApiId { get; internal set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace GW2EIDPSReport.DPSReportJsons
{
public class UploadPlayerObject
public class DPSReportUploadPlayerObject
{
[JsonProperty(PropertyName = "display_name")]
public string DisplayName { get; internal set; }
Expand Down
2 changes: 1 addition & 1 deletion GW2EIDPSReport/GW2EIDPSReport.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<PropertyGroup>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<Version>5.0.0</Version>
<Version>4.1.0</Version>
<Authors>EliphasNUIT</Authors>
<Company>GW2 Elite Insights</Company>
<Product>GW2 Elite Insights</Product>
Expand Down
2 changes: 1 addition & 1 deletion GW2EIParser/ProgramHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private static string[] UploadOperation(List<string> traces, FileInfo fInfo, Par
if (Properties.Settings.Default.UploadToDPSReports)
{
traces.Add("Uploading to DPSReport using EI");
UploadObject response = DPSReportController.UploadUsingEI(fInfo, traces, Properties.Settings.Default.DPSReportUserToken,
DPSReportUploadObject response = DPSReportController.UploadUsingEI(fInfo, traces, Properties.Settings.Default.DPSReportUserToken,
log.ParserSettings.AnonymousPlayers,
log.ParserSettings.DetailedWvWParse);
uploadresult[0] = response != null ? response.Permalink : "Upload process failed";
Expand Down

0 comments on commit 37c069e

Please sign in to comment.