Skip to content

Instantly share code, notes, and snippets.

@IhsanMujdeci
Created October 9, 2019 22:31
Show Gist options
  • Save IhsanMujdeci/830d7a548e9c83ed2a18733d381c7d90 to your computer and use it in GitHub Desktop.
Save IhsanMujdeci/830d7a548e9c83ed2a18733d381c7d90 to your computer and use it in GitHub Desktop.
import request from 'request-promise'
class User{
emailUrl = "emailserver.com/api"
constructor(
private firstName: string,
private lastName: string,
private age: number,
private email: string,
){}
sendMotivationalEmail(){
return request(this.emailUrl, {email: this.email, body: `Hey ${this.firstName} ${this.lastName} u have lived ${this.age} beautiful years on this planet`})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment