Last active
December 28, 2017 20:01
-
-
Save TaylorAckley/ad828d909abde418571e9a0ca8322403 to your computer and use it in GitHub Desktop.
Boilerplate SDK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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