Skip to content

Commit

Permalink
Merge branch 'evexml' into evecrest
Browse files Browse the repository at this point in the history
  • Loading branch information
ezet committed Mar 23, 2016
2 parents 91d1e1f + 164e0b7 commit 3e50646
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
1 change: 0 additions & 1 deletion EveLib.EveXml/Corporation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,6 @@ public EveXmlResponse<OutpostList> GetOutpostList() {
/// </summary>
/// <returns></returns>
public Task<EveXmlResponse<OutpostList>> GetOutpostListAsync() {
// TODO Link to OutpostServiceDetails
const string relPath = "/corp/OutpostList.xml.aspx";
return requestAsync<OutpostList>(relPath, ApiKey);
}
Expand Down
1 change: 0 additions & 1 deletion EveLib.EveXml/Models/Character/SkillTraining.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ namespace eZet.EveLib.EveXmlModule.Models.Character {
[Serializable]
[XmlRoot("result", IsNullable = false)]
public class SkillTraining {
// TODO Convert zone
/// <summary>
/// Gets the current tq time.
/// </summary>
Expand Down
10 changes: 8 additions & 2 deletions EveLib.EveXml/RequestHandlers/EveXmlRequestHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,18 @@ public async Task<T> RequestAsync<T>(Uri uri) {
if (cached) return Serializer.Deserialize<T>(data);
if (CacheLevel == CacheLevel.CacheOnly) return default(T);
try {
data = await HttpRequestHelper.RequestAsync(uri).ConfigureAwait(false);
var response = await HttpRequestHelper.GetResponseAsync(HttpRequestHelper.CreateRequest(uri)).ConfigureAwait(false);
// special handling for status code 000, because we cannot fetch the response body
if (response.StatusCode.ToString() == "0") {
throw new EveXmlException("Kill log exhausted (You can only fetch kills that are less than a month old)", 119, new WebException("Unknown", null, WebExceptionStatus.UnknownError, response));
}
data = await HttpRequestHelper.GetResponseContentAsync(response);

}
catch (WebException e) {
_trace.TraceEvent(TraceEventType.Error, 0, "Http Request failed");
var response = (HttpWebResponse) e.Response;
if (response == null) throw;
if (response == null) throw new EveXmlException("Unknown", 0, e);
var responseStream = response.GetResponseStream();
if (responseStream == null) throw;
using (var reader = new StreamReader(responseStream)) {
Expand Down
1 change: 0 additions & 1 deletion EveLib.Tests/EveXml/CharacterKey_ValidKeyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ public async Task GetIndustryJobsHistory_NoErrors() {

[TestMethod]
public void GetKillLog() {
// BUG Returns 000 OK when exhausted
var res = _validKey.Characters[0].GetKillLog();
Assert.IsNotNull(res.Result);
}
Expand Down

0 comments on commit 3e50646

Please sign in to comment.