I hereby claim:
- I am lpedrosa on github.
- I am lpedrosa (https://keybase.io/lpedrosa) on keybase.
- I have a public key ASBcqjtS8eilBUi8vsP9Qdq8MtG1QxQNG1DFQ_4I4IcbPwo
To claim this, I am signing this object:
@app.route('/show_balance', methods=['GET']) | |
def show_balance(): | |
if len(CLIENT_DATA) == 0: | |
return redirect(url_for('signin')) | |
# list all accounts | |
access_token = CLIENT_DATA['token']['access_token'] | |
auth_header = {'Authorization': f'Bearer {access_token}'} | |
res = requests.get('https://api.truelayer.com/data/v1/accounts', headers=auth_header) |
# extra imports | |
import requests | |
from flask import Flask, redirect, request, url_for | |
# we also need the client secret to retrieve the access token | |
CLIENT_SECRET = os.getenv('CLIENT_SECRET') | |
# do not do this is a real application! | |
CLIENT_DATA = {} |
import os | |
import time | |
import urllib | |
from flask import Flask | |
CLIENT_ID = os.getenv('CLIENT_ID') | |
REDIRECT_URI = os.getenv('REDIRECT_URI') | |
app = Flask(__name__) |
I hereby claim:
To claim this, I am signing this object:
private NexmoCallResponse unpackCallResponse(Map<String, Object> responseMap) throws NexmoVoiceException { | |
String callId = getOrThrow(responseMap, "call-id"); | |
String recipient = getOrThrow(responseMap, "to"); | |
CallStatus callStatus = getAsOptional(responseMap, "status") | |
.flatMap(this::convertToCallStatus) | |
.orElseThrow(() -> new NexmoVoiceException("Failed to unpack response: missing parameter status")); | |
String errorText = getOrThrow(responseMap, "error-text"); | |
return new NexmoCallResponse(callId, | |
recipient, |