Skip to content

Commit fb8459c

Browse files
committed
document changes from PRs
1 parent a770aeb commit fb8459c

File tree

4 files changed

+53
-13
lines changed

4 files changed

+53
-13
lines changed

NetStone/Changelog.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 1.4.1
2+
### Behavioral changes
3+
- Exceptions from http requests are not caught and ignored anymore
4+
### Fixes
5+
- Fixed FC search parameter for recruiting
6+
### Contributors
7+
- Tawmy
18
## 1.4.0
29
### License
310
- Switched to MIT license

NetStone/LodestoneClient.cs

+14
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public static async Task<LodestoneClient> GetClientAsync(IGameDataProvider? game
9595
/// Get a character by its Lodestone ID.
9696
/// </summary>
9797
/// <param name="id">The ID of the character.</param>
98+
/// <exception cref="HttpRequestException"> The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.</exception>
9899
/// <returns><see cref="LodestoneCharacter"/> class containing information about the character.</returns>
99100
public async Task<LodestoneCharacter?> GetCharacter(string id) => await GetParsed($"/lodestone/character/{id}/",
100101
node => new LodestoneCharacter(this, node, this.Definitions, id));
@@ -104,6 +105,7 @@ public static async Task<LodestoneClient> GetClientAsync(IGameDataProvider? game
104105
/// You can also get this from the character directly by calling <see cref="LodestoneCharacter.GetClassJobInfo()"/>.
105106
/// </summary>
106107
/// <param name="id">The ID of the character.</param>
108+
/// <exception cref="HttpRequestException"> The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.</exception>
107109
/// <returns><see cref="CharacterClassJob"/> class containing information about the characters' classes and jobs.</returns>
108110
public async Task<CharacterClassJob?> GetCharacterClassJob(string id) => await GetParsed(
109111
$"/lodestone/character/{id}/class_job/", node => new CharacterClassJob(node, this.Definitions.ClassJob));
@@ -114,6 +116,7 @@ public static async Task<LodestoneClient> GetClientAsync(IGameDataProvider? game
114116
/// </summary>
115117
/// <param name="id">The ID of the character.</param>
116118
/// <param name="page">The number of the page that should be fetched.</param>
119+
/// <exception cref="HttpRequestException"> The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.</exception>
117120
/// <returns><see cref="CharacterAchievementPage"/> class containing information about the characters' achievements.</returns>
118121
public async Task<CharacterAchievementPage?> GetCharacterAchievement(string id, int page = 1) =>
119122
await GetParsed(
@@ -125,6 +128,7 @@ await GetParsed(
125128
/// You can also get this from the character directly by calling <see cref="LodestoneCharacter.GetMounts()"/>.
126129
/// </summary>
127130
/// <param name="id">The ID of the character.</param>
131+
/// <exception cref="HttpRequestException"> The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.</exception>
128132
/// <returns><see cref="CharacterCollectable"/> class containing information about the characters' mounts.</returns>
129133
public async Task<CharacterCollectable?> GetCharacterMount(string id) => await GetParsed(
130134
$"/lodestone/character/{id}/mount/",
@@ -136,6 +140,7 @@ await GetParsed(
136140
/// You can also get this from the character directly by calling <see cref="LodestoneCharacter.GetMinions()"/>.
137141
/// </summary>
138142
/// <param name="id">The ID of the character.</param>
143+
/// <exception cref="HttpRequestException"> The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.</exception>
139144
/// <returns><see cref="CharacterCollectable"/> class containing information about the characters' minions.</returns>
140145
public async Task<CharacterCollectable?> GetCharacterMinion(string id) => await GetParsed(
141146
$"/lodestone/character/{id}/minion/",
@@ -147,6 +152,7 @@ await GetParsed(
147152
/// </summary>
148153
/// <param name="query"><see cref="CharacterSearchQuery"/> object detailing search parameters</param>
149154
/// <param name="page">The page of search results to fetch.</param>
155+
/// <exception cref="HttpRequestException"> The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.</exception>
150156
/// <returns><see cref="CharacterSearchPage"/> containing search results.</returns>
151157
public async Task<CharacterSearchPage?> SearchCharacter(CharacterSearchQuery query, int page = 1) =>
152158
await GetParsed($"/lodestone/character/{query.BuildQueryString()}&page={page}",
@@ -160,6 +166,7 @@ await GetParsed($"/lodestone/character/{query.BuildQueryString()}&page={page}",
160166
/// </summary>
161167
/// <param name="id">The ID of the cross world linkshell.</param>
162168
/// <param name="page"></param>
169+
/// <exception cref="HttpRequestException"> The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.</exception>
163170
/// <returns><see cref="LodestoneCrossworldLinkshell"/> class containing information about the cross world link shell</returns>
164171
public async Task<LodestoneCrossworldLinkshell?> GetCrossworldLinkshell(string id, int page = 1) =>
165172
await GetParsed($"/lodestone/crossworld_linkshell/{id}?page={page}",
@@ -170,6 +177,7 @@ await GetParsed($"/lodestone/crossworld_linkshell/{id}?page={page}",
170177
/// </summary>
171178
/// <param name="query"><see cref="CharacterSearchQuery"/> object detailing search parameters</param>
172179
/// <param name="page">The page of search results to fetch.</param>
180+
/// <exception cref="HttpRequestException"> The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.</exception>
173181
/// <returns><see cref="CharacterSearchPage"/> containing search results.</returns>
174182
public async Task<CrossworldLinkshellSearchPage?> SearchCrossworldLinkshell(CrossworldLinkshellSearchQuery query, int page = 1) =>
175183
await GetParsed($"/lodestone/crossworld_linkshell/{query.BuildQueryString()}&page={page}",
@@ -180,6 +188,7 @@ await GetParsed($"/lodestone/crossworld_linkshell/{query.BuildQueryString()}&pag
180188
/// </summary>
181189
/// <param name="id">The ID of the linkshell.</param>
182190
/// <param name="page"></param>
191+
/// <exception cref="HttpRequestException"> The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.</exception>
183192
/// <returns><see cref="LodestoneCrossworldLinkshell"/> class containing information about the cross world link shell</returns>
184193
public async Task<LodestoneLinkshell?> GetLinkshell(string id, int page = 1) =>
185194
await GetParsed($"/lodestone/linkshell/{id}?page={page}",
@@ -190,6 +199,7 @@ await GetParsed($"/lodestone/linkshell/{id}?page={page}",
190199
/// </summary>
191200
/// <param name="query"><see cref="LinkshellSearchQuery"/> object detailing search parameters</param>
192201
/// <param name="page">The page of search results to fetch.</param>
202+
/// <exception cref="HttpRequestException"> The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.</exception>
193203
/// <returns><see cref="LinkshellSearchPage"/> containing search results.</returns>
194204
public async Task<LinkshellSearchPage?> SearchLinkshell(LinkshellSearchQuery query, int page = 1) =>
195205
await GetParsed($"/lodestone/linkshell/{query.BuildQueryString()}&page={page}",
@@ -203,6 +213,7 @@ await GetParsed($"/lodestone/linkshell/{query.BuildQueryString()}&page={page}",
203213
/// Get a character by its Lodestone ID.
204214
/// </summary>
205215
/// <param name="id">The ID of the character.</param>
216+
/// <exception cref="HttpRequestException"> The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.</exception>
206217
/// <returns><see cref="LodestoneFreeCompany"/> class containing information about the character.</returns>
207218
public async Task<LodestoneFreeCompany?> GetFreeCompany(string id) => await GetParsed(
208219
$"/lodestone/freecompany/{id}/", node => new LodestoneFreeCompany(this, node, this.Definitions, id));
@@ -212,6 +223,7 @@ await GetParsed($"/lodestone/linkshell/{query.BuildQueryString()}&page={page}",
212223
/// </summary>
213224
/// <param name="id">The ID of the free company.</param>
214225
/// <param name="page">The page of members to fetch.</param>
226+
/// <exception cref="HttpRequestException"> The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.</exception>
215227
/// <returns><see cref="FreeCompanyMembers"/> class containing information about FC members.</returns>
216228
public async Task<FreeCompanyMembers?> GetFreeCompanyMembers(string id, int page = 1) => await GetParsed(
217229
$"/lodestone/freecompany/{id}/member/?page={page}",
@@ -222,6 +234,7 @@ await GetParsed($"/lodestone/linkshell/{query.BuildQueryString()}&page={page}",
222234
/// </summary>
223235
/// <param name="query"><see cref="FreeCompanySearchPage"/> object detailing search parameters.</param>
224236
/// <param name="page">The page of search results to fetch.</param>
237+
/// <exception cref="HttpRequestException"> The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.</exception>
225238
/// <returns><see cref="FreeCompanySearchPage"/> containing search results.</returns>
226239
public async Task<FreeCompanySearchPage?> SearchFreeCompany(FreeCompanySearchQuery query, int page = 1) =>
227240
await GetParsed($"/lodestone/freecompany/{query.BuildQueryString()}&page={page}",
@@ -236,6 +249,7 @@ await GetParsed($"/lodestone/freecompany/{query.BuildQueryString()}&page={page}"
236249
/// <param name="url">The URL to fetch.</param>
237250
/// <param name="createParseable">Func creating the LodestoneParseable.</param>
238251
/// <param name="agent">The user agent to use for the request.</param>
252+
/// <exception cref="HttpRequestException"> The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout.</exception>
239253
/// <returns>The instantiated LodestoneParseable in case of success.</returns>
240254
private async Task<T?> GetParsed<T>(string url, Func<HtmlNode, T?> createParseable,
241255
UserAgent agent = UserAgent.Desktop) where T : LodestoneParseable

0 commit comments

Comments
 (0)