Skip to content

Commit

Permalink
Prepare tests-client-py3
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-kg committed Sep 13, 2020
1 parent 34152af commit 91631a7
Show file tree
Hide file tree
Showing 13 changed files with 1,049 additions and 64 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ example-of-exported/py3/*.egg-info
example-of-exported/py3/build
wsjcpp-jsonrpc2
wsjcpp-jsonrpc20
__pycache__
__pycache__
*.log
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,27 @@ addons:
- g++
- pkg-config

python:
- "3.7"

# Install dependencies
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y g++ make python3-pip

install:
- pip3 install --user websocket-client

# Build steps
script:
- ./build_simple.sh
- ./wsjcpp-jsonrpc20
- cd unit-tests.wsjcpp
- ./build_simple.sh
- ./unit-tests
- cd ../tests-client-py3
- python3 run_tests.py

notifications:
email:
- [email protected]
91 changes: 87 additions & 4 deletions example-of-exported/py3/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Automatically generated by wsjcpp-jsonrpc20.
* Version: v0.0.2
* Date: Thu, 10 Sep 2020 17:14:24 GMT
* Date: Sun, 13 Sep 2020 19:26:47 GMT

Example connect/disconnect:
```
Expand All @@ -13,12 +13,93 @@ client = SomeClient('ws://host:1234')
client.close()
```

<details>
<summary>auth_login</summary>

## auth_login

Auth by login and password

Access: unauthorized - **yes**, user - **no**, tester - **no**, admin - **no**

#### Input params

* login - string, required; User Login
* password - string, required; User Password
* client_app_name - string, optional; Client app name
* client_app_version - string, optional; Client app version


#### example call method

```
response = client.auth_login(
login="",
password="",
client_app_name="",
client_app_version=""
)
```

</details>

<details>
<summary>auth_logoff</summary>

## auth_logoff

Logoff

Access: unauthorized - **no**, user - **yes**, tester - **yes**, admin - **yes**

#### Input params



#### example call method

```
response = client.auth_logoff(
)
```

</details>

<details>
<summary>auth_token</summary>

## auth_token

Auth by token

Access: unauthorized - **yes**, user - **no**, tester - **no**, admin - **no**

#### Input params

* token - string, required; Token
* client_app_name - string, optional; Client app name
* client_app_version - string, optional; Client app version


#### example call method

```
response = client.auth_token(
token="",
client_app_name="",
client_app_version=""
)
```

</details>

<details>
<summary>game_create</summary>

## game_create

TODO description
Some example of description

Access: unauthorized - **no**, user - **yes**, tester - **yes**, admin - **yes**

Expand All @@ -30,6 +111,7 @@ Access: unauthorized - **no**, user - **yes**, tester - **yes**, admin - **ye
* age - integer, optional; Name of object
* public - boolean, required; True if object is public
* activated - boolean, optional; If object can handle
* custom - json, optional; Some custom json


#### example call method
Expand All @@ -41,7 +123,8 @@ response = client.game_create(
cost=0,
age=0,
public=False,
activated=False
activated=False,
custom={}
)
```

Expand All @@ -54,7 +137,7 @@ response = client.game_create(

This method Will be return list of all handlers

Access: unauthorized - **yes**, user - **yes**, tester - **no**, admin - **yes**
Access: unauthorized - **yes**, user - **yes**, tester - **yes**, admin - **yes**

#### Input params

Expand Down
Loading

0 comments on commit 91631a7

Please sign in to comment.