Last active
April 15, 2017 18:41
-
-
Save Garvice/bb8c6f18394ad45bafc97acadb14c74b to your computer and use it in GitHub Desktop.
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
const SMARTSHEET_URL: string = 'https://api.smartsheet.com/2.0' | |
const SHEET_ID: number = 123456789; | |
const API_TOKEN: string = 'Bearer ' + 'API Token'; | |
getTodos(): Observable<Array<Todo>> { | |
let todos = this.http | |
.get(this.SMARTSHEET_URL + '/sheets/' + this.SHEET_ID, {headers: this.getHeaders()}) | |
.map(extractTodos); | |
return todos; | |
} | |
private getHeaders() : Headers { | |
let headers = new Headers(); | |
headers.append('Authorization', this.API_TOKEN ); | |
headers.append('Content-type', 'application/json'); | |
return headers; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment