forked from Steven/DeepJ
		
	Compare commits
	
		
			No commits in common. "no-bloat" and "master" have entirely different histories.
		
	
	
		
	
		
@ -1,7 +0,0 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					 | 
				
			||||||
<project version="4">
 | 
					 | 
				
			||||||
  <component name="DiscordProjectSettings">
 | 
					 | 
				
			||||||
    <option name="show" value="ASK" />
 | 
					 | 
				
			||||||
    <option name="description" value="" />
 | 
					 | 
				
			||||||
  </component>
 | 
					 | 
				
			||||||
</project>
 | 
					 | 
				
			||||||
@ -16,10 +16,5 @@
 | 
				
			|||||||
      <option name="name" value="MavenRepo" />
 | 
					      <option name="name" value="MavenRepo" />
 | 
				
			||||||
      <option name="url" value="https://repo.maven.apache.org/maven2/" />
 | 
					      <option name="url" value="https://repo.maven.apache.org/maven2/" />
 | 
				
			||||||
    </remote-repository>
 | 
					    </remote-repository>
 | 
				
			||||||
    <remote-repository>
 | 
					 | 
				
			||||||
      <option name="id" value="maven" />
 | 
					 | 
				
			||||||
      <option name="name" value="maven" />
 | 
					 | 
				
			||||||
      <option name="url" value="https://git.nevets.tech/api/packages/5gi/maven" />
 | 
					 | 
				
			||||||
    </remote-repository>
 | 
					 | 
				
			||||||
  </component>
 | 
					  </component>
 | 
				
			||||||
</project>
 | 
					</project>
 | 
				
			||||||
							
								
								
									
										11
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								README.md
									
									
									
									
									
								
							@ -1,12 +1,3 @@
 | 
				
			|||||||
# DeepJ
 | 
					# DeepJ
 | 
				
			||||||
