Showing
1 changed file
with
2 additions
and
6 deletions
... | @@ -63,6 +63,7 @@ const client = new line.Client(config); | ... | @@ -63,6 +63,7 @@ const client = new line.Client(config); |
63 | // about the middleware, please refer to doc | 63 | // about the middleware, please refer to doc |
64 | 64 | ||
65 | // Creates a client | 65 | // Creates a client |
66 | +/* google-api | ||
66 | var vision = require('google-vision-api-client'); | 67 | var vision = require('google-vision-api-client'); |
67 | 68 | ||
68 | var requtil = vision.requtil; | 69 | var requtil = vision.requtil; |
... | @@ -79,8 +80,6 @@ var jsonfile = '/home/ubuntu/a/LINEBOT/googlevisionapikey.json'; | ... | @@ -79,8 +80,6 @@ var jsonfile = '/home/ubuntu/a/LINEBOT/googlevisionapikey.json'; |
79 | 80 | ||
80 | vision.init(jsonfile); | 81 | vision.init(jsonfile); |
81 | 82 | ||
82 | - | ||
83 | - | ||
84 | //Build the request payloads | 83 | //Build the request payloads |
85 | var d = requtil.createRequests().addRequest( | 84 | var d = requtil.createRequests().addRequest( |
86 | requtil.createRequest('/home/ubuntu/a/LINEBOT/photo/Fancy-TWICE.jpg') | 85 | requtil.createRequest('/home/ubuntu/a/LINEBOT/photo/Fancy-TWICE.jpg') |
... | @@ -92,9 +91,7 @@ if(e) console.log('ERROR:', e); | ... | @@ -92,9 +91,7 @@ if(e) console.log('ERROR:', e); |
92 | console.log(JSON.stringify(d)); | 91 | console.log(JSON.stringify(d)); |
93 | }); | 92 | }); |
94 | 93 | ||
95 | - | 94 | +*/ |
96 | - | ||
97 | - | ||
98 | 95 | ||
99 | 96 | ||
100 | app.post('/webhook', line.middleware(config), (req, res) => { | 97 | app.post('/webhook', line.middleware(config), (req, res) => { |
... | @@ -175,4 +172,3 @@ function handleEvent(event) { | ... | @@ -175,4 +172,3 @@ function handleEvent(event) { |
175 | 172 | ||
176 | }); | 173 | }); |
177 | } | 174 | } |
178 | - | ... | ... |
-
Please register or login to post a comment