Skip to content

Commit

Permalink
Merge pull request #165 from rubenlagus/dev
Browse files Browse the repository at this point in the history
2.4.3
  • Loading branch information
rubenlagus authored Nov 17, 2016
2 parents 777c800 + e61d91d commit 8d1bf50
Show file tree
Hide file tree
Showing 29 changed files with 106 additions and 57 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ jdk:
- oraclejdk8
install: mvn install -Dgpg.skip
script: mvn clean compile test
after_success:
- bash <(curl -s https://codecov.io/bash)
notifications:
webhooks:
secure: "jC7dK/x67ONWQoeLZg4HfW0mHhcjDerJjsLLkrbcpltiqAbw2p7XfY8Pk4zHoD72a+5o6WKu5WvYvZ4OdldnjP8Y6ZUbliQ5RG3olg3gFDoe0+sc3geeb4HRYVcdI20O0z4Bup/qO0ZihxPBc0D5IpHmFxlaqlZG0WeST4CicU8PNnBh6aX9/VMrwXhkMb2vfzmjmIhMbx/uK5+93bnk/vR5Uwu00/Yd2cTAAWMaqK1MRdtR0WLbxlUNsprEfCjYiH3n9XZnlKXs6cLC8EOU436Wx7aepiAszW0wWFMe/7nVqOqztrQiKNvL0qXYwlQf0BLechJdt458EopL9QCu687TNDFYvg1yERAmCRiaayYZcX3PbUSMr6H5Q+Odntjs3XKyzfgSqqlkgf/SAND5jny1/1uteVoplZmFXuZFIiK4H8Rl2ezy1/8pnbp+JD3YEfiA2NuRjlou1BZXyMhiqqVXbrJqk/tXF6yZSkDlYJfNsWzRCGfra4B6JjEvUP927chIFm1ii3dgNstXDo1evV46+OQQO4HKvMPdtU2FPvWpPlkTxnmpZRZjB+bjmybluJdWT3E+e1C3wm7YbRe3vporhpfNPlnod6M0G10y9CKzl9Fbcku6X1FtM+IoPO/aqZ8S4/CBZoYEuR/Nk6bcvsYouxtyIl6PSuF9E8YjpJE="
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ Just import add the library to your project with one of these options:
<dependency>
<groupId>org.telegram</groupId>
<artifactId>telegrambots</artifactId>
<version>2.4.2</version>
<version>2.4.3</version>
</dependency>
```

2. Using Jitpack from [here](https://jitpack.io/#rubenlagus/TelegramBots/v2.4.2)
3. Download the jar(including all dependencies) from [here](https://github.com/rubenlagus/TelegramBots/releases/tag/v2.4.2)
2. Using Jitpack from [here](https://jitpack.io/#rubenlagus/TelegramBots/v2.4.3)
3. Download the jar(including all dependencies) from [here](https://github.com/rubenlagus/TelegramBots/releases/tag/v2.4.3)

In order to use Long Polling mode, just create your own bot extending `org.telegram.telegrambots.bots.TelegramLongPollingBot`.

Expand Down Expand Up @@ -63,7 +63,7 @@ Once done, you just need to create a `org.telegram.telegrambots.TelegramBotsApi`

```

For detailed explanation, visite our [How To](HOWTO.md) (thanks Clevero)
For detailed explanation, visite our [How To](https://github.com/rubenlagus/TelegramBots/wiki/Getting-Started) (thanks Clevero)


## Example bots
Expand Down
4 changes: 2 additions & 2 deletions TelegramBots.wiki/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### <a id="2.4.2"></a>2.4.2 ###
### <a id="2.4.3"></a>2.4.3 ###
1. Split library in two modules to allow custom implementations.
2. Use [Guice](https://github.com/google/guice) for dependency injection.
3. Use [Jackson](https://github.com/FasterXML/jackson) for json (de)serialization.
Expand All @@ -8,4 +8,4 @@
7. In `SentCallback` method `onError` changed second parameter to `TelegramApiRequestException` and `onResult` now receives the deserialized answer (of type `T`) instead of a `JSONObject` as second parameter
8. Moved to MIT license

**[[How to update to version 2.4.2|How-To-Update#2.4.2]]**
**[[How to update to version 2.4.3|How-To-Update#2.4.3]]**
4 changes: 2 additions & 2 deletions TelegramBots.wiki/Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ First you need ot get the library and add it to your project. There are few poss
<dependency>
<groupId>org.telegram</groupId>
<artifactId>telegrambots</artifactId>
<version>2.4.2</version>
<version>2.4.3</version>
</dependency>
```
* With **Gradle**:

```groovy
compile group: 'org.telegram', name: 'telegrambots', version: '2.4.2'
compile group: 'org.telegram', name: 'telegrambots', version: '2.4.3'
```

2. Don't like **Maven Central Repository**? It can also be taken from [Jitpack](https://jitpack.io/#rubenlagus/TelegramBots).
Expand Down
2 changes: 1 addition & 1 deletion TelegramBots.wiki/How-To-Update.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### <a id="2.4.2"></a>To version 2.4.2 ###
### <a id="2.4.3"></a>To version 2.4.3 ###
1. Replace `BotOptions` by `DefaultBotOptions`.
2. At the beginning of your program (before creating your `TelegramBotsApi` instance, add the following line:
```java
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>org.telegram</groupId>
<artifactId>Bots</artifactId>
<packaging>pom</packaging>
<version>2.4.2</version>
<version>2.4.3</version>

<modules>
<module>telegrambots</module>
Expand All @@ -24,6 +24,6 @@

<properties>
<maven.deploy.skip>true</maven.deploy.skip>
<bots.version>2.4.2</bots.version>
<bots.version>2.4.3</bots.version>
</properties>
</project>
26 changes: 25 additions & 1 deletion telegrambots-meta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.telegram</groupId>
<artifactId>telegrambots-meta</artifactId>
<version>2.4.2</version>
<version>2.4.3</version>
<packaging>jar</packaging>

<name>Telegram Bots Meta</name>
Expand All @@ -23,6 +23,11 @@
<developerConnection>scm:git:[email protected]:rubenlagus/TelegramBots.git</developerConnection>
</scm>

<ciManagement>
<url>https://travis-ci.org/rubenlagus/TelegramBots</url>
<system>Travis</system>
</ciManagement>

<developers>
<developer>
<email>[email protected]</email>
Expand Down Expand Up @@ -179,6 +184,25 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.7.201606060606</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class InlineQueryResultArticle implements InlineQueryResult {
private static final String THUMBHEIGHT_FIELD = "thumb_height";

@JsonProperty(TYPE_FIELD)
private static final String type = "article"; ///< Type of the result, must be “article”
private final String type = "article"; ///< Type of the result, must be “article”
@JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(TITLE_FIELD)
Expand All @@ -53,7 +53,7 @@ public InlineQueryResultArticle() {
super();
}

public static String getType() {
public String getType() {
return type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class InlineQueryResultAudio implements InlineQueryResult {
private static final String CAPTION_FIELD = "caption";

@JsonProperty(TYPE_FIELD)
private static final String type = "audio"; ///< Type of the result, must be "audio"
private final String type = "audio"; ///< Type of the result, must be "audio"
@JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result
@JsonProperty(AUDIOURL_FIELD)
Expand All @@ -51,7 +51,7 @@ public InlineQueryResultAudio() {
super();
}

public static String getType() {
public String getType() {
return type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class InlineQueryResultContact implements InlineQueryResult {
private static final String THUMBHEIGHT_FIELD = "thumb_height";

@JsonProperty(TYPE_FIELD)
private static final String type = "contact"; ///< Type of the result, must be "contact"
private final String type = "contact"; ///< Type of the result, must be "contact"
@JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(PHONE_NUMBER_FIELD)
Expand All @@ -54,7 +54,7 @@ public InlineQueryResultContact() {
super();
}

public static String getType() {
public String getType() {
return type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class InlineQueryResultDocument implements InlineQueryResult {
private static final String THUMBHEIGHT_FIELD = "thumb_height";

@JsonProperty(TYPE_FIELD)
private static final String type = "document"; ///< Type of the result, must be "document"
private final String type = "document"; ///< Type of the result, must be "document"
@JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(TITLE_FIELD)
Expand Down Expand Up @@ -61,7 +61,7 @@ public InlineQueryResultDocument() {
super();
}

public static String getType() {
public String getType() {
return type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class InlineQueryResultGame implements InlineQueryResult {
private static final String REPLY_MARKUP_FIELD = "reply_markup";

@JsonProperty(TYPE_FIELD)
private static final String type = "game"; ///< Type of the result, must be "game"
private final String type = "game"; ///< Type of the result, must be "game"
@JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(GAMESHORTNAME_FIELD)
Expand All @@ -49,7 +49,7 @@ public InlineQueryResultGame() {
super();
}

public static String getType() {
public String getType() {
return type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class InlineQueryResultGif implements InlineQueryResult {
private static final String REPLY_MARKUP_FIELD = "reply_markup";

@JsonProperty(TYPE_FIELD)
private static final String type = "gif"; ///< Type of the result, must be "gif"
private final String type = "gif"; ///< Type of the result, must be "gif"
@JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(GIFURL_FIELD)
Expand All @@ -52,7 +52,7 @@ public InlineQueryResultGif() {
super();
}

public static String getType() {
public String getType() {
return type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class InlineQueryResultLocation implements InlineQueryResult {
private static final String THUMBHEIGHT_FIELD = "thumb_height";

@JsonProperty(TYPE_FIELD)
private static final String type = "location"; ///< Type of the result, must be "location"
private final String type = "location"; ///< Type of the result, must be "location"
@JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(TITLE_FIELD)
Expand All @@ -54,7 +54,7 @@ public InlineQueryResultLocation() {
super();
}

public static String getType() {
public String getType() {
return type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class InlineQueryResultMpeg4Gif implements InlineQueryResult {
private static final String REPLY_MARKUP_FIELD = "reply_markup";

@JsonProperty(TYPE_FIELD)
private static final String type = "mpeg4_gif"; ///< Type of the result, must be "mpeg4_gif"
private final String type = "mpeg4_gif"; ///< Type of the result, must be "mpeg4_gif"
@JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(MPEG4URL_FIELD)
Expand All @@ -52,7 +52,7 @@ public InlineQueryResultMpeg4Gif() {
super();
}

public static String getType() {
public String getType() {
return type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class InlineQueryResultPhoto implements InlineQueryResult {
private static final String REPLY_MARKUP_FIELD = "reply_markup";

@JsonProperty(TYPE_FIELD)
private static final String type = "photo"; ///< Type of the result, must be “photo”
private final String type = "photo"; ///< Type of the result, must be “photo”
@JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(PHOTOURL_FIELD)
Expand Down Expand Up @@ -58,7 +58,7 @@ public InlineQueryResultPhoto() {
super();
}

public static String getType() {
public String getType() {
return type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class InlineQueryResultVenue implements InlineQueryResult {
private static final String THUMBHEIGHT_FIELD = "thumb_height";

@JsonProperty(TYPE_FIELD)
private static final String type = "venue"; ///< Type of the result, must be "venue"
private final String type = "venue"; ///< Type of the result, must be "venue"
@JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(TITLE_FIELD)
Expand Down Expand Up @@ -59,7 +59,7 @@ public InlineQueryResultVenue() {
super();
}

public static String getType() {
public String getType() {
return type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class InlineQueryResultVideo implements InlineQueryResult {
private static final String REPLY_MARKUP_FIELD = "reply_markup";

@JsonProperty(TYPE_FIELD)
private static final String type = "video"; ///< Type of the result, must be "video"
private final String type = "video"; ///< Type of the result, must be "video"
@JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result
@JsonProperty(MIMETYPE_FIELD)
Expand Down Expand Up @@ -61,7 +61,7 @@ public InlineQueryResultVideo() {
super();
}

public static String getType() {
public String getType() {
return type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class InlineQueryResultVoice implements InlineQueryResult {
private static final String CAPTION_FIELD = "caption";

@JsonProperty(TYPE_FIELD)
private static final String type = "voice"; ///< Type of the result, must be "voice"
private final String type = "voice"; ///< Type of the result, must be "voice"
@JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(VOICEURL_FIELD)
Expand All @@ -48,7 +48,7 @@ public InlineQueryResultVoice() {
super();
}

public static String getType() {
public String getType() {
return type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class InlineQueryResultCachedAudio implements InlineQueryResult {
private static final String CAPTION_FIELD = "caption";

@JsonProperty(TYPE_FIELD)
private static final String type = "audio"; ///< Type of the result, must be "audio"
private final String type = "audio"; ///< Type of the result, must be "audio"
@JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result
@JsonProperty(AUDIO_FILE_ID_FIELD)
Expand All @@ -43,7 +43,7 @@ public InlineQueryResultCachedAudio() {
super();
}

public static String getType() {
public String getType() {
return type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class InlineQueryResultCachedDocument implements InlineQueryResult {
private static final String INPUTMESSAGECONTENT_FIELD = "input_message_content";

@JsonProperty(TYPE_FIELD)
private static final String type = "document"; ///< Type of the result, must be "document"
private final String type = "document"; ///< Type of the result, must be "document"
@JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(TITLE_FIELD)
Expand All @@ -50,7 +50,7 @@ public InlineQueryResultCachedDocument() {
super();
}

public static String getType() {
public String getType() {
return type;
}

Expand Down
Loading

0 comments on commit 8d1bf50

Please sign in to comment.