diff --git a/README.md b/README.md index e97c7c0..403436e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,111 @@ +
+

Korcen.api

+ + [![Go Version](https://github.com/fluffy-melli/korcen-go/blob/main/docs/asset/go_version.svg)](https://go.dev/) + [![Module Version](https://github.com/fluffy-melli/korcen-go/blob/main/docs/asset/module_version.svg)](https://pkg.go.dev/github.com/fluffy-melli/korcen-go) +
+ +![131_20220604170616](https://user-images.githubusercontent.com/85154556/171998341-9a7439c8-122f-4a9f-beb6-0e0b3aad05ed.png) + +# πŸ›  μ œμž‘μž + +>[Tanat05](https://github.com/Tanat05) / [korcen](https://github.com/Tanat05/korcen) +``` +https://github.com/Tanat05/korcen +--------------------------------- +이 ν”„λ‘œμ νŠΈλŠ” 원본 `korcen` ν”„λ‘œμ νŠΈλ₯Ό μˆ˜μ •ν•˜μ—¬ λ°°ν¬ν•œ κ²ƒμž…λ‹ˆλ‹€. +원본 ν”„λ‘œμ νŠΈλŠ” `https://github.com/Tanat05/korcen`μ—μ„œ 확인할 수 μžˆμŠ΅λ‹ˆλ‹€. + +이 ν”„λ‘œμ νŠΈμ˜ λΌμ΄μ„ΌμŠ€ λ˜ν•œ Apache-2.0 을 λ”°λ₯΄κ³  μžˆμŠ΅λ‹ˆλ‹€ +``` + +>[gyarang](https://github.com/gyarang) / [gohangul](https://github.com/gyarang/gohangul) +``` +https://github.com/gyarang/gohangul +----------------------------------- +이 ν”„λ‘œμ νŠΈλŠ” `gohangul` 을 μ‚¬μš©ν•΄μ„œ λ°°ν¬ν•œ κ²ƒμž…λ‹ˆλ‹€. +ν•΄λ‹Ή ν”„λ‘œμ νŠΈλŠ” `https://github.com/gyarang/gohangul`μ—μ„œ 확인할 수 μžˆμŠ΅λ‹ˆλ‹€. + +ν•΄λ‹Ή ν”„λ‘œμ νŠΈμ˜ λΌμ΄μ„ΌμŠ€μΈ MIT License λ˜ν•œ λ”°λ₯΄κ³  μžˆμŠ΅λ‹ˆλ‹€ +``` + +>[Feralthedogg](https://github.com/Feralthedogg) +``` +https://github.com/Feralthedogg +------------------------------- +같이 API ν”„λ‘œμ νŠΈλ₯Ό κ΅¬ν˜„ν•œ μ œμž‘μž μž…λ‹ˆλ‹€ +``` + +![Apache-2.0](https://github.com/fluffy-melli/korcen-go/blob/main/docs/asset/Apache-2.0.png) + +`korcen-api`λŠ” `Apache-2.0` & `MIT License` λΌμ΄μ„ μŠ€λ₯Ό `λͺ¨λ‘` λ”°λ₯΄κ³  μžˆμŠ΅λ‹ˆλ‹€. +μ½”λ“œλ₯Ό μ‚¬μš©ν•  경우 λΌμ΄μ„ μŠ€ λ‚΄μš©μ„ μ€€μˆ˜ν•΄μ£Όμ„Έμš”. + +CopyrightΒ© All rights reserved. + +--- + +# ❓ μ½”λ“œ 예제 + +>python +```py +import requests + +url = 'https://korcen.shibadogs.net/api/v1/korcen' + +headers = { + 'accept': 'application/json', + 'Content-Type': 'application/json' +} + +data = { + 'input' : 'μš•μ„€μ΄ ν¬ν•¨λ μˆ˜ μžˆλŠ” λ©”μ‹œμ§€', + 'replace-front': 'κ°μ§€λœ μš•μ„€ μ•žλΆ€λΆ„μ— 넣을 λ©”μ‹œμ§€ (μ˜΅μ…˜)', + 'replace-end' : 'κ°μ§€λœ μš•μ„€ 뒷뢀뢄에 넣을 λ©”μ‹œμ§€ (μ˜΅μ…˜)' +} + +response = requests.post(url, headers=headers, json=data) + +print(response.status_code) +print(response.text) +``` + +>javascript +```js +const url = 'https://korcen.shibadogs.net/api/v1/korcen' + +const headers = { + 'accept': 'application/json', + 'Content-Type': 'application/json' +} + +const data = { + input: 'μš•μ„€μ΄ ν¬ν•¨λ μˆ˜ μžˆλŠ” λ©”μ‹œμ§€', + 'replace-front': 'κ°μ§€λœ μš•μ„€ μ•žλΆ€λΆ„μ— 넣을 λ©”μ‹œμ§€ (μ˜΅μ…˜)', + 'replace-end': 'κ°μ§€λœ μš•μ„€ 뒷뢀뢄에 넣을 λ©”μ‹œμ§€ (μ˜΅μ…˜)' +} + +fetch(url, { + method: 'POST', + headers: headers, + body: JSON.stringify(data) +}) +.then(response => { + console.log(response.status) + return response.json() +}) +.then(data => { + console.log(data) +}) +.catch(error => { + console.error('Error:', error) +}) +``` + +# ⬇️ μ„€μΉ˜ 방법 + >docker ```sh -docker build -t korcen-api . -docker run -d -p 7777:7777 korcen-api +$ docker build -t korcen-api . +$ docker run -d -p 7777:7777 korcen-api ```