Skip to content

Instantly share code, notes, and snippets.

@TaylorAckley
Last active December 28, 2017 20:01
Show Gist options
  • Save TaylorAckley/ad828d909abde418571e9a0ca8322403 to your computer and use it in GitHub Desktop.
Save TaylorAckley/ad828d909abde418571e9a0ca8322403 to your computer and use it in GitHub Desktop.
Boilerplate SDK
// Super Class
class FooAPI {
static get(endpoint) {
// logic to get a token and send a GET request to the API
}
}
// Child Class (aka Module)
class Ping extends Foo {
static checkHealth() {
// Use the super keyword to call the parent FooAPI class get method.
super.get('api/posts')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment