Skip to content

Commit 0ba2d00

Browse files
authored
Merge pull request #63 from achmadhadikurnia/chore/code-improvement
Update readme
2 parents d58611f + 1de6c3e commit 0ba2d00

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,23 +130,38 @@ Generate an SSO Token
130130
php artisan siasn:sso-token
131131
```
132132

133-
Generate an APIM and SSO Token
133+
Generate an APIM and SSO Tokens
134134

135135
```bash
136136
php artisan siasn:token
137137
```
138138

139139
You can add the `--fresh` option to always request a new token
140140

141-
### Remove Token
141+
### Remove Tokens
142142

143-
Remove an APIM and SSO Token
143+
Remove an APIM and SSO Tokens
144144

145145
```bash
146146
php artisan siasn:forget-token
147147
```
148148

149-
### Send Request
149+
### Available Token Methods
150+
151+
Generate an APIM Token
152+
153+
```php
154+
Token::getNewApimToken(); // Always request a new APIM token
155+
Token::getApimToken(); // Request a new APIM token
156+
157+
Token::getNewSsoToken(); // Always request a new SSO token
158+
Token::getSsoToken(); // Request a new SSO token
159+
160+
Token::forget(); // Remove APIM and SSO Tokens
161+
```
162+
163+
### Send a Request
164+
Using Command
150165

151166
Send a GET request to endpoint of SIASN API
152167

@@ -166,9 +181,9 @@ Send a POST request to endpoint of SIASN API
166181
php artisan siasn:post {endpoint}
167182
```
168183

169-
### Using Class
184+
### Send a Request Using Class
170185

171-
The Siasn class uses the Http class (Illuminate\Support\Facades\Http) from Laravel. So you can use it just like you would use that class.
186+
The Siasn class uses the `Http` class (`Illuminate\Support\Facades\Http`) from Laravel. So you can use it just like you would use that class.
172187

173188
```php
174189
Siasn::get($endpoint, $params)

src/Commands/GenerateTokenCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class GenerateTokenCommand extends Command
1111
protected $signature = 'siasn:token
1212
{--fresh : Always request a new token}';
1313

14-
protected $description = 'Generate an APIM and SSO Token';
14+
protected $description = 'Generate an APIM and SSO Tokens';
1515

1616
public function handle(): int
1717
{

0 commit comments

Comments
 (0)