98 changed files with 3655 additions and 1778 deletions
@ -0,0 +1,18 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project version="4"> |
||||
|
<component name="DataSourceManagerImpl" format="xml" hash="1958173603"> |
||||
|
<data-source source="LOCAL" name="MySQL - telegrambot@localhost" uuid="2ce462a4-6cfe-4867-8503-3b86bc273db1"> |
||||
|
<driver-ref>mysql</driver-ref> |
||||
|
<synchronize>true</synchronize> |
||||
|
<jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver> |
||||
|
<jdbc-url>jdbc:mysql://localhost:3306/telegrambot</jdbc-url> |
||||
|
<driver-properties> |
||||
|
<property name="zeroDateTimeBehavior" value="convertToNull" /> |
||||
|
<property name="tinyInt1isBit" value="false" /> |
||||
|
<property name="characterEncoding" value="utf8" /> |
||||
|
<property name="characterSetResults" value="utf8" /> |
||||
|
<property name="yearIsDateType" value="false" /> |
||||
|
</driver-properties> |
||||
|
</data-source> |
||||
|
</component> |
||||
|
</project> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.5.1"> |
<library name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.5.4"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.5.1/jackson-annotations-2.5.1.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.5.4/jackson-annotations-2.5.4.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.5.1/jackson-annotations-2.5.1-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.5.4/jackson-annotations-2.5.4-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.5.1/jackson-annotations-2.5.1-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.5.4/jackson-annotations-2.5.4-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: com.fasterxml.jackson.core:jackson-core:2.5.1"> |
<library name="Maven: com.fasterxml.jackson.core:jackson-core:2.5.4"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.5.1/jackson-core-2.5.1.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.5.4/jackson-core-2.5.4.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.5.1/jackson-core-2.5.1-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.5.4/jackson-core-2.5.4-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.5.1/jackson-core-2.5.1-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.5.4/jackson-core-2.5.4-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: com.fasterxml.jackson.core:jackson-databind:2.5.1"> |
<library name="Maven: com.fasterxml.jackson.core:jackson-databind:2.5.4"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.5.1/jackson-databind-2.5.1.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.5.4/jackson-databind-2.5.4.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.5.1/jackson-databind-2.5.1-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.5.4/jackson-databind-2.5.4-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.5.1/jackson-databind-2.5.1-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.5.4/jackson-databind-2.5.4-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.5.1"> |
<library name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.5.4"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/jaxrs/jackson-jaxrs-base/2.5.1/jackson-jaxrs-base-2.5.1.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/jaxrs/jackson-jaxrs-base/2.5.4/jackson-jaxrs-base-2.5.4.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/jaxrs/jackson-jaxrs-base/2.5.1/jackson-jaxrs-base-2.5.1-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/jaxrs/jackson-jaxrs-base/2.5.4/jackson-jaxrs-base-2.5.4-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/jaxrs/jackson-jaxrs-base/2.5.1/jackson-jaxrs-base-2.5.1-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/jaxrs/jackson-jaxrs-base/2.5.4/jackson-jaxrs-base-2.5.4-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.5.1"> |
<library name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.5.4"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/jaxrs/jackson-jaxrs-json-provider/2.5.1/jackson-jaxrs-json-provider-2.5.1.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/jaxrs/jackson-jaxrs-json-provider/2.5.4/jackson-jaxrs-json-provider-2.5.4.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/jaxrs/jackson-jaxrs-json-provider/2.5.1/jackson-jaxrs-json-provider-2.5.1-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/jaxrs/jackson-jaxrs-json-provider/2.5.4/jackson-jaxrs-json-provider-2.5.4-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/jaxrs/jackson-jaxrs-json-provider/2.5.1/jackson-jaxrs-json-provider-2.5.1-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/jaxrs/jackson-jaxrs-json-provider/2.5.4/jackson-jaxrs-json-provider-2.5.4-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.5.1"> |
<library name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.5.4"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.5.1/jackson-module-jaxb-annotations-2.5.1.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.5.4/jackson-module-jaxb-annotations-2.5.4.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.5.1/jackson-module-jaxb-annotations-2.5.1-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.5.4/jackson-module-jaxb-annotations-2.5.4-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.5.1/jackson-module-jaxb-annotations-2.5.1-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.5.4/jackson-module-jaxb-annotations-2.5.4-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: mysql:mysql-connector-java:5.1.35"> |
<library name="Maven: mysql:mysql-connector-java:5.1.36"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/mysql/mysql-connector-java/5.1.35/mysql-connector-java-5.1.35.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/mysql/mysql-connector-java/5.1.36/mysql-connector-java-5.1.36.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/mysql/mysql-connector-java/5.1.35/mysql-connector-java-5.1.35-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/mysql/mysql-connector-java/5.1.36/mysql-connector-java-5.1.36-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/mysql/mysql-connector-java/5.1.35/mysql-connector-java-5.1.35-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/mysql/mysql-connector-java/5.1.36/mysql-connector-java-5.1.36-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.apache.httpcomponents:httpclient:4.5"> |
<library name="Maven: org.apache.httpcomponents:httpclient:4.5.1"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.5/httpclient-4.5.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.5.1/httpclient-4.5.1.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.5/httpclient-4.5-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.5.1/httpclient-4.5.1-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.5/httpclient-4.5-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.5.1/httpclient-4.5.1-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.apache.httpcomponents:httpcore:4.4.1"> |
<library name="Maven: org.apache.httpcomponents:httpcore:4.4.3"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.1/httpcore-4.4.1.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.3/httpcore-4.4.3.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.1/httpcore-4.4.1-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.3/httpcore-4.4.3-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.1/httpcore-4.4.1-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.3/httpcore-4.4.3-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.apache.httpcomponents:httpmime:4.5"> |
<library name="Maven: org.apache.httpcomponents:httpmime:4.5.1"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpmime/4.5/httpmime-4.5.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpmime/4.5.1/httpmime-4.5.1.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpmime/4.5/httpmime-4.5-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpmime/4.5.1/httpmime-4.5.1-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpmime/4.5/httpmime-4.5-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpmime/4.5.1/httpmime-4.5.1-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.grizzly:grizzly-framework:2.3.19"> |
<library name="Maven: org.glassfish.grizzly:grizzly-framework:2.3.22"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-framework/2.3.19/grizzly-framework-2.3.19.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-framework/2.3.22/grizzly-framework-2.3.22.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-framework/2.3.19/grizzly-framework-2.3.19-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-framework/2.3.22/grizzly-framework-2.3.22-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-framework/2.3.19/grizzly-framework-2.3.19-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-framework/2.3.22/grizzly-framework-2.3.22-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.grizzly:grizzly-http:2.3.19"> |
<library name="Maven: org.glassfish.grizzly:grizzly-http:2.3.22"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-http/2.3.19/grizzly-http-2.3.19.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-http/2.3.22/grizzly-http-2.3.22.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-http/2.3.19/grizzly-http-2.3.19-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-http/2.3.22/grizzly-http-2.3.22-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-http/2.3.19/grizzly-http-2.3.19-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-http/2.3.22/grizzly-http-2.3.22-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.grizzly:grizzly-http-server:2.3.19"> |
<library name="Maven: org.glassfish.grizzly:grizzly-http-server:2.3.22"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-http-server/2.3.19/grizzly-http-server-2.3.19.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-http-server/2.3.22/grizzly-http-server-2.3.22.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-http-server/2.3.19/grizzly-http-server-2.3.19-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-http-server/2.3.22/grizzly-http-server-2.3.22-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-http-server/2.3.19/grizzly-http-server-2.3.19-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/grizzly/grizzly-http-server/2.3.22/grizzly-http-server-2.3.22-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.hk2.external:aopalliance-repackaged:2.4.0-b12"> |
<library name="Maven: org.glassfish.hk2.external:aopalliance-repackaged:2.4.0-b31"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/aopalliance-repackaged/2.4.0-b12/aopalliance-repackaged-2.4.0-b12.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/aopalliance-repackaged/2.4.0-b31/aopalliance-repackaged-2.4.0-b31.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/aopalliance-repackaged/2.4.0-b12/aopalliance-repackaged-2.4.0-b12-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/aopalliance-repackaged/2.4.0-b31/aopalliance-repackaged-2.4.0-b31-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/aopalliance-repackaged/2.4.0-b12/aopalliance-repackaged-2.4.0-b12-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/aopalliance-repackaged/2.4.0-b31/aopalliance-repackaged-2.4.0-b31-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.hk2.external:javax.inject:2.4.0-b12"> |
<library name="Maven: org.glassfish.hk2.external:javax.inject:2.4.0-b31"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/javax.inject/2.4.0-b12/javax.inject-2.4.0-b12.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/javax.inject/2.4.0-b31/javax.inject-2.4.0-b31.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/javax.inject/2.4.0-b12/javax.inject-2.4.0-b12-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/javax.inject/2.4.0-b31/javax.inject-2.4.0-b31-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/javax.inject/2.4.0-b12/javax.inject-2.4.0-b12-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/javax.inject/2.4.0-b31/javax.inject-2.4.0-b31-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.hk2:hk2-api:2.4.0-b12"> |
<library name="Maven: org.glassfish.hk2:hk2-api:2.4.0-b31"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-api/2.4.0-b12/hk2-api-2.4.0-b12.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-api/2.4.0-b31/hk2-api-2.4.0-b31.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-api/2.4.0-b12/hk2-api-2.4.0-b12-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-api/2.4.0-b31/hk2-api-2.4.0-b31-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-api/2.4.0-b12/hk2-api-2.4.0-b12-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-api/2.4.0-b31/hk2-api-2.4.0-b31-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.hk2:hk2-locator:2.4.0-b12"> |
<library name="Maven: org.glassfish.hk2:hk2-locator:2.4.0-b31"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-locator/2.4.0-b12/hk2-locator-2.4.0-b12.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-locator/2.4.0-b31/hk2-locator-2.4.0-b31.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-locator/2.4.0-b12/hk2-locator-2.4.0-b12-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-locator/2.4.0-b31/hk2-locator-2.4.0-b31-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-locator/2.4.0-b12/hk2-locator-2.4.0-b12-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-locator/2.4.0-b31/hk2-locator-2.4.0-b31-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.hk2:hk2-utils:2.4.0-b12"> |
<library name="Maven: org.glassfish.hk2:hk2-utils:2.4.0-b31"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-utils/2.4.0-b12/hk2-utils-2.4.0-b12.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-utils/2.4.0-b31/hk2-utils-2.4.0-b31.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-utils/2.4.0-b12/hk2-utils-2.4.0-b12-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-utils/2.4.0-b31/hk2-utils-2.4.0-b31-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-utils/2.4.0-b12/hk2-utils-2.4.0-b12-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-utils/2.4.0-b31/hk2-utils-2.4.0-b31-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.jersey.bundles.repackaged:jersey-guava:2.18"> |
<library name="Maven: org.glassfish.jersey.bundles.repackaged:jersey-guava:2.21"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/bundles/repackaged/jersey-guava/2.18/jersey-guava-2.18.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/bundles/repackaged/jersey-guava/2.21/jersey-guava-2.21.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/bundles/repackaged/jersey-guava/2.18/jersey-guava-2.18-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/bundles/repackaged/jersey-guava/2.21/jersey-guava-2.21-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/bundles/repackaged/jersey-guava/2.18/jersey-guava-2.18-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/bundles/repackaged/jersey-guava/2.21/jersey-guava-2.21-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.jersey.containers:jersey-container-grizzly2-http:2.18"> |
<library name="Maven: org.glassfish.jersey.containers:jersey-container-grizzly2-http:2.21"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/containers/jersey-container-grizzly2-http/2.18/jersey-container-grizzly2-http-2.18.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/containers/jersey-container-grizzly2-http/2.21/jersey-container-grizzly2-http-2.21.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/containers/jersey-container-grizzly2-http/2.18/jersey-container-grizzly2-http-2.18-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/containers/jersey-container-grizzly2-http/2.21/jersey-container-grizzly2-http-2.21-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/containers/jersey-container-grizzly2-http/2.18/jersey-container-grizzly2-http-2.18-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/containers/jersey-container-grizzly2-http/2.21/jersey-container-grizzly2-http-2.21-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.jersey.core:jersey-client:2.18"> |
<library name="Maven: org.glassfish.jersey.core:jersey-client:2.21"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-client/2.18/jersey-client-2.18.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-client/2.21/jersey-client-2.21.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-client/2.18/jersey-client-2.18-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-client/2.21/jersey-client-2.21-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-client/2.18/jersey-client-2.18-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-client/2.21/jersey-client-2.21-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.jersey.core:jersey-common:2.18"> |
<library name="Maven: org.glassfish.jersey.core:jersey-common:2.21"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-common/2.18/jersey-common-2.18.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-common/2.21/jersey-common-2.21.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-common/2.18/jersey-common-2.18-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-common/2.21/jersey-common-2.21-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-common/2.18/jersey-common-2.18-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-common/2.21/jersey-common-2.21-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.jersey.core:jersey-server:2.18"> |
<library name="Maven: org.glassfish.jersey.core:jersey-server:2.21"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-server/2.18/jersey-server-2.18.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-server/2.21/jersey-server-2.21.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-server/2.18/jersey-server-2.18-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-server/2.21/jersey-server-2.21-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-server/2.18/jersey-server-2.18-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-server/2.21/jersey-server-2.21-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.jersey.ext:jersey-entity-filtering:2.18"> |
<library name="Maven: org.glassfish.jersey.ext:jersey-entity-filtering:2.21"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/ext/jersey-entity-filtering/2.18/jersey-entity-filtering-2.18.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/ext/jersey-entity-filtering/2.21/jersey-entity-filtering-2.21.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/ext/jersey-entity-filtering/2.18/jersey-entity-filtering-2.18-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/ext/jersey-entity-filtering/2.21/jersey-entity-filtering-2.21-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/ext/jersey-entity-filtering/2.18/jersey-entity-filtering-2.18-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/ext/jersey-entity-filtering/2.21/jersey-entity-filtering-2.21-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.jersey.media:jersey-media-jaxb:2.18"> |
<library name="Maven: org.glassfish.jersey.media:jersey-media-jaxb:2.21"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/media/jersey-media-jaxb/2.18/jersey-media-jaxb-2.18.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/media/jersey-media-jaxb/2.21/jersey-media-jaxb-2.21.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/media/jersey-media-jaxb/2.18/jersey-media-jaxb-2.18-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/media/jersey-media-jaxb/2.21/jersey-media-jaxb-2.21-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/media/jersey-media-jaxb/2.18/jersey-media-jaxb-2.18-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/media/jersey-media-jaxb/2.21/jersey-media-jaxb-2.21-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +1,13 @@ |
|||||
<component name="libraryTable"> |
<component name="libraryTable"> |
||||
<library name="Maven: org.glassfish.jersey.media:jersey-media-json-jackson:2.18"> |
<library name="Maven: org.glassfish.jersey.media:jersey-media-json-jackson:2.21"> |
||||
<CLASSES> |
<CLASSES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/media/jersey-media-json-jackson/2.18/jersey-media-json-jackson-2.18.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/media/jersey-media-json-jackson/2.21/jersey-media-json-jackson-2.21.jar!/" /> |
||||
</CLASSES> |
</CLASSES> |
||||
<JAVADOC> |
<JAVADOC> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/media/jersey-media-json-jackson/2.18/jersey-media-json-jackson-2.18-javadoc.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/media/jersey-media-json-jackson/2.21/jersey-media-json-jackson-2.21-javadoc.jar!/" /> |
||||
</JAVADOC> |
</JAVADOC> |
||||
<SOURCES> |
<SOURCES> |
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/media/jersey-media-json-jackson/2.18/jersey-media-json-jackson-2.18-sources.jar!/" /> |
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/media/jersey-media-json-jackson/2.21/jersey-media-json-jackson-2.21-sources.jar!/" /> |
||||
</SOURCES> |
</SOURCES> |
||||
</library> |
</library> |
||||
</component> |
</component> |
||||
@ -1,13 +0,0 @@ |
|||||
<component name="libraryTable"> |
|
||||
<library name="Maven: org.jsoup:jsoup:1.8.2"> |
|
||||
<CLASSES> |
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jsoup/jsoup/1.8.2/jsoup-1.8.2.jar!/" /> |
|
||||
</CLASSES> |
|
||||
<JAVADOC> |
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jsoup/jsoup/1.8.2/jsoup-1.8.2-javadoc.jar!/" /> |
|
||||
</JAVADOC> |
|
||||
<SOURCES> |
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jsoup/jsoup/1.8.2/jsoup-1.8.2-sources.jar!/" /> |
|
||||
</SOURCES> |
|
||||
</library> |
|
||||
</component> |
|
||||
@ -0,0 +1,13 @@ |
|||||
|
<component name="libraryTable"> |
||||
|
<library name="Maven: org.jsoup:jsoup:1.8.3"> |
||||
|
<CLASSES> |
||||
|
<root url="jar://$MAVEN_REPOSITORY$/org/jsoup/jsoup/1.8.3/jsoup-1.8.3.jar!/" /> |
||||
|
</CLASSES> |
||||
|
<JAVADOC> |
||||
|
<root url="jar://$MAVEN_REPOSITORY$/org/jsoup/jsoup/1.8.3/jsoup-1.8.3-javadoc.jar!/" /> |
||||
|
</JAVADOC> |
||||
|
<SOURCES> |
||||
|
<root url="jar://$MAVEN_REPOSITORY$/org/jsoup/jsoup/1.8.3/jsoup-1.8.3-sources.jar!/" /> |
||||
|
</SOURCES> |
||||
|
</library> |
||||
|
</component> |
||||
File diff suppressed because it is too large
@ -1,38 +0,0 @@ |
|||||
package org.telegram.api; |
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
|
||||
import org.json.JSONObject; |
|
||||
|
|
||||
/** |
|
||||
* @author Ruben Bermudez |
|
||||
* @version 1.0 |
|
||||
* @brief This object represents a phone contact. |
|
||||
* @date 20 of June of 2015 |
|
||||
*/ |
|
||||
public class Contact { |
|
||||
|
|
||||
public static final String PHONENUMBER_FIELD = "phone_number"; |
|
||||
@JsonProperty(PHONENUMBER_FIELD) |
|
||||
private String phoneNumber; ///< Contact's phone number
|
|
||||
public static final String FIRSTNAME_FIELD = "first_name"; |
|
||||
@JsonProperty(FIRSTNAME_FIELD) |
|
||||
private String firstName; ///< Contact's first name
|
|
||||
public static final String LASTNAME_FIELD = "last_name"; |
|
||||
@JsonProperty(LASTNAME_FIELD) |
|
||||
private String lastName; ///< Optional. Contact's last name
|
|
||||
public static final String USERID_FIELD = "user_id"; |
|
||||
@JsonProperty(USERID_FIELD) |
|
||||
private Integer userID; ///< Optional. Contact's user identifier in Telegram
|
|
||||
|
|
||||
public Contact() { |
|
||||
super(); |
|
||||
} |
|
||||
|
|
||||
public Contact(JSONObject jsonObject) { |
|
||||
super(); |
|
||||
this.phoneNumber = jsonObject.getString(PHONENUMBER_FIELD); |
|
||||
this.firstName = jsonObject.getString(FIRSTNAME_FIELD); |
|
||||
this.lastName = jsonObject.optString(LASTNAME_FIELD, ""); |
|
||||
this.userID = jsonObject.optInt(USERID_FIELD, 0); |
|
||||
} |
|
||||
} |
|
||||
@ -1,70 +0,0 @@ |
|||||
package org.telegram.api; |
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
|
||||
import org.json.JSONObject; |
|
||||
|
|
||||
/** |
|
||||
* @author Ruben Bermudez |
|
||||
* @version 1.0 |
|
||||
* @brief This object represents one size of a photo or a file / sticker thumbnail. |
|
||||
* @date 20 of June of 2015 |
|
||||
*/ |
|
||||
public class PhotoSize { |
|
||||
|
|
||||
public static final String FILEID_FIELD = "file_id"; |
|
||||
@JsonProperty(FILEID_FIELD) |
|
||||
private String fileId; ///< Unique identifier for this file
|
|
||||
public static final String WIDTH_FIELD = "width"; |
|
||||
@JsonProperty(WIDTH_FIELD) |
|
||||
private Integer width; ///< Photo width
|
|
||||
public static final String HEIGHT_FIELD = "height"; |
|
||||
@JsonProperty(HEIGHT_FIELD) |
|
||||
private Integer height; ///< Photo height
|
|
||||
public static final String FILESIZE_FIELD = "file_size"; |
|
||||
@JsonProperty(FILESIZE_FIELD) |
|
||||
private Integer fileSize; ///< Optional. File size
|
|
||||
|
|
||||
public PhotoSize() { |
|
||||
super(); |
|
||||
} |
|
||||
|
|
||||
public PhotoSize(JSONObject jsonObject) { |
|
||||
super(); |
|
||||
this.fileId = jsonObject.optString(FILEID_FIELD, ""); |
|
||||
this.width = jsonObject.optInt(WIDTH_FIELD, 0); |
|
||||
this.height = jsonObject.optInt(HEIGHT_FIELD, 0); |
|
||||
this.fileSize = jsonObject.optInt(FILESIZE_FIELD, 0); |
|
||||
} |
|
||||
|
|
||||
public String getFileId() { |
|
||||
return fileId; |
|
||||
} |
|
||||
|
|
||||
public void setFileId(String fileId) { |
|
||||
this.fileId = fileId; |
|
||||
} |
|
||||
|
|
||||
public Integer getWidth() { |
|
||||
return width; |
|
||||
} |
|
||||
|
|
||||
public void setWidth(Integer width) { |
|
||||
this.width = width; |
|
||||
} |
|
||||
|
|
||||
public Integer getHeight() { |
|
||||
return height; |
|
||||
} |
|
||||
|
|
||||
public void setHeight(Integer height) { |
|
||||
this.height = height; |
|
||||
} |
|
||||
|
|
||||
public Integer getFileSize() { |
|
||||
return fileSize; |
|
||||
} |
|
||||
|
|
||||
public void setFileSize(Integer fileSize) { |
|
||||
this.fileSize = fileSize; |
|
||||
} |
|
||||
} |
|
||||
@ -1,13 +0,0 @@ |
|||||
package org.telegram.api; |
|
||||
|
|
||||
import org.json.JSONObject; |
|
||||
|
|
||||
/** |
|
||||
* @author Ruben Bermudez |
|
||||
* @version 1.0 |
|
||||
* @brief Reply keyboard abstract type |
|
||||
* @date 20 of June of 2015 |
|
||||
*/ |
|
||||
public interface ReplyKeyboard { |
|
||||
JSONObject toJson(); |
|
||||
} |
|
||||
@ -1,46 +0,0 @@ |
|||||
package org.telegram.api; |
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
|
||||
import org.json.JSONObject; |
|
||||
|
|
||||
/** |
|
||||
* @author Ruben Bermudez |
|
||||
* @version 1.0 |
|
||||
* @brief This object represents a sticker. |
|
||||
* @date 20 of June of 2015 |
|
||||
*/ |
|
||||
public class Sticker { |
|
||||
|
|
||||
public static final String FILEID_FIELD = "file_id"; |
|
||||
@JsonProperty(FILEID_FIELD) |
|
||||
private String fileId; ///< Unique identifier for this file
|
|
||||
public static final String WIDTH_FIELD = "width"; |
|
||||
@JsonProperty(WIDTH_FIELD) |
|
||||
private Integer width; ///< Sticker width
|
|
||||
public static final String HEIGHT_FIELD = "height"; |
|
||||
@JsonProperty(HEIGHT_FIELD) |
|
||||
private Integer height; ///< Sticker height
|
|
||||
public static final String THUMB_FIELD = "thumb"; |
|
||||
@JsonProperty(THUMB_FIELD) |
|
||||
private PhotoSize thumb; ///< Sticker thumbnail in .webp or .jpg format
|
|
||||
public static final String FILESIZE_FIELD = "file_size"; |
|
||||
@JsonProperty(FILESIZE_FIELD) |
|
||||
private Integer fileSize; ///< Optional. File size
|
|
||||
|
|
||||
public Sticker() { |
|
||||
super(); |
|
||||
} |
|
||||
|
|
||||
public Sticker(JSONObject jsonObject) { |
|
||||
super(); |
|
||||
this.fileId = jsonObject.getString(FILEID_FIELD); |
|
||||
this.width = jsonObject.getInt(WIDTH_FIELD); |
|
||||
this.height = jsonObject.getInt(HEIGHT_FIELD); |
|
||||
if (jsonObject.has(THUMB_FIELD)) { |
|
||||
this.thumb = new PhotoSize(jsonObject.getJSONObject(THUMB_FIELD)); |
|
||||
} else { |
|
||||
this.thumb = null; |
|
||||
} |
|
||||
this.fileSize = jsonObject.optInt(FILESIZE_FIELD, 0); |
|
||||
} |
|
||||
} |
|
||||
@ -1,55 +0,0 @@ |
|||||
package org.telegram.api; |
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
|
||||
import com.fasterxml.jackson.databind.PropertyNamingStrategy; |
|
||||
import org.json.JSONObject; |
|
||||
import sun.print.UnixPrintJob; |
|
||||
|
|
||||
/** |
|
||||
* @author Ruben Bermudez |
|
||||
* @version 1.0 |
|
||||
* @brief TODO |
|
||||
* @date 20 of June of 2015 |
|
||||
*/ |
|
||||
public class Update { |
|
||||
/* |
|
||||
update_id Integer |
|
||||
message Message |
|
||||
*/ |
|
||||
public static final String UPDATEID_FIELD = "update_id"; |
|
||||
/** |
|
||||
* The update‘s unique identifier. |
|
||||
* Update identifiers start from a certain positive number and increase sequentially. |
|
||||
* This ID becomes especially handy if you’re using Webhooks, |
|
||||
* since it allows you to ignore repeated updates or to restore the |
|
||||
* correct update sequence, should they get out of order. |
|
||||
*/ |
|
||||
@JsonProperty(UPDATEID_FIELD) |
|
||||
private Integer updateId; |
|
||||
public static final String MESSAGE_FIELD = "message"; |
|
||||
@JsonProperty(MESSAGE_FIELD) |
|
||||
private Message message; ///< Optional. New incoming message of any kind — text, photo, sticker, etc.
|
|
||||
|
|
||||
public Update() { |
|
||||
super(); |
|
||||
} |
|
||||
|
|
||||
public Update(JSONObject jsonObject) { |
|
||||
super(); |
|
||||
this.updateId = jsonObject.getInt(UPDATEID_FIELD); |
|
||||
JSONObject messageJSON = jsonObject.optJSONObject(MESSAGE_FIELD); |
|
||||
if (messageJSON == null) { |
|
||||
this.message = null; |
|
||||
} else { |
|
||||
this.message = new Message(messageJSON); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public Integer getUpdateId() { |
|
||||
return updateId; |
|
||||
} |
|
||||
|
|
||||
public Message getMessage() { |
|
||||
return message; |
|
||||
} |
|
||||
} |
|
||||
@ -1,54 +0,0 @@ |
|||||
package org.telegram.api; |
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
|
||||
import org.json.JSONObject; |
|
||||
|
|
||||
/** |
|
||||
* @author Ruben Bermudez |
|
||||
* @version 1.0 |
|
||||
* @brief This object represents a Telegram user or bot. |
|
||||
* @date 20 of June of 2015 |
|
||||
*/ |
|
||||
public class User { |
|
||||
|
|
||||
public static final String ID_FIELD = "id"; |
|
||||
@JsonProperty(ID_FIELD) |
|
||||
private Integer id; ///< Unique identifier for this user or bot
|
|
||||
public static final String FIRSTNAME_FIELD = "first_name"; |
|
||||
@JsonProperty(FIRSTNAME_FIELD) |
|
||||
private String firstName; ///< User‘s or bot’s first name
|
|
||||
public static final String LASTNAME_FIELD = "last_name"; |
|
||||
@JsonProperty(LASTNAME_FIELD) |
|
||||
private String lastName; ///< Optional. User‘s or bot’s last name
|
|
||||
public static final String USERNAME_FIELD = "username"; |
|
||||
@JsonProperty(USERNAME_FIELD) |
|
||||
private String userName; ///< Optional. User‘s or bot’s username
|
|
||||
|
|
||||
public User() { |
|
||||
super(); |
|
||||
} |
|
||||
|
|
||||
public User(JSONObject jsonObject) { |
|
||||
super(); |
|
||||
this.id = jsonObject.getInt(ID_FIELD); |
|
||||
this.firstName = jsonObject.getString(FIRSTNAME_FIELD); |
|
||||
this.lastName = jsonObject.optString(LASTNAME_FIELD, ""); |
|
||||
this.userName = jsonObject.optString(USERNAME_FIELD, ""); |
|
||||
} |
|
||||
|
|
||||
public Integer getId() { |
|
||||
return id; |
|
||||
} |
|
||||
|
|
||||
public String getFirstName() { |
|
||||
return firstName; |
|
||||
} |
|
||||
|
|
||||
public String getLastName() { |
|
||||
return lastName; |
|
||||
} |
|
||||
|
|
||||
public String getUserName() { |
|
||||
return userName; |
|
||||
} |
|
||||
} |
|
||||
@ -1,43 +0,0 @@ |
|||||
package org.telegram.api; |
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
|
||||
import org.json.JSONArray; |
|
||||
import org.json.JSONObject; |
|
||||
|
|
||||
import java.util.ArrayList; |
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author Ruben Bermudez |
|
||||
* @version 1.0 |
|
||||
* @brief This object represent a user's profile pictures. |
|
||||
* @date 22 of June of 2015 |
|
||||
*/ |
|
||||
public class UserProfilePhotos { |
|
||||
|
|
||||
public static final String TOTALCOUNT_FIELD = "total_count"; |
|
||||
@JsonProperty(TOTALCOUNT_FIELD) |
|
||||
private Integer totalCount; ///< Total number of profile pictures the target user has
|
|
||||
public static final String PHOTOS_FIELD = "photos"; |
|
||||
@JsonProperty(PHOTOS_FIELD) |
|
||||
private List<List<PhotoSize>> photos; ///< Requested profile pictures (in up to 4 sizes each)
|
|
||||
|
|
||||
public UserProfilePhotos() { |
|
||||
super(); |
|
||||
} |
|
||||
|
|
||||
public UserProfilePhotos(JSONObject jsonObject) { |
|
||||
super(); |
|
||||
this.totalCount = jsonObject.getInt(TOTALCOUNT_FIELD); |
|
||||
this.photos = new ArrayList<>(); |
|
||||
JSONArray photos = jsonObject.getJSONArray(PHOTOS_FIELD); |
|
||||
for (int i = 0; i < photos.length(); i++) { |
|
||||
JSONArray innerArray = photos.getJSONArray(i); |
|
||||
List<PhotoSize> innerPhotos = new ArrayList<>(); |
|
||||
for (int j = 0; j < innerArray.length(); j ++) { |
|
||||
innerPhotos.add(new PhotoSize(innerArray.getJSONObject(j))); |
|
||||
} |
|
||||
this.photos.add(innerPhotos); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,13 @@ |
|||||
|
package org.telegram.api.interfaces; |
||||
|
|
||||
|
import com.fasterxml.jackson.databind.JsonSerializable; |
||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief An object of Telegram Bots Api |
||||
|
* @date 07 of September of 2015 |
||||
|
*/ |
||||
|
public interface BotApiObject extends JsonSerializable { |
||||
|
} |
||||
@ -0,0 +1,18 @@ |
|||||
|
package org.telegram.api.interfaces; |
||||
|
|
||||
|
import org.json.JSONObject; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief Add conversion to JSON object |
||||
|
* @date 08 of September of 2015 |
||||
|
*/ |
||||
|
public interface IToJson { |
||||
|
|
||||
|
/** |
||||
|
* Convert to json object |
||||
|
* @return JSONObject created in the conversion |
||||
|
*/ |
||||
|
JSONObject toJson(); |
||||
|
} |
||||
@ -0,0 +1,28 @@ |
|||||
|
package org.telegram.api.methods; |
||||
|
|
||||
|
import com.fasterxml.jackson.databind.JsonSerializable; |
||||
|
import org.json.JSONObject; |
||||
|
import org.telegram.api.interfaces.IToJson; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief A method of Telegram Bots Api that is fully supported in json format |
||||
|
* @date 07 of September of 2015 |
||||
|
*/ |
||||
|
public abstract class BotApiMethod<T> implements JsonSerializable, IToJson { |
||||
|
protected static final String METHOD_FIELD = "method"; |
||||
|
|
||||
|
/** |
||||
|
* Getter for method path (that is the same as method name) |
||||
|
* @return Method path |
||||
|
*/ |
||||
|
public abstract String getPath(); |
||||
|
|
||||
|
/** |
||||
|
* Deserialize a json answer to the response type to a method |
||||
|
* @param answer Json answer received |
||||
|
* @return Answer for the method |
||||
|
*/ |
||||
|
public abstract T deserializeResponse(JSONObject answer); |
||||
|
} |
||||
@ -1,4 +1,4 @@ |
|||||
package org.telegram.methods; |
package org.telegram.api.methods; |
||||
|
|
||||
/** |
/** |
||||
* @author Ruben Bermudez |
* @author Ruben Bermudez |
||||
@ -0,0 +1,98 @@ |
|||||
|
package org.telegram.api.methods; |
||||
|
|
||||
|
import com.fasterxml.jackson.core.JsonGenerator; |
||||
|
import com.fasterxml.jackson.databind.SerializerProvider; |
||||
|
import com.fasterxml.jackson.databind.jsontype.TypeSerializer; |
||||
|
import org.json.JSONObject; |
||||
|
import org.telegram.api.objects.Message; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief Use this method to send text messages. On success, the sent Message is returned. |
||||
|
* @date 20 of June of 2015 |
||||
|
*/ |
||||
|
public class ForwardMessage extends BotApiMethod<Message> { |
||||
|
public static final String PATH = "forwardmessage"; |
||||
|
|
||||
|
public static final String CHATID_FIELD = "chat_id"; |
||||
|
private Integer chatId; ///< Unique identifier for the message recepient — User or GroupChat id
|
||||
|
public static final String FROMCHATID_FIELD = "from_chat_id"; |
||||
|
private Integer fromChatId; ///< Unique identifier for the chat where the original message was sent — User or GroupChat id
|
||||
|
public static final String MESSAGEID_FIELD = "message_id"; |
||||
|
private Integer messageId; ///< Unique message identifier
|
||||
|
|
||||
|
public ForwardMessage() { |
||||
|
super(); |
||||
|
} |
||||
|
|
||||
|
public Integer getChatId() { |
||||
|
return chatId; |
||||
|
} |
||||
|
|
||||
|
public void setChatId(Integer chatId) { |
||||
|
this.chatId = chatId; |
||||
|
} |
||||
|
|
||||
|
public Integer getFromChatId() { |
||||
|
return fromChatId; |
||||
|
} |
||||
|
|
||||
|
public void setFromChatId(Integer fromChatId) { |
||||
|
this.fromChatId = fromChatId; |
||||
|
} |
||||
|
|
||||
|
public Integer getMessageId() { |
||||
|
return messageId; |
||||
|
} |
||||
|
|
||||
|
public void setMessageId(Integer messageId) { |
||||
|
this.messageId = messageId; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(METHOD_FIELD, PATH); |
||||
|
gen.writeNumberField(CHATID_FIELD, chatId); |
||||
|
gen.writeNumberField(FROMCHATID_FIELD, fromChatId); |
||||
|
gen.writeNumberField(MESSAGEID_FIELD, messageId); |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(METHOD_FIELD, PATH); |
||||
|
gen.writeNumberField(CHATID_FIELD, chatId); |
||||
|
gen.writeNumberField(FROMCHATID_FIELD, fromChatId); |
||||
|
gen.writeNumberField(MESSAGEID_FIELD, messageId); |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public JSONObject toJson() { |
||||
|
JSONObject jsonObject = new JSONObject(); |
||||
|
jsonObject.put(CHATID_FIELD, chatId); |
||||
|
jsonObject.put(FROMCHATID_FIELD, fromChatId); |
||||
|
jsonObject.put(MESSAGEID_FIELD, messageId); |
||||
|
return jsonObject; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String getPath() { |
||||
|
return PATH; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Message deserializeResponse(JSONObject answer) { |
||||
|
if (answer.getBoolean("ok")) { |
||||
|
return new Message(answer.getJSONObject("result")); |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,79 @@ |
|||||
|
package org.telegram.api.methods; |
||||
|
|
||||
|
import com.fasterxml.jackson.core.JsonGenerator; |
||||
|
import com.fasterxml.jackson.databind.SerializerProvider; |
||||
|
import com.fasterxml.jackson.databind.jsontype.TypeSerializer; |
||||
|
import org.json.JSONObject; |
||||
|
import org.telegram.api.objects.File; |
||||
|
import org.telegram.api.objects.Message; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief Use this method to get basic info about a file and prepare it for downloading. |
||||
|
* For the moment, bots can download files of up to 20MB in size. |
||||
|
* On success, a File object is returned. |
||||
|
* The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>,
|
||||
|
* where <file_path> is taken from the response. |
||||
|
* It is guaranteed that the link will be valid for at least 1 hour. |
||||
|
* When the link expires, a new one can be requested by calling getFile again. |
||||
|
* @date 20 of June of 2015 |
||||
|
*/ |
||||
|
public class GetFile extends BotApiMethod<File> { |
||||
|
public static final String PATH = "getfield"; |
||||
|
|
||||
|
public static final String FILEID_FIELD = "file_id"; |
||||
|
private String fileId; ///< File identifier to get info about
|
||||
|
|
||||
|
public GetFile() { |
||||
|
super(); |
||||
|
} |
||||
|
|
||||
|
public String getFileId() { |
||||
|
return fileId; |
||||
|
} |
||||
|
|
||||
|
public void setFileId(String fileId) { |
||||
|
this.fileId = fileId; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(METHOD_FIELD, PATH); |
||||
|
gen.writeStringField(FILEID_FIELD, fileId); |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(METHOD_FIELD, PATH); |
||||
|
gen.writeStringField(FILEID_FIELD, fileId); |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public JSONObject toJson() { |
||||
|
JSONObject jsonObject = new JSONObject(); |
||||
|
jsonObject.put(FILEID_FIELD, fileId); |
||||
|
return jsonObject; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String getPath() { |
||||
|
return PATH; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public File deserializeResponse(JSONObject answer) { |
||||
|
if (answer.getBoolean("ok")) { |
||||
|
return new File(answer.getJSONObject("result")); |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,52 @@ |
|||||
|
package org.telegram.api.methods; |
||||
|
|
||||
|
import com.fasterxml.jackson.core.JsonGenerator; |
||||
|
import com.fasterxml.jackson.databind.SerializerProvider; |
||||
|
import com.fasterxml.jackson.databind.jsontype.TypeSerializer; |
||||
|
import org.json.JSONObject; |
||||
|
import org.telegram.api.objects.User; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief A simple method for testing your bot's auth token. Requires no parameters. |
||||
|
* Returns basic information about the bot in form of a User object |
||||
|
* @date 20 of June of 2015 |
||||
|
*/ |
||||
|
public class GetMe extends BotApiMethod<User> { |
||||
|
public static final String PATH = "getme"; |
||||
|
|
||||
|
@Override |
||||
|
public JSONObject toJson() { |
||||
|
return new JSONObject(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String getPath() { |
||||
|
return PATH; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public User deserializeResponse(JSONObject answer) { |
||||
|
if (answer.getBoolean("ok")) { |
||||
|
return new User(answer.getJSONObject("result")); |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(METHOD_FIELD, PATH); |
||||
|
gen.writeEndObject(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(METHOD_FIELD, PATH); |
||||
|
gen.writeEndObject(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,111 @@ |
|||||
|
package org.telegram.api.methods; |
||||
|
|
||||
|
import com.fasterxml.jackson.core.JsonGenerator; |
||||
|
import com.fasterxml.jackson.databind.SerializerProvider; |
||||
|
import com.fasterxml.jackson.databind.jsontype.TypeSerializer; |
||||
|
import org.json.JSONObject; |
||||
|
import org.telegram.api.objects.Message; |
||||
|
import org.telegram.api.objects.UserProfilePhotos; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object. |
||||
|
* @date 20 of June of 2015 |
||||
|
*/ |
||||
|
public class GetUserProfilePhotos extends BotApiMethod<UserProfilePhotos> { |
||||
|
public static final String PATH = "getuserprofilephotos"; |
||||
|
|
||||
|
public static final String USERID_FIELD = "user_id"; |
||||
|
private Integer userId; ///< Unique identifier of the target user
|
||||
|
public static final String OFFSET_FIELD = "offset"; |
||||
|
/** |
||||
|
* Sequential number of the first photo to be returned. By default, all photos are returned. |
||||
|
*/ |
||||
|
private Integer offset; |
||||
|
public static final String LIMIT_FIELD = "limit"; |
||||
|
/** |
||||
|
* Optional. Limits the number of photos to be retrieved. Values between 1—100 are accepted. Defaults to 100. |
||||
|
*/ |
||||
|
private Integer limit; |
||||
|
|
||||
|
public GetUserProfilePhotos() { |
||||
|
super(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public Integer getUserId() { |
||||
|
return userId; |
||||
|
} |
||||
|
|
||||
|
public void setUserId(Integer userId) { |
||||
|
this.userId = userId; |
||||
|
} |
||||
|
|
||||
|
public Integer getOffset() { |
||||
|
return offset; |
||||
|
} |
||||
|
|
||||
|
public void setOffset(Integer offset) { |
||||
|
this.offset = offset; |
||||
|
} |
||||
|
|
||||
|
public Integer getLimit() { |
||||
|
return limit; |
||||
|
} |
||||
|
|
||||
|
public void setLimit(Integer limit) { |
||||
|
this.limit = limit; |
||||
|
} |
||||
|
@Override |
||||
|
public JSONObject toJson() { |
||||
|
JSONObject jsonObject = new JSONObject(); |
||||
|
jsonObject.put(USERID_FIELD, userId); |
||||
|
jsonObject.put(OFFSET_FIELD, offset); |
||||
|
if (limit != null) { |
||||
|
jsonObject.put(LIMIT_FIELD, limit); |
||||
|
} |
||||
|
return jsonObject; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String getPath() { |
||||
|
return PATH; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public UserProfilePhotos deserializeResponse(JSONObject answer) { |
||||
|
if (answer.getBoolean("ok")) { |
||||
|
return new UserProfilePhotos(answer.getJSONObject("result")); |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(METHOD_FIELD, PATH); |
||||
|
gen.writeNumberField(USERID_FIELD, userId); |
||||
|
gen.writeNumberField(OFFSET_FIELD, offset); |
||||
|
if (limit != null) { |
||||
|
gen.writeNumberField(LIMIT_FIELD, limit); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(METHOD_FIELD, PATH); |
||||
|
gen.writeNumberField(USERID_FIELD, userId); |
||||
|
gen.writeNumberField(OFFSET_FIELD, offset); |
||||
|
if (limit != null) { |
||||
|
gen.writeNumberField(LIMIT_FIELD, limit); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,89 @@ |
|||||
|
package org.telegram.api.methods; |
||||
|
|
||||
|
import com.fasterxml.jackson.core.JsonGenerator; |
||||
|
import com.fasterxml.jackson.databind.SerializerProvider; |
||||
|
import com.fasterxml.jackson.databind.jsontype.TypeSerializer; |
||||
|
import org.json.JSONObject; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief Use this method when you need to tell the user that something is happening on the bot's side. |
||||
|
* The status is set for 5 seconds or less (when a message arrives from your bot, |
||||
|
* Telegram clients clear its typing status). |
||||
|
* @date 20 of June of 2015 |
||||
|
*/ |
||||
|
public class SendChatAction extends BotApiMethod<Boolean>{ |
||||
|
|
||||
|
public static final String PATH = "sendChatAction"; |
||||
|
|
||||
|
public static final String CHATID_FIELD = "chat_id"; |
||||
|
private Integer chatId; ///< Unique identifier for the message recepient — User or GroupChat id
|
||||
|
public static final String ACTION_FIELD = "action"; |
||||
|
/** |
||||
|
* Type of action to broadcast. |
||||
|
* Choose one, depending on what the user is about to receive: |
||||
|
* 'typing' for text messages |
||||
|
* 'upload_photo' for photos |
||||
|
* 'record_video' or 'upload_video' for videos |
||||
|
* 'record_audio' or 'upload_audio' for audio files |
||||
|
* 'upload_document' for general files, |
||||
|
* 'find_location' for location data. |
||||
|
*/ |
||||
|
private String action; |
||||
|
|
||||
|
public Integer getChatId() { |
||||
|
return chatId; |
||||
|
} |
||||
|
|
||||
|
public void setChatId(Integer chatId) { |
||||
|
this.chatId = chatId; |
||||
|
} |
||||
|
|
||||
|
public String getAction() { |
||||
|
return action; |
||||
|
} |
||||
|
|
||||
|
public void setAction(String action) { |
||||
|
this.action = action; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String getPath() { |
||||
|
return PATH; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Boolean deserializeResponse(JSONObject answer) { |
||||
|
if (answer.getBoolean("ok")) { |
||||
|
return answer.getBoolean("result"); |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public JSONObject toJson() { |
||||
|
JSONObject jsonObject = new JSONObject(); |
||||
|
jsonObject.put(CHATID_FIELD, chatId); |
||||
|
jsonObject.put(ACTION_FIELD, action); |
||||
|
return jsonObject; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeNumberField(CHATID_FIELD, chatId); |
||||
|
gen.writeStringField(ACTION_FIELD, action); |
||||
|
gen.writeEndObject(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeNumberField(CHATID_FIELD, chatId); |
||||
|
gen.writeStringField(ACTION_FIELD, action); |
||||
|
gen.writeEndObject(); |
||||
|
} |
||||
|
} |
||||
@ -1,6 +1,6 @@ |
|||||
package org.telegram.methods; |
package org.telegram.api.methods; |
||||
|
|
||||
import org.telegram.api.ReplyKeyboard; |
import org.telegram.api.objects.ReplyKeyboard; |
||||
|
|
||||
/** |
/** |
||||
* @author Ruben Bermudez |
* @author Ruben Bermudez |
||||
@ -0,0 +1,137 @@ |
|||||
|
package org.telegram.api.methods; |
||||
|
|
||||
|
import com.fasterxml.jackson.core.JsonGenerator; |
||||
|
import com.fasterxml.jackson.databind.SerializerProvider; |
||||
|
import com.fasterxml.jackson.databind.jsontype.TypeSerializer; |
||||
|
import org.json.JSONObject; |
||||
|
import org.telegram.api.objects.Message; |
||||
|
import org.telegram.api.objects.ReplyKeyboard; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief Use this method to send point on the map. On success, the sent Message is returned. |
||||
|
* @date 20 of June of 2015 |
||||
|
*/ |
||||
|
public class SendLocation extends BotApiMethod<Message> { |
||||
|
public static final String PATH = "sendlocation"; |
||||
|
|
||||
|
public static final String CHATID_FIELD = "chat_id"; |
||||
|
private Integer chatId; ///< Unique identifier for the message recepient — User or GroupChat id
|
||||
|
public static final String LATITUDE_FIELD = "latitude"; |
||||
|
private Float latitude; ///< Latitude of location
|
||||
|
public static final String LONGITUDE_FIELD = "longitude"; |
||||
|
private Float longitude; ///< Longitude of location
|
||||
|
public static final String REPLYTOMESSAGEID_FIELD = "reply_to_message_id"; |
||||
|
private Integer replayToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
||||
|
public static final String REPLYMARKUP_FIELD = "reply_markup"; |
||||
|
private ReplyKeyboard replayMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
||||
|
|
||||
|
public Integer getChatId() { |
||||
|
return chatId; |
||||
|
} |
||||
|
|
||||
|
public void setChatId(Integer chatId) { |
||||
|
this.chatId = chatId; |
||||
|
} |
||||
|
|
||||
|
public Float getLatitude() { |
||||
|
return latitude; |
||||
|
} |
||||
|
|
||||
|
public void setLatitude(Float latitude) { |
||||
|
this.latitude = latitude; |
||||
|
} |
||||
|
|
||||
|
public Float getLongitude() { |
||||
|
return longitude; |
||||
|
} |
||||
|
|
||||
|
public void setLongitude(Float longitude) { |
||||
|
this.longitude = longitude; |
||||
|
} |
||||
|
|
||||
|
public Integer getReplayToMessageId() { |
||||
|
return replayToMessageId; |
||||
|
} |
||||
|
|
||||
|
public void setReplayToMessageId(Integer replayToMessageId) { |
||||
|
this.replayToMessageId = replayToMessageId; |
||||
|
} |
||||
|
|
||||
|
public ReplyKeyboard getReplayMarkup() { |
||||
|
return replayMarkup; |
||||
|
} |
||||
|
|
||||
|
public void setReplayMarkup(ReplyKeyboard replayMarkup) { |
||||
|
this.replayMarkup = replayMarkup; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String getPath() { |
||||
|
return PATH; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Message deserializeResponse(JSONObject answer) { |
||||
|
if (answer.getBoolean("ok")) { |
||||
|
return new Message(answer.getJSONObject("result")); |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public JSONObject toJson() { |
||||
|
JSONObject jsonObject = new JSONObject(); |
||||
|
|
||||
|
jsonObject.put(CHATID_FIELD, chatId); |
||||
|
jsonObject.put(LATITUDE_FIELD, latitude); |
||||
|
jsonObject.put(LONGITUDE_FIELD, longitude); |
||||
|
if (replayToMessageId != null) { |
||||
|
jsonObject.put(REPLYTOMESSAGEID_FIELD, replayToMessageId); |
||||
|
} |
||||
|
if (replayMarkup != null) { |
||||
|
jsonObject.put(REPLYMARKUP_FIELD, replayMarkup.toJson()); |
||||
|
} |
||||
|
|
||||
|
return jsonObject; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(METHOD_FIELD, PATH); |
||||
|
gen.writeNumberField(CHATID_FIELD, chatId); |
||||
|
gen.writeNumberField(LATITUDE_FIELD, latitude); |
||||
|
gen.writeNumberField(LONGITUDE_FIELD, longitude); |
||||
|
if (replayToMessageId != null) { |
||||
|
gen.writeNumberField(REPLYTOMESSAGEID_FIELD, replayToMessageId); |
||||
|
} |
||||
|
if (replayMarkup != null) { |
||||
|
gen.writeObjectField(REPLYMARKUP_FIELD, replayMarkup); |
||||
|
} |
||||
|
|
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(METHOD_FIELD, PATH); |
||||
|
gen.writeNumberField(CHATID_FIELD, chatId); |
||||
|
gen.writeNumberField(LATITUDE_FIELD, latitude); |
||||
|
gen.writeNumberField(LONGITUDE_FIELD, longitude); |
||||
|
if (replayToMessageId != null) { |
||||
|
gen.writeNumberField(REPLYTOMESSAGEID_FIELD, replayToMessageId); |
||||
|
} |
||||
|
if (replayMarkup != null) { |
||||
|
gen.writeObjectField(REPLYMARKUP_FIELD, replayMarkup); |
||||
|
} |
||||
|
|
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,168 @@ |
|||||
|
package org.telegram.api.methods; |
||||
|
|
||||
|
import com.fasterxml.jackson.core.JsonGenerator; |
||||
|
import com.fasterxml.jackson.databind.SerializerProvider; |
||||
|
import com.fasterxml.jackson.databind.jsontype.TypeSerializer; |
||||
|
import org.json.JSONObject; |
||||
|
import org.telegram.api.objects.Message; |
||||
|
import org.telegram.api.objects.ReplyKeyboard; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief Use this method to send text messages. On success, the sent Message is returned. |
||||
|
* @date 20 of June of 2015 |
||||
|
*/ |
||||
|
public class SendMessage extends BotApiMethod<Message> { |
||||
|
public static final String PATH = "sendmessage"; |
||||
|
|
||||
|
public static final String CHATID_FIELD = "chat_id"; |
||||
|
private Integer chatId; ///< Unique identifier for the message recepient — User or GroupChat id
|
||||
|
public static final String TEXT_FIELD = "text"; |
||||
|
private String text; ///< Text of the message to be sent
|
||||
|
public static final String PARSEMODE_FIELD = "parse_mode"; |
||||
|
private String parseMode; ///< Optional. Send Markdown, if you want Telegram apps to show bold, italic and URL text in your bot's message.
|
||||
|
public static final String DISABLEWEBPAGEPREVIEW_FIELD = "disable_web_page_preview"; |
||||
|
private Boolean disableWebPagePreview; ///< Optional. Disables link previews for links in this message
|
||||
|
public static final String REPLYTOMESSAGEID_FIELD = "reply_to_message_id"; |
||||
|
private Integer replayToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
||||
|
public static final String REPLYMARKUP_FIELD = "reply_markup"; |
||||
|
private ReplyKeyboard replayMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
||||
|
|
||||
|
public SendMessage() { |
||||
|
super(); |
||||
|
} |
||||
|
|
||||
|
public Integer getChatId() { |
||||
|
return chatId; |
||||
|
} |
||||
|
|
||||
|
public void setChatId(Integer chatId) { |
||||
|
this.chatId = chatId; |
||||
|
} |
||||
|
|
||||
|
public String getText() { |
||||
|
return text; |
||||
|
} |
||||
|
|
||||
|
public void setText(String text) { |
||||
|
this.text = text; |
||||
|
} |
||||
|
|
||||
|
public Integer getReplayToMessageId() { |
||||
|
return replayToMessageId; |
||||
|
} |
||||
|
|
||||
|
public void setReplayToMessageId(Integer replayToMessageId) { |
||||
|
this.replayToMessageId = replayToMessageId; |
||||
|
} |
||||
|
|
||||
|
public ReplyKeyboard getReplayMarkup() { |
||||
|
return replayMarkup; |
||||
|
} |
||||
|
|
||||
|
public void setReplayMarkup(ReplyKeyboard replayMarkup) { |
||||
|
this.replayMarkup = replayMarkup; |
||||
|
} |
||||
|
|
||||
|
public Boolean getDisableWebPagePreview() { |
||||
|
return disableWebPagePreview; |
||||
|
} |
||||
|
|
||||
|
public void setDisableWebPagePreview(Boolean disableWebPagePreview) { |
||||
|
this.disableWebPagePreview = disableWebPagePreview; |
||||
|
} |
||||
|
|
||||
|
public void enableMarkdown(boolean enable) { |
||||
|
if (enable) { |
||||
|
this.parseMode = "Markdown"; |
||||
|
} else { |
||||
|
this.parseMode = null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public JSONObject toJson() { |
||||
|
JSONObject jsonObject = new JSONObject(); |
||||
|
|
||||
|
jsonObject.put(CHATID_FIELD, chatId); |
||||
|
jsonObject.put(TEXT_FIELD, text); |
||||
|
if (parseMode != null) { |
||||
|
jsonObject.put(PARSEMODE_FIELD, parseMode); |
||||
|
} |
||||
|
if (disableWebPagePreview != null) { |
||||
|
jsonObject.put(DISABLEWEBPAGEPREVIEW_FIELD, disableWebPagePreview); |
||||
|
} |
||||
|
if (replayToMessageId != null) { |
||||
|
jsonObject.put(REPLYTOMESSAGEID_FIELD, replayToMessageId); |
||||
|
} |
||||
|
if (replayMarkup != null) { |
||||
|
jsonObject.put(REPLYMARKUP_FIELD, replayMarkup.toJson()); |
||||
|
} |
||||
|
|
||||
|
return jsonObject; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String getPath() { |
||||
|
return PATH; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Message deserializeResponse(JSONObject answer) { |
||||
|
if (answer.getBoolean("ok")) { |
||||
|
return new Message(answer.getJSONObject("result")); |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(METHOD_FIELD, PATH); |
||||
|
gen.writeNumberField(CHATID_FIELD, chatId); |
||||
|
gen.writeStringField(TEXT_FIELD, text); |
||||
|
|
||||
|
if (parseMode != null) { |
||||
|
gen.writeStringField(PARSEMODE_FIELD, parseMode); |
||||
|
} |
||||
|
if (disableWebPagePreview != null) { |
||||
|
gen.writeBooleanField(DISABLEWEBPAGEPREVIEW_FIELD, disableWebPagePreview); |
||||
|
} |
||||
|
if (replayToMessageId != null) { |
||||
|
gen.writeNumberField(REPLYTOMESSAGEID_FIELD, replayToMessageId); |
||||
|
} |
||||
|
if (replayMarkup != null) { |
||||
|
gen.writeObjectField(REPLYMARKUP_FIELD, replayMarkup); |
||||
|
} |
||||
|
|
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(METHOD_FIELD, PATH); |
||||
|
gen.writeNumberField(CHATID_FIELD, chatId); |
||||
|
gen.writeStringField(TEXT_FIELD, text); |
||||
|
|
||||
|
if (parseMode != null) { |
||||
|
gen.writeStringField(PARSEMODE_FIELD, parseMode); |
||||
|
} |
||||
|
if (disableWebPagePreview != null) { |
||||
|
gen.writeBooleanField(DISABLEWEBPAGEPREVIEW_FIELD, disableWebPagePreview); |
||||
|
} |
||||
|
if (replayToMessageId != null) { |
||||
|
gen.writeNumberField(REPLYTOMESSAGEID_FIELD, replayToMessageId); |
||||
|
} |
||||
|
if (replayMarkup != null) { |
||||
|
gen.writeObjectField(REPLYMARKUP_FIELD, replayMarkup); |
||||
|
} |
||||
|
|
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
} |
||||
@ -1,6 +1,6 @@ |
|||||
package org.telegram.methods; |
package org.telegram.api.methods; |
||||
|
|
||||
import org.telegram.api.ReplyKeyboard; |
import org.telegram.api.objects.ReplyKeyboard; |
||||
|
|
||||
/** |
/** |
||||
* @author Ruben Bermudez |
* @author Ruben Bermudez |
||||
@ -1,6 +1,6 @@ |
|||||
package org.telegram.methods; |
package org.telegram.api.methods; |
||||
|
|
||||
import org.telegram.api.ReplyKeyboard; |
import org.telegram.api.objects.ReplyKeyboard; |
||||
|
|
||||
/** |
/** |
||||
* @author Ruben Bermudez |
* @author Ruben Bermudez |
||||
@ -1,6 +1,6 @@ |
|||||
package org.telegram.methods; |
package org.telegram.api.methods; |
||||
|
|
||||
import org.telegram.api.ReplyKeyboard; |
import org.telegram.api.objects.ReplyKeyboard; |
||||
|
|
||||
/** |
/** |
||||
* @author Ruben Bermudez |
* @author Ruben Bermudez |
||||
@ -1,6 +1,6 @@ |
|||||
package org.telegram.methods; |
package org.telegram.api.methods; |
||||
|
|
||||
import org.telegram.api.ReplyKeyboard; |
import org.telegram.api.objects.ReplyKeyboard; |
||||
|
|
||||
/** |
/** |
||||
* @author Ruben Bermudez |
* @author Ruben Bermudez |
||||
@ -0,0 +1,39 @@ |
|||||
|
package org.telegram.api.methods; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief Use this method to specify a url and receive incoming updates via an outgoing webhook. |
||||
|
* Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, |
||||
|
* containing a JSON-serialized Update. In case of an unsuccessful request, |
||||
|
* we will give up after a reasonable amount of attempts. |
||||
|
* @date 20 of June of 2015 |
||||
|
*/ |
||||
|
public class SetWebhook { |
||||
|
public static final String PATH = "setwebhook"; |
||||
|
|
||||
|
public static final String URL_FIELD = "url"; |
||||
|
private String url; ///< Optional. HTTPS url to send updates to. Use an empty string to remove webhook integration
|
||||
|
public static final String CERTIFICATE_FIELD = "certificate"; |
||||
|
private String certificateFile; ///< Optional. Upload your public key certificate so that the root certificate in use can be checked
|
||||
|
|
||||
|
public SetWebhook() { |
||||
|
this.url = ""; |
||||
|
} |
||||
|
|
||||
|
public String getUrl() { |
||||
|
return url; |
||||
|
} |
||||
|
|
||||
|
public void setUrl(String url) { |
||||
|
this.url = url; |
||||
|
} |
||||
|
|
||||
|
public String getCertificateFile() { |
||||
|
return certificateFile; |
||||
|
} |
||||
|
|
||||
|
public void setCertificateFile(String certificateFile) { |
||||
|
this.certificateFile = certificateFile; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package org.telegram.api.objects; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import com.fasterxml.jackson.core.JsonGenerator; |
||||
|
import com.fasterxml.jackson.databind.SerializerProvider; |
||||
|
import com.fasterxml.jackson.databind.jsontype.TypeSerializer; |
||||
|
import org.json.JSONObject; |
||||
|
import org.telegram.api.interfaces.BotApiObject; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief This object represents a phone contact. |
||||
|
* @date 20 of June of 2015 |
||||
|
*/ |
||||
|
public class Contact implements BotApiObject { |
||||
|
|
||||
|
public static final String PHONENUMBER_FIELD = "phone_number"; |
||||
|
@JsonProperty(PHONENUMBER_FIELD) |
||||
|
private String phoneNumber; ///< Contact's phone number
|
||||
|
public static final String FIRSTNAME_FIELD = "first_name"; |
||||
|
@JsonProperty(FIRSTNAME_FIELD) |
||||
|
private String firstName; ///< Contact's first name
|
||||
|
public static final String LASTNAME_FIELD = "last_name"; |
||||
|
@JsonProperty(LASTNAME_FIELD) |
||||
|
private String lastName; ///< Optional. Contact's last name
|
||||
|
public static final String USERID_FIELD = "user_id"; |
||||
|
@JsonProperty(USERID_FIELD) |
||||
|
private Integer userID; ///< Optional. Contact's user identifier in Telegram
|
||||
|
|
||||
|
public Contact() { |
||||
|
super(); |
||||
|
} |
||||
|
|
||||
|
public Contact(JSONObject jsonObject) { |
||||
|
super(); |
||||
|
this.phoneNumber = jsonObject.getString(PHONENUMBER_FIELD); |
||||
|
this.firstName = jsonObject.getString(FIRSTNAME_FIELD); |
||||
|
if (jsonObject.has(LASTNAME_FIELD)) { |
||||
|
this.lastName = jsonObject.getString(LASTNAME_FIELD); |
||||
|
} |
||||
|
if (jsonObject.has(USERID_FIELD)) { |
||||
|
this.userID = jsonObject.getInt(USERID_FIELD); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(PHONENUMBER_FIELD, phoneNumber); |
||||
|
gen.writeStringField(FIRSTNAME_FIELD, firstName); |
||||
|
if (lastName != null) { |
||||
|
gen.writeStringField(LASTNAME_FIELD, lastName); |
||||
|
} |
||||
|
if (userID != null) { |
||||
|
gen.writeNumberField(USERID_FIELD, userID); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(PHONENUMBER_FIELD, phoneNumber); |
||||
|
gen.writeStringField(FIRSTNAME_FIELD, firstName); |
||||
|
if (lastName != null) { |
||||
|
gen.writeStringField(LASTNAME_FIELD, lastName); |
||||
|
} |
||||
|
if (userID != null) { |
||||
|
gen.writeNumberField(USERID_FIELD, userID); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,95 @@ |
|||||
|
package org.telegram.api.objects; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import com.fasterxml.jackson.core.JsonGenerator; |
||||
|
import com.fasterxml.jackson.databind.SerializerProvider; |
||||
|
import com.fasterxml.jackson.databind.jsontype.TypeSerializer; |
||||
|
import org.json.JSONObject; |
||||
|
import org.telegram.api.interfaces.BotApiObject; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief This object represents a file ready to be downloaded |
||||
|
* @date 24 of June of 2015 |
||||
|
*/ |
||||
|
public class File implements BotApiObject { |
||||
|
public static final String FILE_ID = "file_id"; |
||||
|
@JsonProperty(FILE_ID) |
||||
|
private String fileId; ///< Unique identifier for this file
|
||||
|
public static final String FILE_SIZE_FIELD = "file_size"; |
||||
|
@JsonProperty(FILE_SIZE_FIELD) |
||||
|
private Integer fileSize; ///< Optional. File size, if known
|
||||
|
public static final String FILE_PATH_FIELD = "first_name"; |
||||
|
@JsonProperty(FILE_PATH_FIELD) |
||||
|
private String filePath; ///< Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.
|
||||
|
|
||||
|
public File() { |
||||
|
super(); |
||||
|
} |
||||
|
|
||||
|
public File(JSONObject jsonObject) { |
||||
|
super(); |
||||
|
this.fileId = jsonObject.getString(FILE_ID); |
||||
|
if (jsonObject.has(FILE_SIZE_FIELD)) { |
||||
|
this.fileSize = jsonObject.getInt(FILE_SIZE_FIELD); |
||||
|
} |
||||
|
if (jsonObject.has(FILE_PATH_FIELD)) { |
||||
|
this.filePath = jsonObject.getString(FILE_PATH_FIELD); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public String getFileId() { |
||||
|
return fileId; |
||||
|
} |
||||
|
|
||||
|
public void setFileId(String fileId) { |
||||
|
this.fileId = fileId; |
||||
|
} |
||||
|
|
||||
|
public Integer getFileSize() { |
||||
|
return fileSize; |
||||
|
} |
||||
|
|
||||
|
public void setFileSize(Integer fileSize) { |
||||
|
this.fileSize = fileSize; |
||||
|
} |
||||
|
|
||||
|
public String getFilePath() { |
||||
|
return filePath; |
||||
|
} |
||||
|
|
||||
|
public void setFilePath(String filePath) { |
||||
|
this.filePath = filePath; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(FILE_ID, fileId); |
||||
|
if (fileSize != null) { |
||||
|
gen.writeNumberField(FILE_SIZE_FIELD, fileSize); |
||||
|
} |
||||
|
if (filePath != null) { |
||||
|
gen.writeStringField(FILE_PATH_FIELD, filePath); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(FILE_ID, fileId); |
||||
|
if (fileSize != null) { |
||||
|
gen.writeNumberField(FILE_SIZE_FIELD, fileSize); |
||||
|
} |
||||
|
if (filePath != null) { |
||||
|
gen.writeStringField(FILE_PATH_FIELD, filePath); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,104 @@ |
|||||
|
package org.telegram.api.objects; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import com.fasterxml.jackson.core.JsonGenerator; |
||||
|
import com.fasterxml.jackson.databind.SerializerProvider; |
||||
|
import com.fasterxml.jackson.databind.jsontype.TypeSerializer; |
||||
|
import org.json.JSONObject; |
||||
|
import org.telegram.api.interfaces.BotApiObject; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief This object represents one size of a photo or a file / sticker thumbnail. |
||||
|
* @date 20 of June of 2015 |
||||
|
*/ |
||||
|
public class PhotoSize implements BotApiObject { |
||||
|
|
||||
|
public static final String FILEID_FIELD = "file_id"; |
||||
|
@JsonProperty(FILEID_FIELD) |
||||
|
private String fileId; ///< Unique identifier for this file
|
||||
|
public static final String WIDTH_FIELD = "width"; |
||||
|
@JsonProperty(WIDTH_FIELD) |
||||
|
private Integer width; ///< Photo width
|
||||
|
public static final String HEIGHT_FIELD = "height"; |
||||
|
@JsonProperty(HEIGHT_FIELD) |
||||
|
private Integer height; ///< Photo height
|
||||
|
public static final String FILESIZE_FIELD = "file_size"; |
||||
|
@JsonProperty(FILESIZE_FIELD) |
||||
|
private Integer fileSize; ///< Optional. File size
|
||||
|
|
||||
|
public PhotoSize() { |
||||
|
super(); |
||||
|
} |
||||
|
|
||||
|
public PhotoSize(JSONObject jsonObject) { |
||||
|
super(); |
||||
|
this.fileId = jsonObject.getString(FILEID_FIELD); |
||||
|
this.width = jsonObject.getInt(WIDTH_FIELD); |
||||
|
this.height = jsonObject.getInt(HEIGHT_FIELD); |
||||
|
if (jsonObject.has(FILESIZE_FIELD)) { |
||||
|
this.fileSize = jsonObject.getInt(FILESIZE_FIELD); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public String getFileId() { |
||||
|
return fileId; |
||||
|
} |
||||
|
|
||||
|
public void setFileId(String fileId) { |
||||
|
this.fileId = fileId; |
||||
|
} |
||||
|
|
||||
|
public Integer getWidth() { |
||||
|
return width; |
||||
|
} |
||||
|
|
||||
|
public void setWidth(Integer width) { |
||||
|
this.width = width; |
||||
|
} |
||||
|
|
||||
|
public Integer getHeight() { |
||||
|
return height; |
||||
|
} |
||||
|
|
||||
|
public void setHeight(Integer height) { |
||||
|
this.height = height; |
||||
|
} |
||||
|
|
||||
|
public Integer getFileSize() { |
||||
|
return fileSize; |
||||
|
} |
||||
|
|
||||
|
public void setFileSize(Integer fileSize) { |
||||
|
this.fileSize = fileSize; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(FILEID_FIELD, fileId); |
||||
|
gen.writeNumberField(WIDTH_FIELD, width); |
||||
|
gen.writeNumberField(HEIGHT_FIELD, height); |
||||
|
if (fileSize != null) { |
||||
|
gen.writeNumberField(FILESIZE_FIELD, fileSize); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(FILEID_FIELD, fileId); |
||||
|
gen.writeNumberField(WIDTH_FIELD, width); |
||||
|
gen.writeNumberField(HEIGHT_FIELD, height); |
||||
|
if (fileSize != null) { |
||||
|
gen.writeNumberField(FILESIZE_FIELD, fileSize); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
package org.telegram.api.objects; |
||||
|
|
||||
|
import org.telegram.api.interfaces.BotApiObject; |
||||
|
import org.telegram.api.interfaces.IToJson; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief Reply keyboard abstract type |
||||
|
* @date 20 of June of 2015 |
||||
|
*/ |
||||
|
public interface ReplyKeyboard extends BotApiObject, IToJson { |
||||
|
} |
||||
@ -0,0 +1,84 @@ |
|||||
|
package org.telegram.api.objects; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import com.fasterxml.jackson.core.JsonGenerator; |
||||
|
import com.fasterxml.jackson.databind.SerializerProvider; |
||||
|
import com.fasterxml.jackson.databind.jsontype.TypeSerializer; |
||||
|
import org.json.JSONObject; |
||||
|
import org.telegram.api.interfaces.BotApiObject; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief This object represents a sticker. |
||||
|
* @date 20 of June of 2015 |
||||
|
*/ |
||||
|
public class Sticker implements BotApiObject { |
||||
|
|
||||
|
public static final String FILEID_FIELD = "file_id"; |
||||
|
@JsonProperty(FILEID_FIELD) |
||||
|
private String fileId; ///< Unique identifier for this file
|
||||
|
public static final String WIDTH_FIELD = "width"; |
||||
|
@JsonProperty(WIDTH_FIELD) |
||||
|
private Integer width; ///< Sticker width
|
||||
|
public static final String HEIGHT_FIELD = "height"; |
||||
|
@JsonProperty(HEIGHT_FIELD) |
||||
|
private Integer height; ///< Sticker height
|
||||
|
public static final String THUMB_FIELD = "thumb"; |
||||
|
@JsonProperty(THUMB_FIELD) |
||||
|
private PhotoSize thumb; ///< Optional. Sticker thumbnail in .webp or .jpg format
|
||||
|
public static final String FILESIZE_FIELD = "file_size"; |
||||
|
@JsonProperty(FILESIZE_FIELD) |
||||
|
private Integer fileSize; ///< Optional. File size
|
||||
|
|
||||
|
public Sticker() { |
||||
|
super(); |
||||
|
} |
||||
|
|
||||
|
public Sticker(JSONObject jsonObject) { |
||||
|
super(); |
||||
|
this.fileId = jsonObject.getString(FILEID_FIELD); |
||||
|
this.width = jsonObject.getInt(WIDTH_FIELD); |
||||
|
this.height = jsonObject.getInt(HEIGHT_FIELD); |
||||
|
if (jsonObject.has(THUMB_FIELD)) { |
||||
|
this.thumb = new PhotoSize(jsonObject.getJSONObject(THUMB_FIELD)); |
||||
|
} |
||||
|
if (jsonObject.has(FILESIZE_FIELD)) { |
||||
|
this.fileSize = jsonObject.getInt(FILESIZE_FIELD); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(FILEID_FIELD, fileId); |
||||
|
gen.writeNumberField(WIDTH_FIELD, width); |
||||
|
gen.writeNumberField(HEIGHT_FIELD, height); |
||||
|
if (thumb != null) { |
||||
|
gen.writeObjectField(THUMB_FIELD, thumb); |
||||
|
} |
||||
|
if (fileSize != null) { |
||||
|
gen.writeNumberField(FILESIZE_FIELD, fileSize); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeStringField(FILEID_FIELD, fileId); |
||||
|
gen.writeNumberField(WIDTH_FIELD, width); |
||||
|
gen.writeNumberField(HEIGHT_FIELD, height); |
||||
|
if (thumb != null) { |
||||
|
gen.writeObjectField(THUMB_FIELD, thumb); |
||||
|
} |
||||
|
if (fileSize != null) { |
||||
|
gen.writeNumberField(FILESIZE_FIELD, fileSize); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,74 @@ |
|||||
|
package org.telegram.api.objects; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import com.fasterxml.jackson.core.JsonGenerator; |
||||
|
import com.fasterxml.jackson.databind.SerializerProvider; |
||||
|
import com.fasterxml.jackson.databind.jsontype.TypeSerializer; |
||||
|
import org.json.JSONObject; |
||||
|
import org.telegram.api.interfaces.BotApiObject; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief TODO |
||||
|
* @date 20 of June of 2015 |
||||
|
*/ |
||||
|
public class Update implements BotApiObject { |
||||
|
public static final String UPDATEID_FIELD = "update_id"; |
||||
|
/** |
||||
|
* The update‘s unique identifier. |
||||
|
* Update identifiers start from a certain positive number and increase sequentially. |
||||
|
* This ID becomes especially handy if you’re using Webhooks, |
||||
|
* since it allows you to ignore repeated updates or to restore the |
||||
|
* correct update sequence, should they get out of order. |
||||
|
*/ |
||||
|
@JsonProperty(UPDATEID_FIELD) |
||||
|
private Integer updateId; |
||||
|
public static final String MESSAGE_FIELD = "message"; |
||||
|
@JsonProperty(MESSAGE_FIELD) |
||||
|
private Message message; ///< Optional. New incoming message of any kind — text, photo, sticker, etc.
|
||||
|
|
||||
|
public Update() { |
||||
|
super(); |
||||
|
} |
||||
|
|
||||
|
public Update(JSONObject jsonObject) { |
||||
|
super(); |
||||
|
this.updateId = jsonObject.getInt(UPDATEID_FIELD); |
||||
|
if (jsonObject.has(MESSAGE_FIELD)) { |
||||
|
this.message = new Message(jsonObject.getJSONObject(MESSAGE_FIELD)); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public Integer getUpdateId() { |
||||
|
return updateId; |
||||
|
} |
||||
|
|
||||
|
public Message getMessage() { |
||||
|
return message; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeNumberField(UPDATEID_FIELD, updateId); |
||||
|
if (message != null) { |
||||
|
gen.writeObjectField(MESSAGE_FIELD, message); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeNumberField(UPDATEID_FIELD, updateId); |
||||
|
if (message != null) { |
||||
|
gen.writeObjectField(MESSAGE_FIELD, message); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,94 @@ |
|||||
|
package org.telegram.api.objects; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import com.fasterxml.jackson.core.JsonGenerator; |
||||
|
import com.fasterxml.jackson.databind.SerializerProvider; |
||||
|
import com.fasterxml.jackson.databind.jsontype.TypeSerializer; |
||||
|
import org.json.JSONObject; |
||||
|
import org.telegram.api.interfaces.BotApiObject; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief This object represents a Telegram user or bot. |
||||
|
* @date 20 of June of 2015 |
||||
|
*/ |
||||
|
public class User implements BotApiObject { |
||||
|
|
||||
|
public static final String ID_FIELD = "id"; |
||||
|
@JsonProperty(ID_FIELD) |
||||
|
private Integer id; ///< Unique identifier for this user or bot
|
||||
|
public static final String FIRSTNAME_FIELD = "first_name"; |
||||
|
@JsonProperty(FIRSTNAME_FIELD) |
||||
|
private String firstName; ///< User‘s or bot’s first name
|
||||
|
public static final String LASTNAME_FIELD = "last_name"; |
||||
|
@JsonProperty(LASTNAME_FIELD) |
||||
|
private String lastName; ///< Optional. User‘s or bot’s last name
|
||||
|
public static final String USERNAME_FIELD = "username"; |
||||
|
@JsonProperty(USERNAME_FIELD) |
||||
|
private String userName; ///< Optional. User‘s or bot’s username
|
||||
|
|
||||
|
public User() { |
||||
|
super(); |
||||
|
} |
||||
|
|
||||
|
public User(JSONObject jsonObject) { |
||||
|
super(); |
||||
|
this.id = jsonObject.getInt(ID_FIELD); |
||||
|
this.firstName = jsonObject.getString(FIRSTNAME_FIELD); |
||||
|
if (jsonObject.has(LASTNAME_FIELD)) { |
||||
|
this.lastName = jsonObject.getString(LASTNAME_FIELD); |
||||
|
} |
||||
|
if (jsonObject.has(USERNAME_FIELD)) { |
||||
|
this.userName = jsonObject.getString(USERNAME_FIELD); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public Integer getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public String getFirstName() { |
||||
|
return firstName; |
||||
|
} |
||||
|
|
||||
|
public String getLastName() { |
||||
|
return lastName; |
||||
|
} |
||||
|
|
||||
|
public String getUserName() { |
||||
|
return userName; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeNumberField(ID_FIELD, id); |
||||
|
gen.writeStringField(FIRSTNAME_FIELD, firstName); |
||||
|
if (lastName != null) { |
||||
|
gen.writeStringField(LASTNAME_FIELD, lastName); |
||||
|
} |
||||
|
if (userName != null) { |
||||
|
gen.writeStringField(USERNAME_FIELD, userName); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeNumberField(ID_FIELD, id); |
||||
|
gen.writeStringField(FIRSTNAME_FIELD, firstName); |
||||
|
if (lastName != null) { |
||||
|
gen.writeStringField(LASTNAME_FIELD, lastName); |
||||
|
} |
||||
|
if (userName != null) { |
||||
|
gen.writeStringField(USERNAME_FIELD, userName); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,104 @@ |
|||||
|
package org.telegram.api.objects; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import com.fasterxml.jackson.core.JsonGenerator; |
||||
|
import com.fasterxml.jackson.databind.SerializerProvider; |
||||
|
import com.fasterxml.jackson.databind.jsontype.TypeSerializer; |
||||
|
import org.json.JSONArray; |
||||
|
import org.json.JSONObject; |
||||
|
import org.telegram.api.interfaces.BotApiObject; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief This object represent a user's profile pictures. |
||||
|
* @date 22 of June of 2015 |
||||
|
*/ |
||||
|
public class UserProfilePhotos implements BotApiObject { |
||||
|
|
||||
|
public static final String TOTALCOUNT_FIELD = "total_count"; |
||||
|
@JsonProperty(TOTALCOUNT_FIELD) |
||||
|
private Integer totalCount; ///< Total number of profile pictures the target user has
|
||||
|
public static final String PHOTOS_FIELD = "photos"; |
||||
|
@JsonProperty(PHOTOS_FIELD) |
||||
|
private List<List<PhotoSize>> photos; ///< Requested profile pictures (in up to 4 sizes each)
|
||||
|
|
||||
|
public UserProfilePhotos() { |
||||
|
super(); |
||||
|
} |
||||
|
|
||||
|
public UserProfilePhotos(JSONObject jsonObject) { |
||||
|
super(); |
||||
|
this.totalCount = jsonObject.getInt(TOTALCOUNT_FIELD); |
||||
|
if (totalCount > 0) { |
||||
|
this.photos = new ArrayList<>(); |
||||
|
JSONArray photos = jsonObject.getJSONArray(PHOTOS_FIELD); |
||||
|
for (int i = 0; i < photos.length(); i++) { |
||||
|
JSONArray innerArray = photos.getJSONArray(i); |
||||
|
List<PhotoSize> innerPhotos = new ArrayList<>(); |
||||
|
for (int j = 0; j < innerArray.length(); j++) { |
||||
|
innerPhotos.add(new PhotoSize(innerArray.getJSONObject(j))); |
||||
|
} |
||||
|
this.photos.add(innerPhotos); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public Integer getTotalCount() { |
||||
|
return totalCount; |
||||
|
} |
||||
|
|
||||
|
public void setTotalCount(Integer totalCount) { |
||||
|
this.totalCount = totalCount; |
||||
|
} |
||||
|
|
||||
|
public List<List<PhotoSize>> getPhotos() { |
||||
|
return photos; |
||||
|
} |
||||
|
|
||||
|
public void setPhotos(List<List<PhotoSize>> photos) { |
||||
|
this.photos = photos; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeNumberField(TOTALCOUNT_FIELD, totalCount); |
||||
|
if (totalCount > 0) { |
||||
|
gen.writeArrayFieldStart(PHOTOS_FIELD); |
||||
|
for (List<PhotoSize> photoSizeList : photos) { |
||||
|
gen.writeStartArray(); |
||||
|
for (PhotoSize photoSize: photoSizeList) { |
||||
|
gen.writeObject(photoSize); |
||||
|
} |
||||
|
gen.writeEndArray(); |
||||
|
} |
||||
|
gen.writeEndArray(); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { |
||||
|
gen.writeStartObject(); |
||||
|
gen.writeNumberField(TOTALCOUNT_FIELD, totalCount); |
||||
|
if (totalCount > 0) { |
||||
|
gen.writeArrayFieldStart(PHOTOS_FIELD); |
||||
|
for (List<PhotoSize> photoSizeList : photos) { |
||||
|
gen.writeStartArray(); |
||||
|
for (PhotoSize photoSize: photoSizeList) { |
||||
|
gen.writeObject(photoSize); |
||||
|
} |
||||
|
gen.writeEndArray(); |
||||
|
} |
||||
|
gen.writeEndArray(); |
||||
|
} |
||||
|
gen.writeEndObject(); |
||||
|
gen.flush(); |
||||
|
} |
||||
|
} |
||||
@ -1,46 +0,0 @@ |
|||||
package org.telegram.methods; |
|
||||
|
|
||||
/** |
|
||||
* @author Ruben Bermudez |
|
||||
* @version 1.0 |
|
||||
* @brief Use this method to send text messages. On success, the sent Message is returned. |
|
||||
* @date 20 of June of 2015 |
|
||||
*/ |
|
||||
public class ForwardMessage { |
|
||||
public static final String PATH = "forwardmessage"; |
|
||||
|
|
||||
public static final String CHATID_FIELD = "chat_id"; |
|
||||
private Integer chatId; ///< Unique identifier for the message recepient — User or GroupChat id
|
|
||||
public static final String FROMCHATID_FIELD = "from_chat_id"; |
|
||||
private Integer fromChatId; ///< Unique identifier for the chat where the original message was sent — User or GroupChat id
|
|
||||
public static final String MESSAGEID_FIELD = "message_id"; |
|
||||
private Integer messageId; ///< Unique message identifier
|
|
||||
|
|
||||
public ForwardMessage() { |
|
||||
super(); |
|
||||
} |
|
||||
|
|
||||
public Integer getChatId() { |
|
||||
return chatId; |
|
||||
} |
|
||||
|
|
||||
public void setChatId(Integer chatId) { |
|
||||
this.chatId = chatId; |
|
||||
} |
|
||||
|
|
||||
public Integer getFromChatId() { |
|
||||
return fromChatId; |
|
||||
} |
|
||||
|
|
||||
public void setFromChatId(Integer fromChatId) { |
|
||||
this.fromChatId = fromChatId; |
|
||||
} |
|
||||
|
|
||||
public Integer getMessageId() { |
|
||||
return messageId; |
|
||||
} |
|
||||
|
|
||||
public void setMessageId(Integer messageId) { |
|
||||
this.messageId = messageId; |
|
||||
} |
|
||||
} |
|
||||
@ -1,12 +0,0 @@ |
|||||
package org.telegram.methods; |
|
||||
|
|
||||
/** |
|
||||
* @author Ruben Bermudez |
|
||||
* @version 1.0 |
|
||||
* @brief A simple method for testing your bot's auth token. Requires no parameters. |
|
||||
* Returns basic information about the bot in form of a User object |
|
||||
* @date 20 of June of 2015 |
|
||||
*/ |
|
||||
public class GetMe { |
|
||||
public static final String PATH = "getme"; |
|
||||
} |
|
||||
@ -1,57 +0,0 @@ |
|||||
package org.telegram.methods; |
|
||||
|
|
||||
/** |
|
||||
* @author Ruben Bermudez |
|
||||
* @version 1.0 |
|
||||
* @brief Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object. |
|
||||
* @date 20 of June of 2015 |
|
||||
*/ |
|
||||
public class GetUserProfilePhotos { |
|
||||
public static final String PATH = "getuserprofilephotos"; |
|
||||
/* |
|
||||
user_id Integer Yes |
|
||||
offset Integer |
|
||||
limit Integer Optional |
|
||||
*/ |
|
||||
public static final String USERID_FIELD = "user_id"; |
|
||||
private Integer userId; ///< Unique identifier of the target user
|
|
||||
public static final String OFFSET_FIELD = "offset"; |
|
||||
/** |
|
||||
* Sequential number of the first photo to be returned. By default, all photos are returned. |
|
||||
*/ |
|
||||
private Integer offset; |
|
||||
public static final String LIMIT_FIELD = "limit"; |
|
||||
/** |
|
||||
* Limits the number of photos to be retrieved. Values between 1—100 are accepted. Defaults to 100. |
|
||||
*/ |
|
||||
private Integer limit; |
|
||||
|
|
||||
public GetUserProfilePhotos() { |
|
||||
super(); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
public Integer getUserId() { |
|
||||
return userId; |
|
||||
} |
|
||||
|
|
||||
public void setUserId(Integer userId) { |
|
||||
this.userId = userId; |
|
||||
} |
|
||||
|
|
||||
public Integer getOffset() { |
|
||||
return offset; |
|
||||
} |
|
||||
|
|
||||
public void setOffset(Integer offset) { |
|
||||
this.offset = offset; |
|
||||
} |
|
||||
|
|
||||
public Integer getLimit() { |
|
||||
return limit; |
|
||||
} |
|
||||
|
|
||||
public void setLimit(Integer limit) { |
|
||||
this.limit = limit; |
|
||||
} |
|
||||
} |
|
||||
@ -1,31 +0,0 @@ |
|||||
package org.telegram.methods; |
|
||||
|
|
||||
import org.telegram.api.ReplyKeyboard; |
|
||||
|
|
||||
/** |
|
||||
* @author Ruben Bermudez |
|
||||
* @version 1.0 |
|
||||
* @brief Use this method when you need to tell the user that something is happening on the bot's side. |
|
||||
* The status is set for 5 seconds or less (when a message arrives from your bot, |
|
||||
* Telegram clients clear its typing status). |
|
||||
* @date 20 of June of 2015 |
|
||||
*/ |
|
||||
public class SendChatAction { |
|
||||
|
|
||||
public static final String PATH = "sendChatAction"; |
|
||||
|
|
||||
public static final String CHATID_FIELD = "chat_id"; |
|
||||
private Integer chatId; ///< Unique identifier for the message recepient — User or GroupChat id
|
|
||||
public static final String ACTION_FIELD = "action"; |
|
||||
/** |
|
||||
* Type of action to broadcast. |
|
||||
* Choose one, depending on what the user is about to receive: |
|
||||
* 'typing' for text messages |
|
||||
* 'upload_photo' for photos |
|
||||
* 'record_video' or 'upload_video' for videos |
|
||||
* 'record_audio' or 'upload_audio' for audio files |
|
||||
* 'upload_document' for general files, |
|
||||
* 'find_location' for location data. |
|
||||
*/ |
|
||||
private Float action; |
|
||||
} |
|
||||
@ -1,24 +0,0 @@ |
|||||
package org.telegram.methods; |
|
||||
|
|
||||
import org.telegram.api.ReplyKeyboard; |
|
||||
|
|
||||
/** |
|
||||
* @author Ruben Bermudez |
|
||||
* @version 1.0 |
|
||||
* @brief Use this method to send point on the map. On success, the sent Message is returned. |
|
||||
* @date 20 of June of 2015 |
|
||||
*/ |
|
||||
public class SendLocation { |
|
||||
public static final String PATH = "sendlocation"; |
|
||||
|
|
||||
public static final String CHATID_FIELD = "chat_id"; |
|
||||
private Integer chatId; ///< Unique identifier for the message recepient — User or GroupChat id
|
|
||||
public static final String LATITUDE_FIELD = "latitude"; |
|
||||
private Float latitude; ///< Latitude of location
|
|
||||
public static final String LONGITUDE_FIELD = "longitude"; |
|
||||
private Float longitude; ///< Longitude of location
|
|
||||
public static final String REPLYTOMESSAGEID_FIELD = "reply_to_message_id"; |
|
||||
private Integer replayToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
|
||||
public static final String REPLYMARKUP_FIELD = "reply_markup"; |
|
||||
private ReplyKeyboard replayMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
|
||||
} |
|
||||
@ -1,68 +0,0 @@ |
|||||
package org.telegram.methods; |
|
||||
|
|
||||
import org.telegram.api.ReplyKeyboard; |
|
||||
|
|
||||
/** |
|
||||
* @author Ruben Bermudez |
|
||||
* @version 1.0 |
|
||||
* @brief Use this method to send text messages. On success, the sent Message is returned. |
|
||||
* @date 20 of June of 2015 |
|
||||
*/ |
|
||||
public class SendMessage { |
|
||||
public static final String PATH = "sendmessage"; |
|
||||
|
|
||||
public static final String CHATID_FIELD = "chat_id"; |
|
||||
private Integer chatId; ///< Unique identifier for the message recepient — User or GroupChat id
|
|
||||
public static final String TEXT_FIELD = "text"; |
|
||||
private String text; ///< Text of the message to be sent
|
|
||||
public static final String DISABLEWEBPAGEPREVIEW_FIELD = "disable_web_page_preview"; |
|
||||
private Boolean disableWebPagePreview; ///< Disables link previews for links in this message
|
|
||||
public static final String REPLYTOMESSAGEID_FIELD = "reply_to_message_id"; |
|
||||
private Integer replayToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
|
||||
public static final String REPLYMARKUP_FIELD = "reply_markup"; |
|
||||
private ReplyKeyboard replayMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
|
||||
|
|
||||
public SendMessage() { |
|
||||
super(); |
|
||||
} |
|
||||
|
|
||||
public Integer getChatId() { |
|
||||
return chatId; |
|
||||
} |
|
||||
|
|
||||
public void setChatId(Integer chatId) { |
|
||||
this.chatId = chatId; |
|
||||
} |
|
||||
|
|
||||
public String getText() { |
|
||||
return text; |
|
||||
} |
|
||||
|
|
||||
public void setText(String text) { |
|
||||
this.text = text; |
|
||||
} |
|
||||
|
|
||||
public Integer getReplayToMessageId() { |
|
||||
return replayToMessageId; |
|
||||
} |
|
||||
|
|
||||
public void setReplayToMessageId(Integer replayToMessageId) { |
|
||||
this.replayToMessageId = replayToMessageId; |
|
||||
} |
|
||||
|
|
||||
public ReplyKeyboard getReplayMarkup() { |
|
||||
return replayMarkup; |
|
||||
} |
|
||||
|
|
||||
public void setReplayMarkup(ReplyKeyboard replayMarkup) { |
|
||||
this.replayMarkup = replayMarkup; |
|
||||
} |
|
||||
|
|
||||
public Boolean getDisableWebPagePreview() { |
|
||||
return disableWebPagePreview; |
|
||||
} |
|
||||
|
|
||||
public void setDisableWebPagePreview(Boolean disableWebPagePreview) { |
|
||||
this.disableWebPagePreview = disableWebPagePreview; |
|
||||
} |
|
||||
} |
|
||||
@ -1,17 +0,0 @@ |
|||||
package org.telegram.methods; |
|
||||
|
|
||||
/** |
|
||||
* @author Ruben Bermudez |
|
||||
* @version 1.0 |
|
||||
* @brief Use this method to specify a url and receive incoming updates via an outgoing webhook. |
|
||||
* Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, |
|
||||
* containing a JSON-serialized Update. In case of an unsuccessful request, |
|
||||
* we will give up after a reasonable amount of attempts. |
|
||||
* @date 20 of June of 2015 |
|
||||
*/ |
|
||||
public class SetWebhook { |
|
||||
public static final String PATH = "setwebhook"; |
|
||||
|
|
||||
public static final String URL_FIELD = "url"; |
|
||||
private String url; ///< HTTPS url to send updates to. Use an empty string to remove webhook integration
|
|
||||
} |
|
||||
@ -0,0 +1,26 @@ |
|||||
|
package org.telegram.updateshandlers; |
||||
|
|
||||
|
import org.json.JSONObject; |
||||
|
import org.telegram.api.methods.BotApiMethod; |
||||
|
|
||||
|
/** |
||||
|
* @author Ruben Bermudez |
||||
|
* @version 1.0 |
||||
|
* @brief Callback to execute api method asynchronously |
||||
|
* @date 10 of September of 2015 |
||||
|
*/ |
||||
|
public interface SentCallback<T> { |
||||
|
/** |
||||
|
* Called when the request is successful |
||||
|
* @param method Method executed |
||||
|
* @param jsonObject Answer from Telegram server |
||||
|
*/ |
||||
|
void onResult(BotApiMethod<T> method, JSONObject jsonObject); |
||||
|
|
||||
|
/** |
||||
|
* Called when the request fails |
||||
|
* @param method Method executed |
||||
|
* @param jsonObject Answer from Telegram server (contains error information) |
||||
|
*/ |
||||
|
void onError(BotApiMethod<T> method, JSONObject jsonObject); |
||||
|
} |
||||
File diff suppressed because it is too large
Loading…
Reference in new issue