Skip to content

Instantly share code, notes, and snippets.

@ddfreiling
Forked from creaoy/extract-testflight.js
Last active July 12, 2017 08:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddfreiling/a408904e6837387cd48c8a1c4d56e6fe to your computer and use it in GitHub Desktop.
Save ddfreiling/a408904e6837387cd48c8a1c4d56e6fe to your computer and use it in GitHub Desktop.
Extract TestFlight user email addresses from iTunes Connect
var http = angular.element(document.body).injector().get('$http');
var sectionScope = angular.element($('tbody').get(0)).scope()
http.get(sectionScope.apiCall + '?limit=10000').then((res) => {
console.log(`Received ${res.data.length} testers...`);
var text = '';
for (const tester of res.data) {
text += `${tester.firstName},${tester.lastName},${tester.email}\n`;
}
var a = document.createElement("a");
var file = new Blob([text], {type: 'text/csv'});
a.href = URL.createObjectURL(file);
a.download = `${sectionScope.id}.csv`;
a.click();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment