이 기능은 inko 모듈을 사용하였습니다.

This function was used by the inko module.

출처 : https://npmjs.com/package/inko

✏️ 사용 예제

API는 모두 GET 메서드를 사용합니다

영어 타자 → 한글 타자

https://api.aramy.net/v1/en2ko?text={한글 타자로 변환할 문장}

입력: dkfkadl 결과: 아람이

NodeJS

// node-fetch
let text = 'dkfkadl qordlf cnrgkgkqslek';
const fetch = require('node-fetch')
fetch(`https://api.aramy.net/v1/en2ko?text=${encodeURI(text)}`)
    .then(res => res.json())
    .then(json => {
        console.log(json)
        console.log(`입력된 값 : ${json.origin}`);
        console.log(`한글 타자로 : ${json.result}`);
    });

// request
let text = 'dkfkadl qordlf cnrgkgkqslek'
let api_url = `https://api.aramy.net/v1/en2ko?text=${encodeURI(text)}`
const request = require('request');
let options = {
    url: api_url
}
request.get(options, function (error, response, body) {
    if (!error && response.statusCode == 200) {
        let json = JSON.parse(body)
        console.log(`입력된 값 : ${json.origin}`);
        console.log(`한글 타자로 : ${json.result}`);
    } else {
        console.log('error = ' + response.statusCode);
    }
});

Python

import requests

response = requests.get("<http://api.aramy.net/v1/en2ko?text=dldP>")
result = response.json()

if response.status_code == 200:
  print(result)
else:
  print(f"Error Code: {response.status_code}")

한글 발음 → 영어 발음

https://api.aramy.net/v1/ko2en?text={영어 타자로 변환할 문장}

입력: 안녕 결과: annyeong

NodeJS