Skip to content

Commit

Permalink
Merge pull request zefirka#2 from zefirka/dev0.1.0
Browse files Browse the repository at this point in the history
Dev0.1.0
  • Loading branch information
zefirka authored Sep 28, 2016
2 parents 8a08ae8 + 74565e8 commit c35ae44
Show file tree
Hide file tree
Showing 27 changed files with 1,112 additions and 217 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: python
python:
- "3.3"
- "3.5"
- "pypy"
install:
- pip install -r requirements.txt

script: make tests
20 changes: 17 additions & 3 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,25 @@
## 0.1.*

### 0.1.0
- + Added `sendLocation`
- + Added support for next types:
- Locations
- Contacts
- Venues
- Documents
- Voice
- Audio
- Photo
- Video
- Sticker

- + Added specific response classes
- * Changed one simple format of Response to multiple classes `Text, Location, Keyboard, Photo ...`
- * Changed format of **Response** descriptions
- * Renamed `send` -> `sendMessage`
- * Renamed `keyboard` -> `sendKeyboard`
- * Fixed error with multiple instaces of bot sharing one token
- * Improved infrastructure

- * Write more tests for rules and responses

## 0.0.*

Expand Down Expand Up @@ -50,4 +64,4 @@
- + Added `Response` class and subscribing via `bot.on('msg', responseDescribe)`
- + Added custom body parsing. By default as a simple text (`id => id` function)
- + Added user registering via rule option `register`
- + Added multiple message sending with `Response` class API
- + Added multiple message sending with `Response` class API
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ DEFAULT_CALL_URL="http://127.0.0.1:$(DEFAULT_TEST_PORT)/bot"
DEFAULT_CALL_ID="172862922"
DEFAULT_CALL_TEXT="test"

PYVERSION=$(shell which python3.5 || echo python)

ifneq ('$(PYVERSION)','python')
PYVERSION='python3.5'
endif

ifeq ('$(DEV_CALL_ID)','')
DEV_CALL_ID=$(DEFAULT_CALL_ID)
endif
Expand Down Expand Up @@ -64,7 +70,7 @@ call:
./tasks/call.sh $(DEV_CALL_URL) $(DEV_CALL_ID) "$(CALL_TEXT)"

tests:
./tasks/test.sh
$(PYVERSION) ./test/testrunner.py

run-test-server:
python3.5 test/testserver.py debug
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# bobot
# bobot [![Build Status](https://travis-ci.org/zefirka/bobot.svg?branch=dev0.1.0)](https://travis-ci.org/zefirka/bobot)

Simple Telegram Bot API wrapper for Python

Expand Down Expand Up @@ -44,5 +44,6 @@ bot.rule(rule)

## Documentation

### [Bot API](https://github.com/zefirka/bobot/tree/master/docs/API.md)
### [Rules](https://github.com/zefirka/bobot/tree/master/docs/Rule.md)
### [Responses](https://github.com/zefirka/bobot/tree/master/docs/Response.md)
### [Responses](https://github.com/zefirka/bobot/tree/master/docs/Responses.md)
6 changes: 4 additions & 2 deletions bobot/Errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class ResponseMessageError(Exception):
"Error in response message description"
pass

class MessageTextEmptyError(Exception):
"Exception for empty text in message"
class MessageError(Exception):
"Exception for error in message content"
pass


Loading

0 comments on commit c35ae44

Please sign in to comment.