Updated Twitch Emote API to v3. Emote Updates are now working again.
This commit is contained in:
parent
df2a9d0e71
commit
8924c55247
@ -7,6 +7,6 @@
|
||||
<attribute name="javadoc_location" value="jar:file:/D:/Data/commons-io-2.5-javadoc.jar!/"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry exported="true" kind="lib" path="D:/Downloads/twitch-api-wrapper-0.3-jar-with-dependencies.jar"/>
|
||||
<classpathentry kind="lib" path="D:/Downloads/twitch-api-wrapper-0.3-jar-with-dependencies.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -24,6 +24,7 @@ import javax.swing.SwingUtilities;
|
||||
import com.mb3364.twitch.api.Twitch;
|
||||
import com.mb3364.twitch.api.handlers.ChannelFollowsResponseHandler;
|
||||
import com.mb3364.twitch.api.handlers.StreamResponseHandler;
|
||||
import com.mb3364.twitch.api.handlers.UserResponseHandler;
|
||||
import com.mb3364.twitch.api.models.ChannelFollow;
|
||||
import com.mb3364.twitch.api.models.Stream;
|
||||
import com.mb3364.twitch.api.models.User;
|
||||
@ -82,7 +83,6 @@ public class TwitchModule extends Module{
|
||||
CreateFollowerQueueLog();
|
||||
}
|
||||
manager.setClientId("o4c2x0l3e82scgar4hpxg6m5dfjbem");
|
||||
getFollowers(firstTime);
|
||||
/*manager.streams().get("theduckishot", new StreamResponseHandler() {
|
||||
|
||||
@Override
|
||||
|
@ -96,6 +96,7 @@ public class sigIRC{
|
||||
public static String twitchmodule_newfollowerTextColor="255,255,255";
|
||||
public static int twitchmodule_newfollowerImgLogoSize=32;
|
||||
public static boolean testMode=false;
|
||||
public final static String TWITCHEMOTEURL = "https://static-cdn.jtvnw.net/emoticons/v1/";
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@ -261,8 +262,15 @@ public class sigIRC{
|
||||
|
||||
private static void performTwitchEmoteUpdate() {
|
||||
try {
|
||||
JSONObject twitchemotes = FileUtils.readJsonFromUrl("https://twitchemotes.com/api_cache/v2/global.json");
|
||||
JSONObject emotelist = twitchemotes.getJSONObject("emotes");
|
||||
JSONObject twitchemotes = FileUtils.readJsonFromUrl("https://twitchemotes.com/api_cache/v3/global.json");
|
||||
for (String emotes : twitchemotes.keySet()) {
|
||||
JSONObject emote = twitchemotes.getJSONObject(emotes);
|
||||
int id = emote.getInt("id");
|
||||
String name = emote.getString("code");
|
||||
emoticons.add(new Emoticon(name, new URL(TWITCHEMOTEURL+id+"/1.0")));
|
||||
}
|
||||
JSONObject subemotes = FileUtils.readJsonFromUrl("https://twitchemotes.com/api_cache/v3/subscriber.json");
|
||||
/*JSONObject emotelist = twitchemotes.getJSONObject("emotes");
|
||||
JSONObject templatelist = twitchemotes.getJSONObject("template");
|
||||
String templateurl = templatelist.getString("small");
|
||||
for (String emotes : emotelist.keySet()) {
|
||||
@ -270,7 +278,7 @@ public class sigIRC{
|
||||
int id = emote.getInt("image_id");
|
||||
String emoteurl = templateurl.replace("{image_id}", ""+id);
|
||||
emoticons.add(new Emoticon(emotes, new URL(emoteurl)));
|
||||
}
|
||||
}*/
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user