Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
morinokami authored Jul 28, 2020
1 parent fac4295 commit 9841968
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ To send a tv infrared signal:
>>> api.send_tv_infrared_signal(tv.id, 'power')
```

To check the current rate limit status:

```py
>>> api.get_user()
...
>>> api.rate_limit
RateLimit(checked_at=datetime.datetime(2020, 7, 28, 8, 11, 4), limit=30, remaining=29, reset=datetime.datetime(2020, 7, 28, 8, 15))
>>> api.rate_limit.checked_at, api.rate_limit.limit, api.rate_limit.remaining, api.rate_limit.reset
(datetime.datetime(2020, 7, 28, 8, 11, 4), 30, 29, datetime.datetime(2020, 7, 28, 8, 15))
```

To create an instance of `remo.NatureRemoLocalAPI`:

```py
Expand Down Expand Up @@ -116,17 +127,6 @@ DEBUG:urllib3.connectionpool:https://api.nature.global:443 "GET /1/users/me HTTP
User(id='user_id', nickname='your_nickname')
```

To check the current rate limit status:

```py
>>> api.get_user()
...
>>> api.rate_limit
RateLimit(checked_at=datetime.datetime(2020, 7, 28, 8, 11, 4), limit=30, remaining=29, reset=datetime.datetime(2020, 7, 28, 8, 15))
>>> api.rate_limit.checked_at, api.rate_limit.limit, api.rate_limit.remaining, api.rate_limit.reset
(datetime.datetime(2020, 7, 28, 8, 11, 4), 30, 29, datetime.datetime(2020, 7, 28, 8, 15))
```

## Development Status

### [Cloud API](https://swagger.nature.global/) (Base URL: `api.nature.global/`)
Expand Down Expand Up @@ -238,6 +238,17 @@ Remo の機器リストを取得し、最初の機器の温度を表示する:
>>> api.send_tv_infrared_signal(tv.id, "power")
```

現在の呼び出し制限 (Rate Limit) を確認する:

```py
>>> api.get_user()
...
>>> api.rate_limit
RateLimit(checked_at=datetime.datetime(2020, 7, 28, 8, 11, 4), limit=30, remaining=29, reset=datetime.datetime(2020, 7, 28, 8, 15))
>>> api.rate_limit.checked_at, api.rate_limit.limit, api.rate_limit.remaining, api.rate_limit.reset
(datetime.datetime(2020, 7, 28, 8, 11, 4), 30, 29, datetime.datetime(2020, 7, 28, 8, 15))
```

`remo.NatureRemoLocalAPI` のインスタンスを作成する:

```py
Expand Down Expand Up @@ -287,14 +298,3 @@ header: X-Xss-Protection: 1; mode=block
DEBUG:urllib3.connectionpool:https://api.nature.global:443 "GET /1/users/me HTTP/1.1" 200 72
User(id='user_id', nickname='your_nickname')
```

現在の呼び出し制限 (Rate Limit) を確認する:

```py
>>> api.get_user()
...
>>> api.rate_limit
RateLimit(checked_at=datetime.datetime(2020, 7, 28, 8, 11, 4), limit=30, remaining=29, reset=datetime.datetime(2020, 7, 28, 8, 15))
>>> api.rate_limit.checked_at, api.rate_limit.limit, api.rate_limit.remaining, api.rate_limit.reset
(datetime.datetime(2020, 7, 28, 8, 11, 4), 30, 29, datetime.datetime(2020, 7, 28, 8, 15))
```

0 comments on commit 9841968

Please sign in to comment.