Unofficial packages provide easy way to use Naver APIs that do not require login written in Dart language.
These packages aren't endorsed by Naver and don't reflect the views or opinions of Naver or anyone officially involved in producing or managing Naver properties.
-
Naver Papago API
- Translation
- Language detection
- Romanization
-
Naver Clova face recognition API
- Celebrity recognition
- Face recognition
Added more soon
Here is what you need to use the Dart SDK:
- Dart 2.19.0 or higher
First, generate Naver client id and client secret.
Initialize NaverWithoutLoginApi
with your API key.
NaverWithoutLoginApi.init(clientId: clientId, clientSecret: clientSecret)
Use APIname.queryFunction
form to call query function.
You can check available API.
/// Translate Korean to English
///
/// Returns PapagoResponseMessage
final result = await PapagoTranslation.getTranslation(LangCode.ko, LangCode.en, "안녕하세요");
print(result.getText); // Print Hello
/// Detect language code
///
/// Returns LanguageDetectionResponse
final result = await LanguageDetection.detectLanguage("안녕하세요");
print(result.langCode); // Print LangCode.ko
/// Name romanization
///
/// Returns RomanizationResponse
final result = await Romanization.romanization("강형욱");
/// Recognize celebrity with given Uint8List image.
///
/// Returns CelebrityResponse
final result = await CelebrityRecognition.recognizeCelebrity(await io.File('your-image-path').readAsBytes())
print(result.runtimeType); // Print CelebrityResponse
/// Recognize face with given Uint8List image.
///
/// Returns FaceResponse
final result = await FaceRecognition.recognizeFace(await io.File('your-image-path').readAsBytes());
print(result.runtimeType); // Print FaceResponse