InvenSticker.NET
0.4.0
dotnet add package InvenSticker.NET --version 0.4.0
NuGet\Install-Package InvenSticker.NET -Version 0.4.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="InvenSticker.NET" Version="0.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="InvenSticker.NET" Version="0.4.0" />
<PackageReference Include="InvenSticker.NET" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add InvenSticker.NET --version 0.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: InvenSticker.NET, 0.4.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package InvenSticker.NET@0.4.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=InvenSticker.NET&version=0.4.0
#tool nuget:?package=InvenSticker.NET&version=0.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
InvenSticker.NET
비공식 인벤 스티커 마켓(iMart) .NET 라이브러리
소개
InvenSticker.NET은 인벤 스티커 마켓의 스티커 패키지를 프로그래밍적으로 조회, 검색, 다운로드할 수 있는 .NET 라이브러리입니다.
⚠️ 주의: 이 라이브러리는 비공식이며, 인벤 사이트 구조 변경 시 동작하지 않을 수 있습니다. 과도한 자동 요청은 IP 차단의 원인이 될 수 있으니 주의하세요.
기능
- 🔍 키워드 검색 — 스티커명, 태그, 닉네임으로 검색
- 📋 스티커 목록 조회 — 최신순/판매순 정렬, 전체/무료/이벤트 필터링
- 🔍 태그 검색 — 해시태그 기반 스티커 패키지 검색
- 📦 패키지 상세 — 패키지 정보, 스티커 이미지 목록, 태그, 판매량 조회
- ⬇️ 이미지 다운로드 — 개별 스티커 또는 패키지 전체 일괄 다운로드
- ⚡ 병렬 다운로드 — 패키지 전체 다운로드 시 병렬 처리 + 진행 상태 콜백
설치
dotnet add package InvenSticker.NET
또는 NuGet Package Manager에서 InvenSticker.NET을 검색하세요.
사용법
기본 사용
using InvenSticker.NET;
using InvenSticker.NET.Models;
using var client = new InvenStickerClient();
// 최신 스티커 목록 조회
var list = await client.GetListAsync();
foreach (var package in list.Packages)
Console.WriteLine($"[{package.PackageId}] {package.Title} - {package.AuthorName}");
목록 조회 (필터/정렬)
// 무료 스티커만
var freeList = await client.GetListAsync(ListFilter.Free);
// 판매순 정렬
var salesList = await client.GetListAsync(sort: ListSort.Sales);
// 이벤트 스티커, 판매순, 2페이지
var eventList = await client.GetListAsync(
filter: ListFilter.Event,
sort: ListSort.Sales,
page: 2);
키워드 검색
// 스티커명으로 검색
var nameResult = await client.SearchAsync("도로롱", SearchType.Name);
// 태그로 검색
var tagResult = await client.SearchAsync("로스트아크", SearchType.Tag);
// 닉네임으로 검색
var nickResult = await client.SearchAsync("돚거", SearchType.NickName);
// 필터/정렬과 함께 검색
var filteredResult = await client.SearchAsync(
keyword: "고양이",
searchType: SearchType.Tag,
filter: ListFilter.Free,
sort: ListSort.Sales,
page: 1);
패키지 상세 조회
var detail = await client.GetDetailAsync(packageId: 1016);
Console.WriteLine($"제목: {detail.Title}");
Console.WriteLine($"제작자: {detail.AuthorName}");
Console.WriteLine($"판매량: {detail.SalesCount}개");
Console.WriteLine($"가격: {detail.PriceInfo}");
Console.WriteLine($"스티커 수: {detail.Images.Count}개");
Console.WriteLine($"태그: {string.Join(", ", detail.Tags)}");
스티커 다운로드
// 개별 스티커 다운로드 (byte[])
var image = detail.Images[0];
byte[] imageData = await client.DownloadImageAsync(image);
// 스트림으로 다운로드
using var stream = await client.DownloadImageStreamAsync(image);
패키지 전체 다운로드
var progress = new Progress<(int Completed, int Total)>(report =>
Console.WriteLine($"다운로드 중... {report.Completed}/{report.Total}"));
await client.DownloadPackageAsync(
packageId: 1016,
outputDirectory: @"C:\Downloads",
progress: progress);
다운로드 파일명 예측
InvenStickerFileNameHelper를 사용하면 다운로드 시 사용되는 파일명을 사전에 알 수 있습니다:
var detail = await client.GetDetailAsync(packageId: 1016);
for (int index = 0; index < detail.Images.Count; index++)
{
// DownloadPackageAsync에서 저장되는 파일명과 동일
string fileName = InvenStickerFileNameHelper.GetStickerFileName(detail.Images[index], index);
Console.WriteLine(fileName); // 예: "sticker_001.png"
}
// 파일명 안전 변환만 필요한 경우
string safeName = InvenStickerFileNameHelper.SanitizeFileName("잘못된/파일:명");
HttpClient 주입 (DI 패턴)
// IHttpClientFactory 패턴과 호환
var httpClient = httpClientFactory.CreateClient();
using var client = new InvenStickerClient(httpClient);
CancellationToken 지원
모든 비동기 메서드에서 CancellationToken을 지원합니다:
using var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30));
var result = await client.GetListAsync(cancellationToken: cancellationTokenSource.Token);
API 참조
IInvenStickerClient 인터페이스
| 메서드 | 설명 |
|---|---|
SearchAsync |
키워드 검색 (스티커명/태그/닉네임, 필터/정렬) |
GetListAsync |
스티커 목록 조회 (전체/무료/이벤트, 최신순/판매순) |
GetDetailAsync |
패키지 상세 정보 조회 |
DownloadImageAsync |
스티커 이미지 byte[] 다운로드 |
DownloadImageStreamAsync |
스티커 이미지 Stream 다운로드 |
DownloadPackageAsync |
패키지 전체 일괄 다운로드 |
유틸리티
| 클래스 | 메서드 | 설명 |
|---|---|---|
InvenStickerFileNameHelper |
SanitizeFileName |
파일명에 사용할 수 없는 문자를 제거 |
InvenStickerFileNameHelper |
GetStickerFileName |
스티커 다운로드 시 사용되는 파일명 반환 |
모델
| 클래스 | 설명 |
|---|---|
InvenStickerListResult |
목록 조회 결과 (패키지 목록 + 페이지네이션) |
InvenStickerPackageSummary |
패키지 요약 (목록 항목) |
InvenStickerPackageDetail |
패키지 상세 (이미지 목록 + 태그 포함) |
InvenStickerImage |
개별 스티커 이미지 정보 |
InvenStickerListFilter |
필터 유형 (All, Free, Event) |
InvenStickerListSort |
정렬 방식 (Recent, Sales) |
InvenStickerSearchType |
검색 유형 (Name, Tag, NickName) |
InvenStickerBadge |
배지 유형 (None, New, Free) |
요구 사항
- .NET Standard 2.0 호환 런타임 (.NET Framework 4.6.1+, .NET Core 2.0+, .NET 5+)
의존성
- AngleSharp — HTML 파싱
라이선스
MIT License
작성자
이호원
감사의 말
이 프로젝트는 GitHub Copilot의 도움을 받아 작성되었습니다.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- AngleSharp (>= 1.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.