ESPN's hidden API endpoints
Latest News: http://site.api.espn.com/apis/site/v2/sports/football/college-football/news
Latest Scores: http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard
| /** | |
| * Authenticator that attempts to refresh the client's access token. | |
| * In the event that a refresh fails and a new token can't be issued an error | |
| * is delivered to the caller. This authenticator blocks all requests while a token | |
| * refresh is being performed. In-flight requests that fail with a 401 are | |
| * automatically retried. | |
| */ | |
| class AccessTokenAuthenticator( | |
| private val tokenProvider: AccessTokenProvider | |
| ) : Authenticator { |
| //Utils - Declaration | |
| object PromptUtils { | |
| fun alertDialog(context: Context, @StyleRes style: Int, dialogBuilder: AlertDialog.Builder.() -> Unit): Dialog { | |
| val builder = AlertDialog.Builder(context, style).also { | |
| it.setCancelable(false) | |
| it.dialogBuilder() | |
| } | |
| return builder.create() | |
| } |
| class OrderCancellationComponent(private val context: Context, | |
| private val api: Api, | |
| private val orderNumber: String) { | |
| interface Callbacks { | |
| fun onOrderCancelledSuccessfully() | |
| fun onOrderCancellationFailed() | |
| } | |
| var callbacks: Callbacks? = null // Callbacks for communication with the parent component |
Latest News: http://site.api.espn.com/apis/site/v2/sports/football/college-football/news
Latest Scores: http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard
| import android.os.Bundle | |
| import android.support.v7.app.AppCompatActivity | |
| class SplashActivity: AppCompatActivity() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| // Make sure this is before calling super.onCreate | |
| setTheme(R.style.AppTheme) | |
| super.onCreate(savedInstanceState) |
| import android.annotation.SuppressLint | |
| import android.app.Activity | |
| import android.app.AlertDialog | |
| import android.content.Context | |
| import android.support.annotation.StringRes | |
| import android.support.v4.app.Fragment | |
| import android.view.LayoutInflater | |
| import android.view.View | |
| import android.widget.Button | |
| import android.widget.TextView |
| v.setOutlineProvider(ViewOutlineProvider.BOUNDS); | |
| v.setElevation(10.0); | |
| v.setTranslationZ(10.0); |
| package io.mercury.monkeybutt.webviewintercept; | |
| import android.annotation.TargetApi; | |
| import android.os.Build; | |
| import android.support.annotation.NonNull; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.os.Bundle; | |
| import android.webkit.WebResourceRequest; | |
| import android.webkit.WebResourceResponse; | |
| import android.webkit.WebView; |
| public class KeyboardSensitiveRelativeLayout extends RelativeLayout { | |
| private OnKeyboardShowHideListener listener; | |
| public KeyboardSensitiveRelativeLayout(Context context) { | |
| super(context); | |
| } | |
| public KeyboardSensitiveRelativeLayout(Context context, AttributeSet attrs) { | |
| super(context, attrs); |