Move fixtures to gist
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
package de.jeyp91.gists;
|
||||
|
||||
import com.google.api.client.util.DateTime;
|
||||
import de.jeyp91.apifootball.APIFootballConnector;
|
||||
import de.jeyp91.apifootball.APIFootballUpdater;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
public class GistProviderTest {
|
||||
|
||||
@Test
|
||||
@@ -25,4 +30,27 @@ public class GistProviderTest {
|
||||
JSONArray matcher = prov.getTeamIdMatcher();
|
||||
System.out.println(matcher);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getGistUpdatedTimestampTest() {
|
||||
GistProvider prov = new GistProvider();
|
||||
DateTime date = prov.getGistUpdatedTimestamp("Matches");
|
||||
System.out.println(date);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getGistIDTest() {
|
||||
GistProvider prov = new GistProvider();
|
||||
String id = prov.getGistID("Matches");
|
||||
System.out.println(id);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void updateGistTest() throws UnsupportedEncodingException {
|
||||
GistProvider prov = new GistProvider();
|
||||
APIFootballUpdater updater = new APIFootballUpdater(2021);
|
||||
String body = updater.getRawData("https://v2.api-football.com/fixtures/league/2738?timezone=Europe/Berlin");
|
||||
String content = prov.updateGist("6ec51d59cac70c9f4c040eeea1c0cdd9", "matches_league_2738.json", body);
|
||||
System.out.println(content);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user