refactor and add separate JSON fetching function
refactor and add separate JSON fetching function

this is so we can uniformly analyze what goes on and react to rate limit and spam detection.
sebbASF/infrastructure-puppet,sebbASF/infrastructure-puppet,sebbASF/infrastructure-puppet,sebbASF/infrastructure-puppet,sebbASF/infrastructure-puppet,apache/infrastructure-puppet,apache/infrastructure-puppet,apache/infrastructure-puppet,apache/infrastructure-puppet,sebbASF/infrastructure-puppet,sebbASF/infrastructure-puppet,sebbASF/infrastructure-puppet,apache/infrastructure-puppet,apache/infrastructure-puppet,apache/infrastructure-puppet