Toggle navigation
Toggle navigation
This project
Loading...
Sign in
윤창신
/
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:33:41 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
76a9e64df01a67d82171b88bfcf9e4669853c355
76a9e64d
1 parent
922b86e4
add spelling check api
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
api/apiRequest.js
api/apiRequest.js
View file @
76a9e64
...
...
@@ -46,4 +46,22 @@ apiRequest.ETRI = async ( query, argument ) => {
})
}
/**
* @param {String} text 고치고 싶은 문장
* @returns {Object} 정해진 형식의 응답을 보내줍니다.
* @description 네이버 맞춤법 사이트로 text를 보내서 응답을 받아옵니다.
*/
apiRequest
.
Korean
=
async
(
text
)
=>
{
return
new
Promise
(
(
resolve
,
reject
)
=>
{
rp
(
{
"uri"
:
URL
.
Korean
+
encodeURI
(
text
)
}
)
.
then
(
(
body
)
=>
{
body
=
body
.
substring
(
1
,
body
.
length
-
2
);
resolve
(
JSON
.
parse
(
body
).
message
.
result
);
})
.
catch
(
(
err
)
=>
{
throw
new
Error
(
err
);
});
});
}
module
.
exports
=
apiRequest
;
...
...
Please
register
or
login
to post a comment