comparison src/google.coffee @ 10:ccf1d9e741bd

corrected google apikey query, removed facebook query language
author Mathias Gebbe <mgebbe@intevation.de>
date Wed, 11 Jun 2014 23:43:28 +0200
parents 2123f355ab68
children a52b5b244e51
comparison
equal deleted inserted replaced
9:8363d4970c75 10:ccf1d9e741bd
20 20
21 config = Config.config 21 config = Config.config
22 22
23 bridgeid = config.bridgeid 23 bridgeid = config.bridgeid
24 interval = config.interval 24 interval = config.interval
25 API_KEY = config.gpAPI_KEY
26 CLIENTID = config.gpCLIENTID 25 CLIENTID = config.gpCLIENTID
27 CLIENTSECRET = config.gpCLIENTSECRET 26 CLIENTSECRET = config.gpCLIENTSECRET
28 27
29 ############### 28 ###############
30 # google sync # 29 # google sync #
133 else 132 else
134 token = user.oauth_token 133 token = user.oauth_token
135 options = 134 options =
136 host: "www.googleapis.com" 135 host: "www.googleapis.com"
137 port: 443 136 port: 443
138 path: "/plus/v1/people/me/people/visible?key=" + API_KEY + "&" 137 path: "/plus/v1/people/me/people/visible?key=" + CLIENTID + "&"
139 headers: 138 headers:
140 "Authorization": "Bearer " + token 139 "Authorization": "Bearer " + token
141 140
142 https.get(options, (res) -> 141 https.get(options, (res) ->
143 #console.log "Got response: " + res.statusCode 142 #console.log "Got response: " + res.statusCode
180 else 179 else
181 token = user.oauth_token 180 token = user.oauth_token
182 options = 181 options =
183 host: "www.googleapis.com" 182 host: "www.googleapis.com"
184 port: 443 183 port: 443
185 path: "/plus/v1/people/" + targetid + "/activities/public?maxResults="+max_results+"&key=" + API_KEY 184 path: "/plus/v1/people/" + targetid + "/activities/public?maxResults="+max_results+"&key=" + CLIENTID
186 headers: 185 headers:
187 "Authorization": "Bearer " + token 186 "Authorization": "Bearer " + token
188 187
189 https.get(options, (res) -> 188 https.get(options, (res) ->
190 #console.log "Got response: " + res.statusCode 189 #console.log "Got response: " + res.statusCode
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)