Last active
April 10, 2022 07:32
-
-
Save codebutler/5763818 to your computer and use it in GitHub Desktop.
Crashlytics requires an IDE to "onboard" an Android app for no good reason. This prevents you from setting up a new app using a command line build tools such as Maven, Gradle or unsupported IDEs such as Android Studio. Turns out all you really need is your org's api key, which you can get using this script. Then just add this to your AndroidMani…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'httparty' | |
require 'json' | |
class Crashlytics | |
include HTTParty | |
base_uri 'https://api.crashlytics.com/api/v2' | |
def session(email, password) | |
self.class.post('/session.json', | |
body: {email: email, password:password}.to_json, | |
headers: { | |
'X-CRASHLYTICS-DEVELOPER-TOKEN' => 'ed8fc3dc68a7475cc970eb1e9c0cb6603b0a3ea2', | |
'Content-Type' => 'application/json' | |
} | |
) | |
end | |
end | |
c = Crashlytics.new | |
session = c.session('YOUR_EMAIL', 'YOUR_PASSWORD') | |
session['organizations'].each do |org| | |
puts org['name'] | |
puts org['api_key'] | |
puts | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks a lot! Even simpler with httpie: