Implement rate-limiting

http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#rate-limiting
oh sorry, I missed that it's the Entity class.