<commit_before>package buddybuild.com.ultron;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.squareup.moshi.Moshi;

import java.io.IOException;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.moshi.MoshiConverterFactory;

public class MainActivity extends AppCompatActivity {
    // TODO: 2017-04-25 Inject this, probably?
    private final Buddybuild service;

    public MainActivity() {
        Moshi moshi = new Moshi.Builder().build();

        Retrofit retrofit = new Retrofit.Builder()
                .baseUrl("https://api.buddybuild.com/v1/")
                .addConverterFactory(MoshiConverterFactory.create(moshi))
                .build();

        service = retrofit.create(Buddybuild.class);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);

        // TODO Store token securly
        Call<Build> buildCall = service.latestBuild("Bearer " + getString(R.string.buddybuild_token), "58ff5bab<PASSWORD>", "master");

        buildCall.enqueue(new Callback<Build>() {
            @Override
            public void onResponse(Call<Build> call, Response<Build> response) {
                System.out.println(call.request().url().toString());

                TextView number = (TextView) findViewById(R.id.build_number);<commit_msg>Cleanup<commit_after>package buddybuild.com.ultron;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.squareup.moshi.Moshi;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.moshi.MoshiConverterFactory;

public class MainActivity extends AppCompatActivity {
    // TODO: 2017-04-25 Inject this, probably?
    private final Buddybuild service;

    public MainActivity() {
        Retrofit retrofit = new Retrofit.Builder()
                .baseUrl("https://api.buddybuild.com/v1/")
                .addConverterFactory(MoshiConverterFactory.create())
                .build();

        service = retrofit.create(Buddybuild.class);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);

        Call<Build> buildCall = service.latestBuild("Bearer " + getString(R.string.buddybuild_token), "<PASSWORD>", "master");

        buildCall.enqueue(new Callback<Build>() {
            @Override
            public void onResponse(Call<Build> call, Response<Build> response) {
                System.out.println(call.request().url().toString());

                TextView number = (TextView) findViewById(R.id.build_number);
{'fraction_non_alphanumeric': 0.1086662153012864, 'fraction_numerical': 0.01117129316181449, 'mean_word_length': 3.288824383164006, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2557355', 'n_tokens_mistral': 871, 'n_tokens_neox': 817, 'n_words': 157}