Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bluejoyq
/
searchGuide
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김서영
2019-11-22 21:34:54 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
587821c5d1746080b4c873b9a946c5510fa031f7
587821c5
1 parent
76a9e64d
add Korean api url
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
api/apiRequest.js
api/apiRequest.js
View file @
587821c
...
...
@@ -13,6 +13,7 @@ const rp = require("request-promise");
// Api URL
const
URL
=
{
"ETRI"
:
"http://aiopen.etri.re.kr:8000/"
,
"Korean"
:
"https://search.naver.com/p/csearch/ocontent/util/SpellerProxy?_callback=&color_blindness=0&q="
}
// ETRI Api Request Format
...
...
@@ -53,6 +54,7 @@ apiRequest.ETRI = async ( query, argument ) => {
*/
apiRequest
.
Korean
=
async
(
text
)
=>
{
return
new
Promise
(
(
resolve
,
reject
)
=>
{
rp
(
{
"uri"
:
URL
.
Korean
+
encodeURI
(
text
)
}
)
.
then
(
(
body
)
=>
{
body
=
body
.
substring
(
1
,
body
.
length
-
2
);
...
...
Please
register
or
login
to post a comment