Showing
7 changed files
with
50 additions
and
40 deletions
PROLOLLOG/.idea/vcs.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<project version="4"> | ||
3 | + <component name="VcsDirectoryMappings"> | ||
4 | + <mapping directory="$PROJECT_DIR$/../../.." vcs="Git" /> | ||
5 | + <mapping directory="$PROJECT_DIR$/../.." vcs="Git" /> | ||
6 | + <mapping directory="$PROJECT_DIR$/.." vcs="Git" /> | ||
7 | + </component> | ||
8 | +</project> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -36,10 +36,12 @@ android { | ... | @@ -36,10 +36,12 @@ android { |
36 | 36 | ||
37 | dependencies { | 37 | dependencies { |
38 | implementation fileTree(dir: 'libs', include: ['*.jar']) | 38 | implementation fileTree(dir: 'libs', include: ['*.jar']) |
39 | - implementation 'androidx.appcompat:appcompat:1.0.2' | 39 | + implementation 'androidx.appcompat:appcompat:1.1.0' |
40 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | 40 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' |
41 | testImplementation 'junit:junit:4.12' | 41 | testImplementation 'junit:junit:4.12' |
42 | - androidTestImplementation 'androidx.test.ext:junit:1.1.0' | 42 | + androidTestImplementation 'androidx.test.ext:junit:1.1.1' |
43 | - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' | 43 | + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' |
44 | - implementation 'com.google.code.gson:gson:2.8.5' | 44 | + //implementation 'com.google.code.gson:gson:2.8.5' |
45 | + //implementation 'com.squareup.okhttp3:okhttp:3.9.0' | ||
46 | + implementation 'com.github.taycaldwell:riot-api-java:4.3.0' | ||
45 | } | 47 | } | ... | ... |
PROLOLLOG/app/src/androidTest/java/com/example/pro_lol_log/ExampleInstrumentedTest.java
deleted
100644 → 0
1 | -package com.example.pro_lol_log; | ||
2 | - | ||
3 | -import android.content.Context; | ||
4 | - | ||
5 | -import androidx.test.platform.app.InstrumentationRegistry; | ||
6 | -import androidx.test.ext.junit.runners.AndroidJUnit4; | ||
7 | - | ||
8 | -import org.junit.Test; | ||
9 | -import org.junit.runner.RunWith; | ||
10 | - | ||
11 | -import static org.junit.Assert.*; | ||
12 | - | ||
13 | -/** | ||
14 | - * Instrumented test, which will execute on an Android device. | ||
15 | - * | ||
16 | - * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
17 | - */ | ||
18 | -@RunWith(AndroidJUnit4.class) | ||
19 | -public class ExampleInstrumentedTest { | ||
20 | - @Test | ||
21 | - public void useAppContext() { | ||
22 | - // Context of the app under test. | ||
23 | - Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); | ||
24 | - | ||
25 | - assertEquals("com.example.pro_lol_log", appContext.getPackageName()); | ||
26 | - } | ||
27 | -} |
... | @@ -2,6 +2,8 @@ | ... | @@ -2,6 +2,8 @@ |
2 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
3 | package="com.example.pro_lol_log"> | 3 | package="com.example.pro_lol_log"> |
4 | 4 | ||
5 | + <uses-permission android:name="android.permission.INTERNET"/> | ||
6 | + | ||
5 | <application | 7 | <application |
6 | android:allowBackup="true" | 8 | android:allowBackup="true" |
7 | android:icon="@mipmap/ic_launcher" | 9 | android:icon="@mipmap/ic_launcher" | ... | ... |
... | @@ -28,7 +28,13 @@ import android.widget.Toast; | ... | @@ -28,7 +28,13 @@ import android.widget.Toast; |
28 | import android.view.animation.Animation; | 28 | import android.view.animation.Animation; |
29 | import android.view.animation.AnimationUtils; | 29 | import android.view.animation.AnimationUtils; |
30 | 30 | ||
31 | -import com.google.gson.Gson; | 31 | +//드디어 롤 관련 API |
32 | +import net.rithms.riot.api.ApiConfig; | ||
33 | +import net.rithms.riot.api.RiotApi; | ||
34 | +import net.rithms.riot.api.RiotApiException; | ||
35 | + | ||
36 | +import net.rithms.riot.api.endpoints.summoner.dto.Summoner; | ||
37 | +import net.rithms.riot.constant.Platform; | ||
32 | 38 | ||
33 | 39 | ||
34 | public class MainActivity extends AppCompatActivity { | 40 | public class MainActivity extends AppCompatActivity { |
... | @@ -521,14 +527,7 @@ public class MainActivity extends AppCompatActivity { | ... | @@ -521,14 +527,7 @@ public class MainActivity extends AppCompatActivity { |
521 | } | 527 | } |
522 | } | 528 | } |
523 | 529 | ||
524 | - //본격적인 분석 | ||
525 | - public void APIuses(){ | ||
526 | - Gson gson = new Gson(); | ||
527 | - | ||
528 | - //아래와 같은 식으로 사용한다. | ||
529 | - // gson.fromJson() | ||
530 | 530 | ||
531 | - } | ||
532 | 531 | ||
533 | 532 | ||
534 | 533 | ... | ... |
1 | package com.example.pro_lol_log; | 1 | package com.example.pro_lol_log; |
2 | 2 | ||
3 | + | ||
4 | +import net.rithms.riot.api.ApiConfig; | ||
5 | +import net.rithms.riot.api.RiotApi; | ||
6 | +import net.rithms.riot.api.RiotApiException; | ||
7 | + | ||
8 | +import net.rithms.riot.api.endpoints.summoner.dto.Summoner; | ||
9 | +import net.rithms.riot.constant.Platform; | ||
10 | + | ||
3 | public class Player_Pro_Analysis { | 11 | public class Player_Pro_Analysis { |
12 | + | ||
13 | + ApiConfig config = new ApiConfig().setKey("RGAPI-f3a35288-26a1-46c3-96fd-697863811e8a"); | ||
14 | + RiotApi api = new RiotApi(config); | ||
15 | + | ||
16 | + | ||
17 | + //Summoner summoner = api.getSummonerByName(Platform.KR, "hide on bush"); | ||
18 | + /* | ||
19 | + System.out.println("Name: " + summoner.getName()); | ||
20 | + System.out.println("Summoner ID: " + summoner.getId()); | ||
21 | + System.out.println("Account ID: " + summoner.getAccountId()); | ||
22 | + System.out.println("PUUID: " + summoner.getPuuid()); | ||
23 | + System.out.println("Summoner Level: " + summoner.getSummonerLevel()); | ||
24 | + System.out.println("Profile Icon ID: " + summoner.getProfileIconId()); | ||
25 | + */ | ||
26 | + | ||
27 | + | ||
4 | } | 28 | } | ... | ... |
... | @@ -4,7 +4,7 @@ buildscript { | ... | @@ -4,7 +4,7 @@ buildscript { |
4 | repositories { | 4 | repositories { |
5 | google() | 5 | google() |
6 | jcenter() | 6 | jcenter() |
7 | - | 7 | + maven { url 'https://jitpack.io' } |
8 | } | 8 | } |
9 | dependencies { | 9 | dependencies { |
10 | classpath 'com.android.tools.build:gradle:3.5.1' | 10 | classpath 'com.android.tools.build:gradle:3.5.1' |
... | @@ -12,6 +12,7 @@ buildscript { | ... | @@ -12,6 +12,7 @@ buildscript { |
12 | 12 | ||
13 | // NOTE: Do not place your application dependencies here; they belong | 13 | // NOTE: Do not place your application dependencies here; they belong |
14 | // in the individual module build.gradle files | 14 | // in the individual module build.gradle files |
15 | + //implementation 'com.squareup.okhttp3:okhttp:3.9.0' | ||
15 | } | 16 | } |
16 | } | 17 | } |
17 | 18 | ||
... | @@ -19,6 +20,7 @@ allprojects { | ... | @@ -19,6 +20,7 @@ allprojects { |
19 | repositories { | 20 | repositories { |
20 | google() | 21 | google() |
21 | jcenter() | 22 | jcenter() |
23 | + maven { url 'https://jitpack.io' } | ||
22 | } | 24 | } |
23 | } | 25 | } |
24 | 26 | ... | ... |
-
Please register or login to post a comment