[](https://ci.nevets.tech/view/Alec/job/DeepJ%20Improved/)                    
 | 
					 | 
				
			||||||
[](https://ci.nevets.tech/view/Alec/job/DeepJ%20Improved/)
 | 
					 | 
				
			||||||
> Quick Setup
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
There is none for no-bloat, build it yourself.
 | 
					Java Wrapper for DeepL API
 | 
				
			||||||
> Info
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[To see more details, see the wiki](https://git.nevets.tech/5gi/DeepJ/wiki/Home#user-content-usage-setup).
 | 
					 | 
				
			||||||
________________________________________
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DeepJ is a Java Wrapper for the DeepL Free Public API. This was originally made by Steven (Forked From) and Updated by 5gi
 | 
					 | 
				
			||||||
							
								
								
									
										26
									
								
								build.gradle
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								build.gradle
									
									
									
									
									
								
							@ -3,40 +3,38 @@ plugins {
 | 
				
			|||||||
    id 'maven-publish'
 | 
					    id 'maven-publish'
 | 
				
			||||||
    id 'com.github.johnrengelman.shadow' version '5.2.0'
 | 
					    id 'com.github.johnrengelman.shadow' version '5.2.0'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
apply plugin: 'maven-publish'
 | 
					
 | 
				
			||||||
group 'com.the5gi.deepj'
 | 
					group 'tech.nevets.deepj'
 | 
				
			||||||
version '1.4.2'
 | 
					version '1.1.0'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11
 | 
					sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11
 | 
				
			||||||
 | 
					
 | 
				
			||||||
repositories {
 | 
					repositories {
 | 
				
			||||||
    mavenCentral()
 | 
					    mavenCentral()
 | 
				
			||||||
    maven {
 | 
					 | 
				
			||||||
        url "https://git.nevets.tech/api/packages/5gi/maven"
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dependencies {
 | 
					dependencies {
 | 
				
			||||||
    implementation group: 'org.json', name: 'json', version: '20210307'
 | 
					    implementation group: 'org.json', name: 'json', version: '20210307'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					apply plugin: 'maven-publish'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
publishing {
 | 
					publishing {
 | 
				
			||||||
    publications{
 | 
					    publications{
 | 
				
			||||||
        publish(MavenPublication) {
 | 
					        publish(MavenPublication) {
 | 
				
			||||||
            artifact("nexus/DeepJ-$version" + ".jar") {
 | 
					            artifact("target/DeepJ-$version" + "-all.jar") {
 | 
				
			||||||
                extension 'jar'
 | 
					                extension 'jar'
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    repositories {
 | 
					    repositories {
 | 
				
			||||||
        maven {
 | 
					        maven {
 | 
				
			||||||
            name 'gitea'
 | 
					            name 'nexus'
 | 
				
			||||||
            url "https://git.nevets.tech/api/packages/5gi/maven/"
 | 
					            url "https://repo.nevets.tech/repository/maven-releases/"
 | 
				
			||||||
            credentials.username System.getenv('fivegiUserGit')
 | 
					            credentials {
 | 
				
			||||||
            credentials.password System.getenv('fivegiPassGit')
 | 
					                username System.getenv('nexusUser')
 | 
				
			||||||
 | 
					                password System.getenv('nexusPass')
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
configurations.all {
 | 
					 | 
				
			||||||
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,143 +0,0 @@
 | 
				
			|||||||
package com.the5gi.DeepJ;
 | 
					 | 
				
			||||||
import org.json.JSONArray;
 | 
					 | 
				
			||||||
import org.json.JSONObject;
 | 
					 | 
				
			||||||
import java.io.IOException;
 | 
					 | 
				
			||||||
import java.net.URI;
 | 
					 | 
				
			||||||
import java.net.URLEncoder;
 | 
					 | 
				
			||||||
import java.net.http.HttpClient;
 | 
					 | 
				
			||||||
import java.net.http.HttpRequest;
 | 
					 | 
				
			||||||
import java.net.http.HttpResponse;
 | 
					 | 
				
			||||||
import java.nio.charset.StandardCharsets;
 | 
					 | 
				
			||||||
import java.util.Objects;
 | 
					 | 
				
			||||||
public class Translator {
 | 
					 | 
				
			||||||
    protected Request request;
 | 
					 | 
				
			||||||
    public static String globalAPIKey = "null";
 | 
					 | 
				
			||||||
    public Translator(boolean silent) {
 | 
					 | 
				
			||||||
        if (globalAPIKey == null && !silent) {
 | 
					 | 
				
			||||||
            System.out.println("\n[DeepJ] You are currently using the Global API Key Translator Constructor." +"\n[DeepJ] If you are trying to use global API keys, Call the method \"Translator.setGlobalAuthKey(String key)\" and then re-use this contructor." + "\n[DeepJ] If you want to define an different authkey every time do: \"new Translator(String authKey)\"\n");
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
            request = new Request(globalAPIKey);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    public Translator(String apiKey, boolean silence) {
 | 
					 | 
				
			||||||
        if (!Objects.equals(globalAPIKey, "null") && !silence) {
 | 
					 | 
				
			||||||
            System.out.println("[DeepJ] Looks like you have defined a global API key already! You can use if by just typing \"new Traslator()\"" + "\n instead of \"new Translator(String authKey)\". NOTE: This will work but this is just some advice :)");
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        request = new Request(apiKey);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    public static void setGlobalAPIKey(String key) {
 | 
					 | 
				
			||||||
        globalAPIKey = key;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    public static TranslatorBuilder newBuilder() {
 | 
					 | 
				
			||||||
        return new TranslatorBuilder();
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    public void setAPIKey(String key) {
 | 
					 | 
				
			||||||
        request.setAuthKey(key);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    public String getAPIKey() {
 | 
					 | 
				
			||||||
        return request.authKey;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    public String translate(Language langToTranslateTo, String sourceMessage) {
 | 
					 | 
				
			||||||
        if (request.authKey == "null") {
 | 
					 | 
				
			||||||
            System.out.println("[DeepJ] This translator is closed! Please re-create!");
 | 
					 | 
				
			||||||
            return "null";
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        String response = "Error processing request";
 | 
					 | 
				
			||||||
        try {
 | 
					 | 
				
			||||||
            response = request.queryAPI(langToTranslateTo, sourceMessage);
 | 
					 | 
				
			||||||
        } catch (IOException | InterruptedException e) {
 | 
					 | 
				
			||||||
            System.out.println(response);
 | 
					 | 
				
			||||||
            e.printStackTrace();
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        String message = "Error Processing Request (Note: This could be due to the api updating or your api being taxed to often)";
 | 
					 | 
				
			||||||
        JSONObject jsonObject = new JSONObject(response);
 | 
					 | 
				
			||||||
        JSONArray jsonArray = jsonObject.getJSONArray("translations");
 | 
					 | 
				
			||||||
        for (int i = 0; i < jsonArray.length(); i++) {
 | 
					 | 
				
			||||||
            JSONObject jsonObject1 = jsonArray.getJSONObject(i);
 | 
					 | 
				
			||||||
            message = jsonObject1.getString("text");
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        return message;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    protected static class Request {
 | 
					 | 
				
			||||||
        public String authKey;
 | 
					 | 
				
			||||||
        public Request(String authKey) {
 | 
					 | 
				
			||||||
            this.authKey = authKey;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        public void setAuthKey(String key) {
 | 
					 | 
				
			||||||
            authKey = key;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        public String queryAPI(Language langEnum, String message) throws IOException, InterruptedException {
 | 
					 | 
				
			||||||
            String encodedAuthKey = URLEncoder.encode(authKey, StandardCharsets.UTF_8);
 | 
					 | 
				
			||||||
            String encodedMessage = URLEncoder.encode(message, StandardCharsets.UTF_8);
 | 
					 | 
				
			||||||
            HttpClient client = HttpClient.newHttpClient();
 | 
					 | 
				
			||||||
            URI deepLURI = URI.create("https://api-free.deepl.com/v2/translate?auth_key="+encodedAuthKey+"&target_lang="+langEnum.getApiString()+"&text="+encodedMessage);
 | 
					 | 
				
			||||||
            HttpRequest request = HttpRequest.newBuilder()
 | 
					 | 
				
			||||||
            .GET()
 | 
					 | 
				
			||||||
            .header("Accept","*/*")
 | 
					 | 
				
			||||||
            .header("Content-Type", "application/x-www-form-urlencoded")
 | 
					 | 
				
			||||||
            .uri(deepLURI)
 | 
					 | 
				
			||||||
            .build();
 | 
					 | 
				
			||||||
            HttpResponse<String> response = client.send(request,HttpResponse.BodyHandlers.ofString());
 | 
					 | 
				
			||||||
            return response.body();
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    public static class TranslatorBuilder {
 | 
					 | 
				
			||||||
        private boolean silent = false;
 | 
					 | 
				
			||||||
        private String authKey = null;
 | 
					 | 
				
			||||||
        private boolean GAK = false;
 | 
					 | 
				
			||||||
        public Translator build() {
 | 
					 | 
				
			||||||
            if (GAK) {
 | 
					 | 
				
			||||||
                return new Translator(silent);
 | 
					 | 
				
			||||||
            } else {
 | 
					 | 
				
			||||||
                return new Translator(authKey, silent);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        public TranslatorBuilder useGAK(boolean bool) {
 | 
					 | 
				
			||||||
            this.GAK = bool;
 | 
					 | 
				
			||||||
            return this;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        public TranslatorBuilder setAuthKey(String authKey) {
 | 
					 | 
				
			||||||
            this.authKey = authKey;
 | 
					 | 
				
			||||||
            return this;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        public TranslatorBuilder setSilent(boolean silent) {
 | 
					 | 
				
			||||||
            this.silent = silent;
 | 
					 | 
				
			||||||
            return this;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    public enum Language {
 | 
					 | 
				
			||||||
        Bulgarian("BG"),
 | 
					 | 
				
			||||||
        Czech("CS"),
 | 
					 | 
				
			||||||
        Danish("DA"),
 | 
					 | 
				
			||||||
        German("DE"),
 | 
					 | 
				
			||||||
        Greek("EL"),
 | 
					 | 
				
			||||||
        EnglishUK("EN-GB"),
 | 
					 | 
				
			||||||
        EnglishUS("EN-US"),
 | 
					 | 
				
			||||||
        Spanish("ES"),
 | 
					 | 
				
			||||||
        Estonian("ET"),
 | 
					 | 
				
			||||||
        Finish("FI"),
 | 
					 | 
				
			||||||
        French("FR"),
 | 
					 | 
				
			||||||
        Hungarian("HU"),
 | 
					 | 
				
			||||||
        Italian("IT"),
 | 
					 | 
				
			||||||
        Japanese("JA"),
 | 
					 | 
				
			||||||
        Lithuanian("LT"),
 | 
					 | 
				
			||||||
        Latvian("LV"),
 | 
					 | 
				
			||||||
        Dutch("NL"),
 | 
					 | 
				
			||||||
        Polish("PL"),
 | 
					 | 
				
			||||||
        PortugueseBrazil("PT-BR"),
 | 
					 | 
				
			||||||
        PortuguesePortugal("PT-PT"),
 | 
					 | 
				
			||||||
        Romanian("RO"),
 | 
					 | 
				
			||||||
        Russian("RU"),
 | 
					 | 
				
			||||||
        Slovak("SK"),
 | 
					 | 
				
			||||||
        Slovenian("SL"),
 | 
					 | 
				
			||||||
        Swedish("SV"),
 | 
					 | 
				
			||||||
        Chinese("ZH");
 | 
					 | 
				
			||||||
        private final String apiString;
 | 
					 | 
				
			||||||
        Language(String apiString) {
 | 
					 | 
				
			||||||
            this.apiString = apiString;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        public String getApiString() {
 | 
					 | 
				
			||||||
            return this.apiString;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										30
									
								
								src/main/java/tech/nevets/deepj/Languages.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								src/main/java/tech/nevets/deepj/Languages.java
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					package tech.nevets.deepj;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public enum Languages {
 | 
				
			||||||
 | 
					    BG,
 | 
				
			||||||
 | 
					    CS,
 | 
				
			||||||
 | 
					    DA,
 | 
				
			||||||
 | 
					    DE,
 | 
				
			||||||
 | 
					    EL,
 | 
				
			||||||
 | 
					    ENGB,
 | 
				
			||||||
 | 
					    ENUS,
 | 
				
			||||||
 | 
					    ES,
 | 
				
			||||||
 | 
					    ET,
 | 
				
			||||||
 | 
					    FI,
 | 
				
			||||||
 | 
					    FR,
 | 
				
			||||||
 | 
					    HU,
 | 
				
			||||||
 | 
					    IT,
 | 
				
			||||||
 | 
					    JA,
 | 
				
			||||||
 | 
					    LT,
 | 
				
			||||||
 | 
					    LV,
 | 
				
			||||||
 | 
					    NL,
 | 
				
			||||||
 | 
					    PL,
 | 
				
			||||||
 | 
					    PTBR,
 | 
				
			||||||
 | 
					    PTPT,
 | 
				
			||||||
 | 
					    RO,
 | 
				
			||||||
 | 
					    RU,
 | 
				
			||||||
 | 
					    SK,
 | 
				
			||||||
 | 
					    SL,
 | 
				
			||||||
 | 
					    SV,
 | 
				
			||||||
 | 
					    ZH
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										46
									
								
								src/main/java/tech/nevets/deepj/Request.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								src/main/java/tech/nevets/deepj/Request.java
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,46 @@
 | 
				
			|||||||
 | 
					package tech.nevets.deepj;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					import java.net.URI;
 | 
				
			||||||
 | 
					import java.net.URLEncoder;
 | 
				
			||||||
 | 
					import java.net.http.HttpClient;
 | 
				
			||||||
 | 
					import java.net.http.HttpRequest;
 | 
				
			||||||
 | 
					import java.net.http.HttpResponse;
 | 
				
			||||||
 | 
					import java.nio.charset.StandardCharsets;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class Request {
 | 
				
			||||||
 | 
					    public Request() {
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String get(String authKey, Enum<Languages> langEnum, String message) throws IOException, InterruptedException {
 | 
				
			||||||
 | 
					        String encodedAuthKey = URLEncoder.encode(authKey, StandardCharsets.UTF_8);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String lang;
 | 
				
			||||||
 | 
					        lang = langEnum.toString();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (langEnum == Languages.ENUS) {
 | 
				
			||||||
 | 
					            lang = "EN-US";
 | 
				
			||||||
 | 
					        } else if (langEnum == Languages.ENGB) {
 | 
				
			||||||
 | 
					            lang = "EN-GB";
 | 
				
			||||||
 | 
					        } else if (langEnum == Languages.PTBR) {
 | 
				
			||||||
 | 
					            lang = "PT-BR";
 | 
				
			||||||
 | 
					        } else if (langEnum == Languages.PTPT) {
 | 
				
			||||||
 | 
					            lang = "PT-PT";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String encodedMessage = URLEncoder.encode(message, StandardCharsets.UTF_8);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        HttpClient client = HttpClient.newHttpClient();
 | 
				
			||||||
 | 
					        HttpRequest request = HttpRequest.newBuilder()
 | 
				
			||||||
 | 
					                .GET()
 | 
				
			||||||
 | 
					                .header("Accept","*/*")
 | 
				
			||||||
 | 
					                .header("Content-Type", "application/x-www-form-urlencoded")
 | 
				
			||||||
 | 
					                .uri(URI.create("https://api-free.deepl.com/v2/translate?auth_key=" + encodedAuthKey + "&target_lang=" + lang + "&text=" + encodedMessage))
 | 
				
			||||||
 | 
					                .build();
 | 
				
			||||||
 | 
					        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String data = response.body();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return data;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										36
									
								
								src/main/java/tech/nevets/deepj/Translator.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								src/main/java/tech/nevets/deepj/Translator.java
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,36 @@
 | 
				
			|||||||
 | 
					package tech.nevets.deepj;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.json.JSONArray;
 | 
				
			||||||
 | 
					import org.json.JSONObject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class Translator {
 | 
				
			||||||
 | 
					    private final String authKey;
 | 
				
			||||||
 | 
					    Request r = new Request();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public Translator(String authKey) {
 | 
				
			||||||
 | 
					        this.authKey = authKey;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    public String translate(Enum<Languages> lang, String sourceMessage) {
 | 
				
			||||||
 | 
					        String response = "Error processing request";
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            response = r.get(authKey, lang, sourceMessage);
 | 
				
			||||||
 | 
					        } catch (IOException | InterruptedException e) {
 | 
				
			||||||
 | 
					            System.out.println("Error processing request");
 | 
				
			||||||
 | 
					            e.printStackTrace();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String message = "Error Processing Request";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        JSONObject jo = new JSONObject(response);
 | 
				
			||||||
 | 
					        JSONArray ja = jo.getJSONArray("translations");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        for (int i = 0; i < ja.length(); i++) {
 | 
				
			||||||
 | 
					            JSONObject joo = ja.getJSONObject(i);
 | 
				
			||||||
 | 
					            message = joo.getString("text");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return message;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user