은승우

delete google-api app.js

Showing 1 changed file with 0 additions and 30 deletions
...@@ -70,36 +70,6 @@ const client = new line.Client(config); ...@@ -70,36 +70,6 @@ const client = new line.Client(config);
70 // register a webhook handler with middleware 70 // register a webhook handler with middleware
71 // about the middleware, please refer to doc 71 // about the middleware, please refer to doc
72 72
73 -// Creates a client
74 -/* google-api
75 -var vision = require('google-vision-api-client');
76 -
77 -var requtil = vision.requtil;
78 -
79 -
80 -
81 -//Prepare your service account from trust preview certificated project
82 -
83 -var jsonfile = '/home/ubuntu/a/LINEBOT/googlevisionapikey.json';
84 -
85 -
86 -
87 -//Initialize the api
88 -
89 -vision.init(jsonfile);
90 -
91 -//Build the request payloads
92 -var d = requtil.createRequests().addRequest(
93 -requtil.createRequest('/home/ubuntu/a/LINEBOT/photo/Fancy-TWICE.jpg')
94 -.withFeature('TEXT_DETECTION', 3)
95 -.build());
96 -//Do query to the api server
97 -vision.query(d, function(e, r, d){
98 -if(e) console.log('ERROR:', e);
99 - console.log(JSON.stringify(d));
100 -});
101 -
102 -*/
103 73
104 74
105 app.post('/webhook', line.middleware(config), (req, res) => { 75 app.post('/webhook', line.middleware(config), (req, res) => {
......