Toggle navigation
Toggle navigation
This project
Loading...
Sign in
조현아
/
LINEBOT
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
강수인
2018-12-08 16:55:25 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0ba42378027230d9e382307ac21190232a15018f
0ba42378
1 parent
030adc0c
papago api 를 위한 url과 key 등록
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
app.js
app.js
View file @
0ba4237
const
line
=
require
(
'@line/bot-sdk'
);
const
express
=
require
(
'express'
);
//papago api
var
request
=
require
(
'request'
);
//번역 api_url
var
translate_api_url
=
'https://openapi.naver.com/v1/papago/n2mt'
;
//언어감지 api_url
var
languagedetect_api_url
=
'https://openapi.naver.com/v1/papago/detectLangs'
// Naver Auth Key
//새로 발급받은 naver papago api id, pw 입력
var
client_id
=
'xZMx34y7uru1v8lywZ2d'
;
var
client_secret
=
'p6L7M7WsH9'
;
// create LINE SDK config from env variables
const
config
=
{
...
...
@@ -33,6 +46,7 @@ function handleEvent(event) {
return
Promise
.
resolve
(
null
);
}
// create a echoing text message
const
echo
=
{
type
:
'text'
,
text
:
event
.
message
.
text
};
...
...
Please
register
or
login
to post a comment