Skip to content

Commit

Permalink
Minimize sendApiResponse name.
Browse files Browse the repository at this point in the history
  • Loading branch information
RushCode committed Oct 17, 2017
1 parent 668678b commit 6aab68d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ Add the following to your composer.json:

```
$connect = new Api();
$connect->sendApiRequest($method);
$connect->sendRequest($method);
```

## Api methods

### Session

- [x] getSessions
- [x] getSessionList
- [ ] createSession
- [ ] updateSession
- [ ] closeSession
Expand All @@ -53,7 +54,7 @@ $connect->sendApiRequest($method);
```
$state = new \leocata\M1\Methods\Request\SetState();
$state->online();
(new Api())->sendApiRequest($state);
(new Api())->sendRequest($state);
```

### Contact
Expand All @@ -62,7 +63,7 @@ $state->online();
- [ ] inviteContact
- [x] contactRequested
- [x] contactAccept
- [ ] contactAccepted
- [x] contactAccepted
- [ ] contactReject
- [ ] contactRejected
- [ ] deleteContact
Expand Down
2 changes: 1 addition & 1 deletion src/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getCallbackMethod(string $data)
*
* @return RequestMethods
*/
public function sendApiRequest(RequestMethods $method)
public function sendRequest(RequestMethods $method)
{
$response = $this->client->getResponseContent($method->getRequestString());
if (!empty($response)) {
Expand Down
4 changes: 2 additions & 2 deletions tests/Mock/MockApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public function getCallbackMethod(string $data)
return parent::getCallbackMethod($data);
}

public function sendApiRequest(RequestMethods $method)
public function sendRequest(RequestMethods $method)
{
return parent::sendApiRequest($method);
return parent::sendRequest($method);
}
}

0 comments on commit 6aab68d

Please sign in to comment.