This repository has been archived by the owner on Jan 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WEB-9960] Added getMe method to get user profile data.
- Loading branch information
1 parent
559647d
commit 7e1db8b
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Serato\SwsSdk\Profile\Command; | ||
|
||
use Serato\SwsSdk\CommandBasicAuth; | ||
|
||
/** | ||
* Gets user information for the authenticated user. | ||
* | ||
* User is identified by the bearer token | ||
* | ||
* This command can be executed on a `Serato\SwsSdk\Profile\ProfileClient` instance | ||
* using the `ProfileClient::getMe` magic method. | ||
*/ | ||
class GetMe extends CommandBasicAuth | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getHttpMethod(): string | ||
{ | ||
return 'GET'; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getUriPath(): string | ||
{ | ||
return '/api/v1/me/'; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function getArgsDefinition(): array | ||
{ | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters