-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #269 from ramsayleung/ramsay_update_doc
Update document
- Loading branch information
Showing
5 changed files
with
67 additions
and
39 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,24 @@ | ||
@startuml | ||
title Crate Hierarchy | ||
rectangle rspotify-project{ | ||
|
||
rectangle client[ | ||
rspotify | ||
] | ||
rectangle { | ||
rectangle http[ | ||
rspotify-http | ||
] | ||
rectangle macros[ | ||
rspotify-macros | ||
] | ||
rectangle model[ | ||
rspotify-model | ||
] | ||
} | ||
} | ||
client -down-> macros | ||
client -down-> model | ||
client -down-> http | ||
|
||
@enduml |
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 |
---|---|---|
@@ -1,58 +1,58 @@ | ||
@startuml | ||
title Trait Hierarchy | ||
abstract class BaseClient { | ||
<color:green> {abstract} &Config get_config() | ||
<color:green> {abstract} &HttpClient get_http() | ||
<color:green> {abstract} RwLockReadGuard<Option<Token>> get_token() | ||
<color:green> {abstract} RwLockWriteGuard<Option<Token>> get_token_mut() | ||
<color:green> {abstract} &Credentials get_creds() | ||
<color:green> {abstract} ClientResult<Option<Token>> refetch_token() | ||
|
||
ClientResult<()> refresh_token() | ||
String endpoint_url() | ||
ClientResult<Headers> auth_headers() | ||
ClientResult<()> write_token_cache() | ||
ClientResult<Token> fetch_access_token() | ||
<color:green>abstract</color> {abstract} &Config get_config() | ||
<color:green>abstract</color> {abstract} &HttpClient get_http() | ||
<color:green>abstract</color> {abstract} Arc<Mutex<Option<Token>>> get_token() | ||
<color:green>abstract</color> {abstract} &Credentials get_creds() | ||
<color:green>abstract</color> {abstract} ClientResult<Option<Token>> refetch_token() | ||
--- | ||
ClientResult<()> auto_reauth() | ||
ClientResult<()> refresh_token() | ||
String endpoint_url() | ||
ClientResult<Headers> auth_headers() | ||
ClientResult<()> write_token_cache() | ||
ClientResult<Token> fetch_access_token() | ||
} | ||
|
||
abstract class OAuthClient extends BaseClient{ | ||
<color:green> {abstract} {abstract} &OAuth get_oauth() | ||
<color:green> {abstract} {abstract} ClientResult<()> request_token() | ||
|
||
ClientResult<()> auto_reauth() | ||
<color:green>abstract</color> {abstract} &OAuth get_oauth() | ||
<color:green>abstract</color> {abstract} ClientResult<()> request_token() | ||
--- | ||
Option<Token> read_token_cache() | ||
} | ||
|
||
class AuthCodeSpotify implements OAuthClient{ | ||
&Config get_config() | ||
&HttpClient get_http() | ||
RwLockReadGuard<Option<Token>> get_token() | ||
RwLockWriteGuard<Option<Token>> get_token_mut() | ||
&Credentials get_creds() | ||
ClientResult<Option<Token>> refetch_token() | ||
|
||
&OAuth get_oauth() | ||
ClientResult<()> request_token() | ||
&Config get_config() | ||
&HttpClient get_http() | ||
RwLockReadGuard<Option<Token>> get_token() | ||
RwLockWriteGuard<Option<Token>> get_token_mut() | ||
&Credentials get_creds() | ||
ClientResult<Option<Token>> refetch_token() | ||
--- | ||
&OAuth get_oauth() | ||
ClientResult<()> request_token() | ||
} | ||
|
||
class AuthCodePkceSpotify implements OAuthClient{ | ||
&Config get_config() | ||
&HttpClient get_http() | ||
RwLockReadGuard<Option<Token>> get_token() | ||
RwLockWriteGuard<Option<Token>> get_token_mut() | ||
&Credentials get_creds() | ||
ClientResult<Option<Token>> refetch_token() | ||
|
||
&OAuth get_oauth() | ||
ClientResult<()> request_token() | ||
&HttpClient get_http() | ||
RwLockReadGuard<Option<Token>> get_token() | ||
RwLockWriteGuard<Option<Token>> get_token_mut() | ||
&Credentials get_creds() | ||
ClientResult<Option<Token>> refetch_token() | ||
--- | ||
&OAuth get_oauth() | ||
ClientResult<()> request_token() | ||
} | ||
|
||
class ClientCredsSpotify implements BaseClient{ | ||
&Config get_config() | ||
&HttpClient get_http() | ||
RwLockReadGuard<Option<Token>> get_token() | ||
RwLockWriteGuard<Option<Token>> get_token_mut() | ||
&Credentials get_creds() | ||
ClientResult<Option<Token>> refetch_token() | ||
&Config get_config() | ||
&HttpClient get_http() | ||
RwLockReadGuard<Option<Token>> get_token() | ||
RwLockWriteGuard<Option<Token>> get_token_mut() | ||
&Credentials get_creds() | ||
ClientResult<Option<Token>> refetch_token() | ||
--- | ||
} | ||
@enduml |