GitHub user nicolaferraro opened a pull request:

    https://github.com/apache/camel/pull/988

    CAMEL-9969: Added a component for Telegram

    I created a new component for Telegram.
    
    The component uses the Telegram Bot REST API 
(https://core.telegram.org/bots/api).
    There are multiple Java wrappers for the REST API available as open source 
projects, but 
    many of them are not "mature" to be included in the camel component.
    An alternative option could have been 
https://github.com/rubenlagus/TelegramBots, but it is 
    released under GPLv3 license.
    Since the Bot API are simple and well documented, I decided to include a 
Java REST interface directly inside the component.
    
    The Java API that wraps the REST services contains many features (Text 
messages, audio, video and photo), but it is not 100% complete. 
    I don't know if it's worth completing it, or maybe leave some issues on 
Jira to complete it later.
    The API is self-consistent at this time, even if it is not complete.
    
    The Telegram services do not allow two bots to exchange messages, so 
integration tests would be impossible without a human intervention.
    So I divided the tests in two stages:
    - Internal tests: by mocking the Telegram Service, I verify that the 
service is called passing the correct parameters
    - Integration tests: I call directly the Telegram Service and verify the 
interaction using my smartphone
    
    Integration tests are disabled in surefire CI (unless you provide some 
environment variables).
    
    I added a .adoc file for documenting the endpoint (consumer and producer).
    I haven't put the documentation on the Wiki pages because...
    
    I think I had better wait for a review :)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nicolaferraro/camel CAMEL-9969

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/988.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #988
    
----
commit a5118992ae09055fe8fb1bffff68e4a52c64edb3
Author: Nicola Ferraro <ni.ferr...@gmail.com>
Date:   2016-05-20T10:26:30Z

    CAMEL-9969: Added a component for Telegram

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to