Got code working again after failed experiment with github api.