Skip to content

Instantly share code, notes, and snippets.

View andredelgado's full-sized avatar

André Delgado andredelgado

  • Stratio
  • Coimbra, Portugal
View GitHub Profile
@lsurvila
lsurvila / DownloadFileWithRetrofit2RxJava.java
Last active December 22, 2021 15:36
Download file with Retrofit 2, OkHttp, Okio and RxJava
import com.squareup.okhttp.ResponseBody;
import okio.BufferedSink;
import okio.Okio;
import retrofit.Response;
import retrofit.http.GET;
import retrofit.http.Query;
import rx.Observable;
interface ApiService {
@brunomlopes
brunomlopes / cgd.py
Last active September 22, 2019 17:43
Simple api to fetch accounts, balances and transactions from Caixa Geral de Depósitos's ( CGD ) API used by their Windows 8 application.
# gist: https://gist.github.com/4397792
# Usage:
# session = cgd.CgdSession(uid, password)
# session.login()
# session.load_latest_transactions(account_key)
# 'session.known_accounts' is now populated with the initial accounts taken from the login response,
# and the data for the 'account_key' account.
# session.load_latest_transactions(account_key) loads the latest transactions and balances for a given account.