npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

linkview-node-sdk

v0.5.0

Published

Official Node.js SDK for interacting with Linkview's image translation API

Readme

LinkView SDK for Node.js

LinkView SDK는 이미지에서 텍스트를 추출하고 번역하는 API 서비스인 LinkView의 공식 Node.js SDK입니다. 이 SDK를 사용하면 간단한 API 호출로 이미지 속 텍스트를 번역할 수 있습니다.

설치

# npm 사용
npm install linkview-node-sdk

# yarn 사용
yarn add linkview-node-sdk

요구사항

Node.js 18.0.0 이상 API 키 (LinkView 계정 필요)

시작하기

API 키 설정

API 키 설정 LinkView SDK를 사용하기 위해서는 API 키가 필요합니다. API 키는 LinkView 대시보드에서 발급받을 수 있습니다. .env 파일에 API 키를 설정하거나 코드에서 직접 API 키를 설정할 수 있습니다.

기본 사용법

import { linkview } from 'linkview-node-sdk';
import dotenv from 'dotenv';

// .env 파일 로드
dotenv.config();

// API 키로 클라이언트 초기화
const client = linkview(process.env.API_KEY);

주요 기능

LinkView SDK는 다양한 방식으로 이미지를 번역할 수 있습니다:

1. 파일로 이미지 업로드

로컬 파일 시스템에 있는 이미지 파일을 업로드하여 번역합니다.

import path from 'path';
import { linkview } from 'linkview-node-sdk';

const client = linkview(process.env.API_KEY);

// 이미지 파일 경로
const imagePath = path.join(__dirname, './image.png');

// 파일 업로드 및 번역
async function translateImage() {
  try {
    const result = await client.uploadByFile(imagePath);
    console.log('번역 결과:', result.data.translatedText);
  } catch (error) {
    console.error('번역 오류:', error);
  }
}

translateImage();

2. URL로 이미지 업로드

인터넷에 호스팅된 이미지 URL로 번역합니다.

import { linkview } from 'linkview-node-sdk';

const client = linkview(process.env.API_KEY);

// 이미지 URL
const imageUrl = 'https://example.com/image.jpg';

// URL로 이미지 번역
async function translateImageFromUrl() {
  try {
    const result = await client.uploadByUrl(imageUrl);
    console.log('번역 결과:', result.data.translatedText);
  } catch (error) {
    console.error('번역 오류:', error);
  }
}

translateImageFromUrl();

3. Base64로 이미지 업로드

Base64로 인코딩된 이미지 데이터로 번역합니다.

import { linkview } from 'linkview-node-sdk';

const client = linkview(process.env.API_KEY);

// Base64 인코딩된 이미지 데이터
const base64Image = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==';

// Base64 이미지 번역
async function translateBase64Image() {
  try {
    const result = await client.uploadByBase64(base64Image);
    console.log('번역 결과:', result.data.translatedText);
  } catch (error) {
    console.error('번역 오류:', error);
  }
}

translateBase64Image();

API 응답 형식

LinkView API의 응답은 다음과 같은 형식을 가집니다

interface ApiResponse<T> {
  code: number;            // 응답 코드
  timestamp: string;       // 응답 시간
  path: string;            // 요청 경로
  method: string;          // HTTP 메소드
  exceptionErrMessage: string; // 오류 메시지 (있을 경우)
  message: string;         // 응답 메시지
  data: T;                 // 응답 데이터
}

// 이미지 번역 응답에서 data의 형식
interface UploadData {
  translatedText: string;  // 번역된 텍스트
}

개발 환경 설정

LinkView SDK 개발 및 테스트를 위한 환경을 설정하는 방법입니다.

테스트 실행

라이선스

이 프로젝트는 MIT 라이선스를 따릅니다. 자세한 내용은 LICENSE 파일을 참조하세요.

문의 및 지원

이슈 등록: GitHub Issues 이메일: 웹사이트: