import requests

class Employee:
	"""A sample Employee class"""

	raise_amt = 1.05

	def __init__(self, first, last, pay):
		self.first = first
		self.last = last
		self.pay = pay


	@property
	def email(self):
		return '{}.{}@email.com'.format(self.first, self.last)

	@property
	def fullname(self):
		return '{} {}'.format(self.first, self.last)

	def apply_raise(self):
		self.pay = int(self.pay * self.raise_amt)

	#Use when accessing URL's and things that are out of your control
	#Want to be able to test that my call was correct but I don't want it to fail if for some reason the website is down
	def monthly_schedule(self, month):
		response = requests.get(f'http://company.com/{self.last}/{month}')
		if response.ok:
			return response.text
		else:
			return 'Bad Response!'