Skip to content

Commit

Permalink
Readme formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bymayo committed Sep 17, 2019
1 parent 91b159f commit a1a932c
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 @@ -191,33 +191,33 @@ Depending on your scope type when you authorised the account, the supported requ

To recieve data when a user connects their Strava account to Craft, use the `EVENT_USER_CONNECTED` event. This returns `$event->user`:

use bymayo\stravasync\events\UserConnectedEvent;
use bymayo\stravasync\services\UserService;
use yii\base\Event;

Event::on(
UserService::class,
UserService::EVENT_USER_CONNECTED,
function(UserConnectedEvent $event) {
// Do something
}
);
use bymayo\stravasync\events\UserConnectedEvent;
use bymayo\stravasync\services\UserService;
use yii\base\Event;

Event::on(
UserService::class,
UserService::EVENT_USER_CONNECTED,
function(UserConnectedEvent $event) {
// Do something
}
);

### Disconnected Event

To recieve data when a user disconnects their Strava account to Craft, use the `EVENT_USER_DISCONNECTED` event. This returns `$event->user`:

use bymayo\stravasync\events\userDisconnectedEvent;
use bymayo\stravasync\services\UserService;
use yii\base\Event;

Event::on(
UserService::class,
UserService::EVENT_USER_DISCONNECTED,
function(userDisconnectedEvent $event) {
// Do something
}
);
use bymayo\stravasync\events\userDisconnectedEvent;
use bymayo\stravasync\services\UserService;
use yii\base\Event;

Event::on(
UserService::class,
UserService::EVENT_USER_DISCONNECTED,
function(userDisconnectedEvent $event) {
// Do something
}
);

### Webhook Event

Expand Down

0 comments on commit a1a932c

Please sign in to comment.