Skip to content

Commit

Permalink
docs: Added best practices section to the posts documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Starciad committed Jul 22, 2023
1 parent de4a704 commit 5a1b2b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 6 additions & 1 deletion .github/docs/entities/posts.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ With this example, you can observe the amount of possibilities that are provided
## `4.` SEARCHING FOR POST OFFSET
As you develop and create new things, it might be interesting to go beyond 1000 posts, let's assume you want to request 2000 posts this time, how could you do that if the allowed limit is 1000? Simple, using **Search Offsets**.

Offsets is a simple way to fetch a bunch of posts beyond the established limit without incurring API overhead and in a simpler way to happen. You can define a chunk when instantiating the search, as in the example below:
Offsets is a simple way to fetch a bunch of posts beyond the established limit without incurring API overhead and in a simpler way to happen. You can define a offset when instantiating the search, as in the example below:

<br/>

Expand Down Expand Up @@ -198,3 +198,8 @@ foreach (R34Post post in filteredPosts)
It's important to note that downloading large files from the Rule34 API can take a significant amount of time and may also consume a lot of bandwidth. Therefore, it's recommended to have a stable and fast internet connection before attempting to download any large files.

Additionally, it's advisable to implement some sort of progress monitoring feature to let the user know the current status of the download process, and also to implement error handling mechanisms in case the download fails or gets interrupted.

## `6.` BEST PRACTICES
### `1.` Save all information in a cache.

It is essential to emphasize that all methods that receive information and return collections make requests to the Rule34 API. In this context, it is highly recommended to store the obtained values in any form of cache of your preference. By doing so, we avoid redundant requests and the waste of memory resources with lists containing a large number of elements that are automatically created by the system.
4 changes: 1 addition & 3 deletions src/R34Sharp.Tests/R34Sharp.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<IsPackable>false</IsPackable>
Expand All @@ -23,5 +22,4 @@
<ItemGroup>
<ProjectReference Include="..\R34Sharp\R34Sharp.csproj" />
</ItemGroup>

</Project>

0 comments on commit 5a1b2b7

Please sign in to comment.