{"action":"created","comment":{"url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/comments/39342776","id":39342776,"diff_hunk":"@@ -0,0 +1,508 @@\n+package me.quadphase.qpdex;\r\n+\r\n+import android.support.v7.app.ActionBarActivity;\r\n+import android.os.Bundle;\r\n+import android.view.Menu;\r\n+import android.view.MenuItem;\r\n+import android.widget.Spinner;\r\n+import android.content.Intent;\r\n+\r\n+import android.util.Log;\r\n+import android.view.View;\r\n+import android.widget.AdapterView;\r\n+import android.widget.ArrayAdapter;\r\n+import android.widget.EditText;\r\n+\r\n+\r\n+import java.util.ArrayList;\r\n+import java.util.Arrays;\r\n+\r\n+import me.quadphase.qpdex.databaseAccess.PokemonFactory;\r\n+import me.quadphase.qpdex.pokemon.Ability;\r\n+import me.quadphase.qpdex.pokemon.EggGroup;\r\n+import me.quadphase.qpdex.pokemon.MinimalPokemon;\r\n+import me.quadphase.qpdex.pokemon.Type;\r\n+\r\n+\r\n+/**\r\n+ * Created by Thinesh on 31-Aug-15\r\n+ *\r\n+ * Class deals with the advanced search feature accessed from main menu\r\n+ *\r\n+ * Can filter pokemon by\r\n+ *\r\n+ * Type 1\r\n+ * Type 2\r\n+ * Ability\r\n+ * Generation Available\r\n+ * Egg Groups 1\r\n+ * Egg Groups 2\r\n+ * TODO: All 6 Base stats\r\n+ * TODO: The ability to include/exclude Primal/Mega/Alternate Forms\r\n+ *\r\n+ */\r\n+\r\n+\r\n+public class AdvancedSearch extends ActionBarActivity {\r\n+\r\n+\r\n+    // pokemonFactory to access the various DB access functions\r\n+    PokemonFactory pokemonFactory;\r\n+\r\n+    // Pokemon information to filter\r\n+    MinimalPokemon[] allMinimalPokemon;\r\n+\r\n+    //Final Filtered List\r\n+    MinimalPokemon [] filteredMinimalPokemon;\r\n+    ArrayList<Integer> filteredNationalIds;\r\n+    ArrayList<Integer> filteredUniqueIds;\r\n+    //Contains either or\r\n+    ArrayList<Integer> currentFilterPokemonArrayList;\r\n+\r\n+    // Arrays to fill Spinners\r\n+    Type[] allTypes;\r\n+    Ability[] allAbilities;\r\n+    EggGroup[] allEggGroups;\r\n+    String allGenerations [];\r\n+\r\n+    // User Selections\r\n+    Type selectedType1;\r\n+    Type selectedType2;\r\n+    EggGroup selectedEggGroup1;\r\n+    EggGroup selectedEggGroup2;\r\n+    Ability selectedAbility;\r\n+    int selectedGeneration;\r\n+    int selectedHpLower;\r\n+    int selectedHpGreater;\r\n+    int selectedAttLower;\r\n+    int selectedAttGreater;\r\n+    int selectedDefGreater;\r\n+    int selectedDefLower;\r\n+    int selectedSpattLower;\r\n+    int selectedSpattGreater;\r\n+    int selectedSpdefLower;\r\n+    int selectedSpdefGreater;\r\n+    int selectedSpeedLower;\r\n+    int selectedSpeedGreater;\r\n+\r\n+\r\n+    // UI elements\r\n+    Spinner type1Spinner;\r\n+    Spinner type2Spinner;\r\n+    Spinner abilitySpinner;\r\n+    Spinner eggGroup1Spinner;\r\n+    Spinner eggGroup2Spinner;\r\n+    Spinner generationSpinner;\r\n+\r\n+    EditText hpLowerTextUI;\r\n+    EditText hpGreaterTextUI;\r\n+    EditText attLowerTextUI;\r\n+    EditText attGreaterTextUI;\r\n+    EditText defLowerTextUI;\r\n+    EditText defGreaterTextUI;\r\n+    EditText spattLowerTextUI;\r\n+    EditText spattGreaterTextUI;\r\n+    EditText spdefLowerTextUI;\r\n+    EditText spdefGreaterTextUI;\r\n+    EditText speedLowerTextUI;\r\n+    EditText speedGreaterTextUI;\r\n+\r\n+    @Override\r\n+    protected void onCreate(Bundle savedInstanceState) {\r\n+        long startTime = System.nanoTime();\r\n+\r\n+        super.onCreate(savedInstanceState);\r\n+        setContentView(R.layout.activity_advanced_search);\r\n+\r\n+        pokemonFactory = PokemonFactory.getPokemonFactory(this.getApplicationContext());\r\n+\r\n+        allTypes = pokemonFactory.getListOfTypes();\r\n+        allAbilities = pokemonFactory.getAllAbilities();\r\n+        allEggGroups = pokemonFactory.getAllEggGroups();\r\n+        allGenerations = pokemonFactory.getGenerations();\r\n+\r\n+        long endTime = System.nanoTime();\r\n+        long duration = (endTime - startTime);\r\n+\r\n+        Log.d(\"QPDex\", String.format(\"Obtaining Spinner Data took %s ns\",duration));\r\n+\r\n+        // No need for MinimalPokemon\r\n+        //allMinimalPokemon = pokemonFactory.getAllMinimalPokemon();\r\n+\r\n+        //setup and fill in all spinner contents\r\n+        retrieveInterfaceElements();\r\n+        fillInSpinnerValues();\r\n+\r\n+        // Provide a set of solutions if no options are selected\r\n+        resetFilter();\r\n+\r\n+        endTime = System.nanoTime();\r\n+        duration = (endTime - startTime);\r\n+\r\n+        Log.d(\"QPDex\", String.format(\"Total creation took %s ns\",duration));\r\n+\r\n+    }\r\n+\r\n+    private void retrieveInterfaceElements(){\r\n+        //Retrieve all UI Variables for setup\r\n+        type1Spinner = (Spinner) findViewById(R.id.type1_spinner);\r\n+        type2Spinner = (Spinner) findViewById(R.id.type2_spinner);\r\n+        abilitySpinner = (Spinner) findViewById(R.id.ability_spinner);\r\n+        eggGroup1Spinner = (Spinner) findViewById(R.id.egg1_spinner);\r\n+        eggGroup2Spinner = (Spinner) findViewById(R.id.egg2_spinner);\r\n+        generationSpinner = (Spinner) findViewById(R.id.generation_spinner);\r\n+\r\n+        hpLowerTextUI = (EditText) findViewById(R.id.hp_lower);\r\n+        hpGreaterTextUI = (EditText) findViewById(R.id.hp_greater);\r\n+        attLowerTextUI = (EditText) findViewById(R.id.att_lower);\r\n+        attGreaterTextUI = (EditText) findViewById(R.id.att_greater);\r\n+        defLowerTextUI = (EditText) findViewById(R.id.def_lower);\r\n+        defGreaterTextUI = (EditText) findViewById(R.id.def_greater);\r\n+        spattLowerTextUI = (EditText) findViewById(R.id.spatt_lower);\r\n+        spattGreaterTextUI = (EditText) findViewById(R.id.spatt_greater);\r\n+        spdefLowerTextUI = (EditText) findViewById(R.id.spdef_lower);\r\n+        spdefGreaterTextUI = (EditText) findViewById(R.id.spdef_greater);\r\n+        speedLowerTextUI = (EditText) findViewById(R.id.speed_lower);\r\n+        speedGreaterTextUI = (EditText) findViewById(R.id.speed_greater);\r\n+\r\n+\r\n+    }\r\n+\r\n+    private void fillInSpinnerValues(){\r\n+\r\n+        //TODO: Filling out these Spinners with the actual objects seems to be causing a bottleneck,\r\n+        // Might want to just store strings to optimize\r\n+        long startTime = System.nanoTime();\r\n+        ArrayAdapter<Type> typeArrayAdapter = new ArrayAdapter<Type>(this, android.R.layout.simple_spinner_item, allTypes);\r\n+        typeArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n+\r\n+        ArrayAdapter<Ability> abilityArrayAdapter = new ArrayAdapter<Ability>(this, android.R.layout.simple_spinner_item, allAbilities);\r\n+        abilityArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n+\r\n+        ArrayAdapter<EggGroup> eggGroupArrayAdapter = new ArrayAdapter<EggGroup>(this, android.R.layout.simple_spinner_item, allEggGroups);\r\n+        eggGroupArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n+\r\n+        ArrayAdapter<String> generationArrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, allGenerations);\r\n+        generationArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n+\r\n+        type1Spinner.setAdapter(typeArrayAdapter);\r\n+        type2Spinner.setAdapter(typeArrayAdapter);\r\n+        abilitySpinner.setAdapter(abilityArrayAdapter);\r\n+        eggGroup1Spinner.setAdapter(eggGroupArrayAdapter);\r\n+        eggGroup2Spinner.setAdapter(eggGroupArrayAdapter);\r\n+        generationSpinner.setAdapter(generationArrayAdapter);\r\n+\r\n+        type1Spinner.setOnItemSelectedListener(new DropDownSelectSpinner());\r\n+        type2Spinner.setOnItemSelectedListener(new DropDownSelectSpinner());\r\n+        abilitySpinner.setOnItemSelectedListener(new DropDownSelectSpinner());\r\n+        eggGroup1Spinner.setOnItemSelectedListener(new DropDownSelectSpinner());\r\n+        eggGroup2Spinner.setOnItemSelectedListener(new DropDownSelectSpinner());\r\n+        generationSpinner.setOnItemSelectedListener(new DropDownSelectSpinner());\r\n+\r\n+        long endTime = System.nanoTime();\r\n+        long duration = (endTime - startTime);\r\n+\r\n+        Log.d(\"QPDex\", String.format(\"Total filling spinners took %s ns\",duration));\r\n+    }\r\n+\r\n+    private void resetFilter(){\r\n+        // Provide a set of solutions if no options are selected\r\n+        filteredNationalIds = new ArrayList<Integer>();\r\n+        filteredUniqueIds = new ArrayList<Integer>();\r\n+        currentFilterPokemonArrayList = new ArrayList<Integer>();\r\n+\r\n+        for(int i =1; i< pokemonFactory.getMAX_UNIQUE_ID()+1 ; i++ ){\r\n+            filteredUniqueIds.add(i);\r\n+            currentFilterPokemonArrayList.add(i);\r\n+        }\r\n+\r\n+        for (int i=1; i <pokemonFactory.getMAX_NATIONAL_ID()+1; i++){\r\n+            filteredNationalIds.add(i);\r\n+        }\r\n+    }\r\n+    @Override\r\n+    public boolean onCreateOptionsMenu(Menu menu) {\r\n+        // Inflate the menu; this adds items to the action bar if it is present.\r\n+        getMenuInflater().inflate(R.menu.menu_advanced_search, menu);\r\n+        return true;\r\n+    }\r\n+\r\n+    @Override\r\n+    public boolean onOptionsItemSelected(MenuItem item) {\r\n+        // Handle action bar item clicks here. The action bar will\r\n+        // automatically handle clicks on the Home/Up button, so long\r\n+        // as you specify a parent activity in AndroidManifest.xml.\r\n+        int id = item.getItemId();\r\n+\r\n+        //noinspection SimplifiableIfStatement\r\n+        if (id == R.id.action_settings) {\r\n+            return true;\r\n+        }\r\n+\r\n+        return super.onOptionsItemSelected(item);\r\n+    }\r\n+\r\n+    private class DropDownSelectSpinner implements AdapterView.OnItemSelectedListener {\r\n+\r\n+        /**\r\n+         * Saves the chosen selections from the dropdown spinners\r\n+         *\r\n+         * @param parent either the type1 or type spinner\r\n+         * @param view\r\n+         * @param pos corresponds to the typeID position\r\n+         * @param id corresponds to the id of the position\r\n+         */\r\n+        public void onItemSelected(AdapterView<?> parent, View view,\r\n+                                   int pos, long id) {\r\n+            // An item was selected. You can retrieve the selected item using\r\n+            // parent.getItemAtPosition(pos)\r\n+\r\n+            // Determine other type, and set current type\r\n+            Type otherType = new Type(\"Temp\", -1);\r\n+            if (parent.getId() == type1Spinner.getId()){\r\n+                Type selectedType = (Type) parent.getItemAtPosition(pos);\r\n+                Log.d(\"QPDex\", \"Spinner touched\");\r\n+                Log.d(\"QPDEX\", String.format(\"%s - %s chosen\", parent.toString(), selectedType));\r\n+                selectedType1 = selectedType;\r\n+                otherType = selectedType2;\r\n+            }\r\n+            else if (parent.getId() == type2Spinner.getId()){\r\n+                Type selectedType = (Type) parent.getItemAtPosition(pos);\r\n+                Log.d(\"QPDex\", \"Spinner touched\");\r\n+                Log.d(\"QPDEX\", String.format(\"%s - %s chosen\", parent.toString(), selectedType));\r\n+                selectedType2 = selectedType;\r\n+                otherType = selectedType1;\r\n+            }\r\n+            else if(parent.getId() == abilitySpinner.getId()){\r\n+\r\n+                selectedAbility = allAbilities[pos];\r\n+            }\r\n+            else if(parent.getId() == eggGroup1Spinner.getId()){\r\n+\r\n+                selectedEggGroup1 = allEggGroups[pos];\r\n+            }\r\n+            else if(parent.getId() == eggGroup2Spinner.getId()){\r\n+\r\n+                selectedEggGroup2 = allEggGroups[pos];\r\n+            }\r\n+            else if(parent.getId() == generationSpinner.getId()){\r\n+                // Don't actual Need the string value, pos is enough\r\n+                selectedGeneration = pos;\r\n+            }\r\n+        }\r\n+\r\n+        public void onNothingSelected(AdapterView<?> parent) {\r\n+            // Another interface callback\r\n+        }\r\n+\r\n+    }\r\n+\r\n+    /**\r\n+     * Function to collect the user input of stats\r\n+     */\r\n+    public void collectStats() {\r\n+\r\n+        final int max_stat = 999;\r\n+        final int min_stat = 0;\r\n+\r\n+        Log.d(\"QPDex\", \"Stats being collected\");\r\n+\r\n+\r\n+\r\n+        if (!hpLowerTextUI.getText().toString().equals(\"\")) {\r\n+            selectedHpLower = Integer.parseInt(hpLowerTextUI.getText().toString());\r\n+        }else{\r\n+            selectedHpLower = min_stat;\r\n+        }\r\n+\r\n+        if (!hpGreaterTextUI.getText().toString().equals(\"\")){\r\n+            selectedHpGreater = Integer.parseInt(hpGreaterTextUI.getText().toString());\r\n+        }else {\r\n+            selectedHpGreater = max_stat;\r\n+        }\r\n+\r\n+        if (!attLowerTextUI.getText().toString().equals(\"\")){\r\n+            selectedAttLower = Integer.parseInt(attLowerTextUI.getText().toString());\r\n+        }else{\r\n+            selectedAttLower = min_stat;\r\n+        }\r\n+\r\n+        if (!attGreaterTextUI.getText().toString().equals(\"\")){\r\n+            selectedAttGreater = Integer.parseInt(attGreaterTextUI.getText().toString());\r\n+        }else {\r\n+            selectedAttGreater = max_stat;\r\n+        }\r\n+\r\n+        if (!defLowerTextUI.getText().toString().equals(\"\")){\r\n+            selectedDefLower = Integer.parseInt(defLowerTextUI.getText().toString());\r\n+        }else{\r\n+            selectedDefLower = min_stat;\r\n+        }\r\n+\r\n+        if (!defGreaterTextUI.getText().toString().equals(\"\")){\r\n+            selectedDefGreater = Integer.parseInt(defGreaterTextUI.getText().toString());\r\n+        }else {\r\n+            selectedDefGreater = max_stat;\r\n+        }\r\n+\r\n+        if (!spattLowerTextUI.getText().toString().equals(\"\")){\r\n+            selectedSpattLower = Integer.parseInt(spattLowerTextUI.getText().toString());\r\n+        }else{\r\n+            selectedSpattLower = min_stat;\r\n+        }\r\n+\r\n+        if (!spattGreaterTextUI.getText().toString().equals(\"\")){\r\n+            selectedSpattGreater = Integer.parseInt(spattGreaterTextUI.getText().toString());\r\n+        }\r\n+        else {\r\n+            selectedSpattGreater = max_stat;\r\n+        }\r\n+\r\n+        if (!spdefLowerTextUI.getText().toString().equals(\"\")){\r\n+            selectedSpdefLower = Integer.parseInt(spdefLowerTextUI.getText().toString());\r\n+        }else{\r\n+            selectedSpdefLower = min_stat;\r\n+        }\r\n+\r\n+        if (!spdefGreaterTextUI.getText().toString().equals(\"\")){\r\n+            selectedSpdefGreater = Integer.parseInt(spdefGreaterTextUI.getText().toString());\r\n+        }else {\r\n+            selectedSpdefGreater = max_stat;\r\n+        }\r\n+\r\n+        if (!speedLowerTextUI.getText().toString().equals(\"\")){\r\n+            selectedSpeedLower = Integer.parseInt(speedLowerTextUI.getText().toString());\r\n+        }else{\r\n+            selectedSpeedLower = min_stat;\r\n+        }\r\n+\r\n+        if (!speedGreaterTextUI.getText().toString().equals(\"\")){\r\n+            selectedSpeedGreater = Integer.parseInt(speedGreaterTextUI.getText().toString());\r\n+        }else {\r\n+            selectedSpeedGreater = max_stat;\r\n+        }\r\n+\r\n+        Log.d(\"QPDEX\", String.format(\"Stats chosen: %s/%s/%s/%s/%s/%s - %s/%s/%s/%s/%s/%s \",\r\n+                String.valueOf(selectedHpLower),String.valueOf(selectedAttLower),String.valueOf(selectedDefLower),\r\n+                String.valueOf(selectedSpattLower),String.valueOf(selectedSpdefLower),String.valueOf(selectedSpeedLower),\r\n+                String.valueOf(selectedHpGreater),String.valueOf(selectedAttGreater),String.valueOf(selectedDefGreater),\r\n+                String.valueOf(selectedSpattGreater),String.valueOf(selectedSpdefGreater),String.valueOf(selectedSpeedGreater)\r\n+                ));\r\n+\r\n+    }\r\n+\r\n+    /**\r\n+     * Function to filter for the stats of pokemon\r\n+     *\r\n+     * @param lowerLimit of the stat\r\n+     * @param upperLimit of the stat\r\n+     * @param statName either HP, DEFENCE, ATTACK, SPATTACK, SPDEFENCE or SPEED\r\n+     */\r\n+    private void filterStats(int lowerLimit, int upperLimit, String statName){\r\n+\r\n+        // Filter only if one of the values is not a default value\r\n+        if(lowerLimit > 0 || upperLimit < 999){\r\n+            ArrayList<Integer> tempFilterPokemonArrayList = new ArrayList<Integer>();\r\n+            tempFilterPokemonArrayList = pokemonFactory.getAllUniqueIDsFromStat(lowerLimit, upperLimit, statName);\r\n+            currentFilterPokemonArrayList.retainAll(tempFilterPokemonArrayList);\r\n+            tempFilterPokemonArrayList.clear();\r\n+        }\r\n+\r\n+    }\r\n+\r\n+\r\n+\r\n+\r\n+\r\n+\r\n+    public void switchToPokedex(View view){\r\n+        long startTime = System.nanoTime();\r\n+        Intent intent = new Intent(this,PokedexActivity.class);\r\n+\r\n+        // Obtain all stats chosen\r\n+        collectStats();\r\n+\r\n+        //Comment this out, takes way tooo long 4+sec\r\n+        currentFilterPokemonArrayList.clear();\r\n+        currentFilterPokemonArrayList.addAll(filteredUniqueIds);\r\n+\r\n+        ArrayList<Integer> tempFilterPokemonArrayList = new ArrayList<>();\r\n+\r\n+        // Filtering algorithm, will go through a list of all uniqueIDs and apply filters\r\n+        // consecutively. Once the list is filtered, convert the unique to nationalIds\r\n+\r\n+        //Start with the ability chosen, if any. Use the ability ID to get all NationalID's associated\r\n+        if(selectedAbility.getName() != \"None\"){\r\n+\r\n+            currentFilterPokemonArrayList = pokemonFactory.getAllUniqueIDsFromAbility(Arrays.asList(allAbilities).indexOf(selectedAbility));\r\n+        }\r\n+\r\n+\r\n+        // Filter the remaining IDs by type twice\r\n+\r\n+        if(selectedType1.getTypeID() != 0){\r\n+\r\n+            tempFilterPokemonArrayList = pokemonFactory.getAllUniqueIDsFromType(Arrays.asList(allTypes).indexOf(selectedType1));\r\n+            currentFilterPokemonArrayList.retainAll(tempFilterPokemonArrayList);\r\n+            tempFilterPokemonArrayList.clear();\r\n+        }\r\n+\r\n+\r\n+\r\n+        if(selectedType2.getTypeID() != 0){\r\n+\r\n+            tempFilterPokemonArrayList = pokemonFactory.getAllUniqueIDsFromType(Arrays.asList(allTypes).indexOf(selectedType2));\r\n+            currentFilterPokemonArrayList.retainAll(tempFilterPokemonArrayList);\r\n+            tempFilterPokemonArrayList.clear();\r\n+        }\r\n+\r\n+        // If at least one is not default value, filter\r\n+        filterStats(selectedHpLower, selectedHpGreater, \"HP\");\r\n+        filterStats(selectedAttLower, selectedAttGreater, \"ATTACK\");\r\n+        filterStats(selectedDefLower, selectedDefGreater, \"DEFENCE\");\r\n+        filterStats(selectedSpattLower, selectedSpattGreater, \"SPATTACK\");\r\n+        filterStats(selectedSpdefLower, selectedSpdefGreater, \"SPDEFENCE\");\r\n+        filterStats(selectedSpeedLower, selectedSpeedGreater, \"SPEED\");\r\n+        //TODO: Filter by sum\r\n+        //filterStats(selectedSpeedLower, selectedSpeedGreater, \"SUM\");\r\n+\r\n+        // When Done filtering by UniqueID's convert uniqueIDs to NationalId's\r\n+        filteredNationalIds = pokemonFactory.convertUniqueToNational(currentFilterPokemonArrayList);\r\n+\r\n+        // Filter national IDs based on Egg Groups\r\n+        if(selectedEggGroup1.getName() != \"None\"){\r\n+\r\n+            tempFilterPokemonArrayList = pokemonFactory.getAllNationalIdsFromEggGroup(Arrays.asList(allEggGroups).indexOf(selectedEggGroup1));\r","path":"app/src/main/java/me/quadphase/qpdex/AdvancedSearch.java","position":475,"original_position":475,"commit_id":"907f82b5d1cd44aed153fbf0749538bd3dd24652","original_commit_id":"907f82b5d1cd44aed153fbf0749538bd3dd24652","user":{"login":"minicole","id":6855705,"avatar_url":"https://avatars.githubusercontent.com/u/6855705?v=3","gravatar_id":"","url":"https://api.github.com/users/minicole","html_url":"https://github.com/minicole","followers_url":"https://api.github.com/users/minicole/followers","following_url":"https://api.github.com/users/minicole/following{/other_user}","gists_url":"https://api.github.com/users/minicole/gists{/gist_id}","starred_url":"https://api.github.com/users/minicole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minicole/subscriptions","organizations_url":"https://api.github.com/users/minicole/orgs","repos_url":"https://api.github.com/users/minicole/repos","events_url":"https://api.github.com/users/minicole/events{/privacy}","received_events_url":"https://api.github.com/users/minicole/received_events","type":"User","site_admin":false},"body":"same as above with eggGroupID","created_at":"2015-09-12T23:55:34Z","updated_at":"2015-09-12T23:55:34Z","html_url":"https://github.com/foxtrot94/ECE-Pokedex/pull/41#discussion_r39342776","pull_request_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/comments/39342776"},"html":{"href":"https://github.com/foxtrot94/ECE-Pokedex/pull/41#discussion_r39342776"},"pull_request":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/41","id":44505471,"html_url":"https://github.com/foxtrot94/ECE-Pokedex/pull/41","diff_url":"https://github.com/foxtrot94/ECE-Pokedex/pull/41.diff","patch_url":"https://github.com/foxtrot94/ECE-Pokedex/pull/41.patch","issue_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/41","number":41,"state":"open","locked":false,"title":"Issue#21 advanced search","user":{"login":"thineshth","id":10590901,"avatar_url":"https://avatars.githubusercontent.com/u/10590901?v=3","gravatar_id":"","url":"https://api.github.com/users/thineshth","html_url":"https://github.com/thineshth","followers_url":"https://api.github.com/users/thineshth/followers","following_url":"https://api.github.com/users/thineshth/following{/other_user}","gists_url":"https://api.github.com/users/thineshth/gists{/gist_id}","starred_url":"https://api.github.com/users/thineshth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thineshth/subscriptions","organizations_url":"https://api.github.com/users/thineshth/orgs","repos_url":"https://api.github.com/users/thineshth/repos","events_url":"https://api.github.com/users/thineshth/events{/privacy}","received_events_url":"https://api.github.com/users/thineshth/received_events","type":"User","site_admin":false},"body":"Fixes #21 - Advanced Search functionality ","created_at":"2015-09-09T02:48:30Z","updated_at":"2015-09-12T23:55:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"965a1922ee9f0aaaf289b7db3c66de4b1226c786","assignee":{"login":"minicole","id":6855705,"avatar_url":"https://avatars.githubusercontent.com/u/6855705?v=3","gravatar_id":"","url":"https://api.github.com/users/minicole","html_url":"https://github.com/minicole","followers_url":"https://api.github.com/users/minicole/followers","following_url":"https://api.github.com/users/minicole/following{/other_user}","gists_url":"https://api.github.com/users/minicole/gists{/gist_id}","starred_url":"https://api.github.com/users/minicole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minicole/subscriptions","organizations_url":"https://api.github.com/users/minicole/orgs","repos_url":"https://api.github.com/users/minicole/repos","events_url":"https://api.github.com/users/minicole/events{/privacy}","received_events_url":"https://api.github.com/users/minicole/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/41/commits","review_comments_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/41/comments","review_comment_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/41/comments","statuses_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/statuses/907f82b5d1cd44aed153fbf0749538bd3dd24652","head":{"label":"foxtrot94:Issue#21-AdvancedSearch","ref":"Issue#21-AdvancedSearch","sha":"907f82b5d1cd44aed153fbf0749538bd3dd24652","user":{"login":"foxtrot94","id":6027890,"avatar_url":"https://avatars.githubusercontent.com/u/6027890?v=3","gravatar_id":"","url":"https://api.github.com/users/foxtrot94","html_url":"https://github.com/foxtrot94","followers_url":"https://api.github.com/users/foxtrot94/followers","following_url":"https://api.github.com/users/foxtrot94/following{/other_user}","gists_url":"https://api.github.com/users/foxtrot94/gists{/gist_id}","starred_url":"https://api.github.com/users/foxtrot94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxtrot94/subscriptions","organizations_url":"https://api.github.com/users/foxtrot94/orgs","repos_url":"https://api.github.com/users/foxtrot94/repos","events_url":"https://api.github.com/users/foxtrot94/events{/privacy}","received_events_url":"https://api.github.com/users/foxtrot94/received_events","type":"User","site_admin":false},"repo":{"id":31136701,"name":"ECE-Pokedex","full_name":"foxtrot94/ECE-Pokedex","owner":{"login":"foxtrot94","id":6027890,"avatar_url":"https://avatars.githubusercontent.com/u/6027890?v=3","gravatar_id":"","url":"https://api.github.com/users/foxtrot94","html_url":"https://github.com/foxtrot94","followers_url":"https://api.github.com/users/foxtrot94/followers","following_url":"https://api.github.com/users/foxtrot94/following{/other_user}","gists_url":"https://api.github.com/users/foxtrot94/gists{/gist_id}","starred_url":"https://api.github.com/users/foxtrot94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxtrot94/subscriptions","organizations_url":"https://api.github.com/users/foxtrot94/orgs","repos_url":"https://api.github.com/users/foxtrot94/repos","events_url":"https://api.github.com/users/foxtrot94/events{/privacy}","received_events_url":"https://api.github.com/users/foxtrot94/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/foxtrot94/ECE-Pokedex","description":"An Android App for those that want to be the very best! You Gotta Catch 'Em All!","fork":false,"url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex","forks_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/forks","keys_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/teams","hooks_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/hooks","issue_events_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/events{/number}","events_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/events","assignees_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/assignees{/user}","branches_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/branches{/branch}","tags_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/tags","blobs_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/refs{/sha}","trees_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/statuses/{sha}","languages_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/languages","stargazers_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/stargazers","contributors_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/contributors","subscribers_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/subscribers","subscription_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/subscription","commits_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/commits{/sha}","git_commits_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/commits{/sha}","comments_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/comments{/number}","issue_comment_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/comments{/number}","contents_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/contents/{+path}","compare_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/merges","archive_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/downloads","issues_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues{/number}","pulls_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls{/number}","milestones_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/milestones{/number}","notifications_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/labels{/name}","releases_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/releases{/id}","created_at":"2015-02-21T18:57:28Z","updated_at":"2015-09-01T15:27:54Z","pushed_at":"2015-09-12T19:06:22Z","git_url":"git://github.com/foxtrot94/ECE-Pokedex.git","ssh_url":"git@github.com:foxtrot94/ECE-Pokedex.git","clone_url":"https://github.com/foxtrot94/ECE-Pokedex.git","svn_url":"https://github.com/foxtrot94/ECE-Pokedex","homepage":"","size":80189,"stargazers_count":0,"watchers_count":0,"language":"PLpgSQL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":15,"forks":0,"open_issues":15,"watchers":0,"default_branch":"master"}},"base":{"label":"foxtrot94:master","ref":"master","sha":"809a8acc1136205d7800ab8edc6227b9ba797fdb","user":{"login":"foxtrot94","id":6027890,"avatar_url":"https://avatars.githubusercontent.com/u/6027890?v=3","gravatar_id":"","url":"https://api.github.com/users/foxtrot94","html_url":"https://github.com/foxtrot94","followers_url":"https://api.github.com/users/foxtrot94/followers","following_url":"https://api.github.com/users/foxtrot94/following{/other_user}","gists_url":"https://api.github.com/users/foxtrot94/gists{/gist_id}","starred_url":"https://api.github.com/users/foxtrot94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxtrot94/subscriptions","organizations_url":"https://api.github.com/users/foxtrot94/orgs","repos_url":"https://api.github.com/users/foxtrot94/repos","events_url":"https://api.github.com/users/foxtrot94/events{/privacy}","received_events_url":"https://api.github.com/users/foxtrot94/received_events","type":"User","site_admin":false},"repo":{"id":31136701,"name":"ECE-Pokedex","full_name":"foxtrot94/ECE-Pokedex","owner":{"login":"foxtrot94","id":6027890,"avatar_url":"https://avatars.githubusercontent.com/u/6027890?v=3","gravatar_id":"","url":"https://api.github.com/users/foxtrot94","html_url":"https://github.com/foxtrot94","followers_url":"https://api.github.com/users/foxtrot94/followers","following_url":"https://api.github.com/users/foxtrot94/following{/other_user}","gists_url":"https://api.github.com/users/foxtrot94/gists{/gist_id}","starred_url":"https://api.github.com/users/foxtrot94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxtrot94/subscriptions","organizations_url":"https://api.github.com/users/foxtrot94/orgs","repos_url":"https://api.github.com/users/foxtrot94/repos","events_url":"https://api.github.com/users/foxtrot94/events{/privacy}","received_events_url":"https://api.github.com/users/foxtrot94/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/foxtrot94/ECE-Pokedex","description":"An Android App for those that want to be the very best! You Gotta Catch 'Em All!","fork":false,"url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex","forks_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/forks","keys_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/teams","hooks_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/hooks","issue_events_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/events{/number}","events_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/events","assignees_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/assignees{/user}","branches_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/branches{/branch}","tags_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/tags","blobs_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/refs{/sha}","trees_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/statuses/{sha}","languages_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/languages","stargazers_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/stargazers","contributors_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/contributors","subscribers_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/subscribers","subscription_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/subscription","commits_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/commits{/sha}","git_commits_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/git/commits{/sha}","comments_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/comments{/number}","issue_comment_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/comments{/number}","contents_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/contents/{+path}","compare_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/merges","archive_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/downloads","issues_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues{/number}","pulls_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls{/number}","milestones_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/milestones{/number}","notifications_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/labels{/name}","releases_url":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/releases{/id}","created_at":"2015-02-21T18:57:28Z","updated_at":"2015-09-01T15:27:54Z","pushed_at":"2015-09-12T19:06:22Z","git_url":"git://github.com/foxtrot94/ECE-Pokedex.git","ssh_url":"git@github.com:foxtrot94/ECE-Pokedex.git","clone_url":"https://github.com/foxtrot94/ECE-Pokedex.git","svn_url":"https://github.com/foxtrot94/ECE-Pokedex","homepage":"","size":80189,"stargazers_count":0,"watchers_count":0,"language":"PLpgSQL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":15,"forks":0,"open_issues":15,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/41"},"html":{"href":"https://github.com/foxtrot94/ECE-Pokedex/pull/41"},"issue":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/41"},"comments":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/foxtrot94/ECE-Pokedex/statuses/907f82b5d1cd44aed153fbf0749538bd3dd24652"}}}}