Skip to content

Commit

Permalink
Update metrics documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
PlugFox committed Aug 4, 2023
1 parent ad8099e commit e65beca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions lib/src/client/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,27 @@ import 'package:meta/meta.dart';
import 'package:spinify/src/model/pubspec.yaml.g.dart';

/// Token used for authentication
///
/// {@category Client}
/// {@category Entity}
typedef SpinifyToken = String;

/// Callback to get/refresh tokens
/// This callback is used for initial connection
/// and for refreshing expired tokens.
///
/// If method returns null then connection will be established without token.
///
/// {@category Client}
/// {@category Entity}
typedef SpinifyTokenCallback = FutureOr<SpinifyToken?> Function();

/// Callback to get initial connection payload data.
///
/// If method returns null then no payload will be sent at connect time.
///
/// {@category Client}
/// {@category Entity}
typedef SpinifyConnectionPayloadCallback = FutureOr<List<int>?> Function();

/// {@template spinify_config}
Expand Down
6 changes: 5 additions & 1 deletion lib/src/model/metrics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import 'package:spinify/src/client/state.dart';
/// - unsubscribed
/// - subscribing
/// - subscribed
///
/// {@category Metrics}
/// {@category Entity}
typedef SpinifySubscriptionCount = ({
int total,
int unsubscribed,
Expand All @@ -16,7 +19,8 @@ typedef SpinifySubscriptionCount = ({
/// {@template metrics}
/// Metrics of Spinify client.
/// {@endtemplate}
/// {@category Client}
///
/// {@category Metrics}
/// {@category Entity}
@immutable
final class SpinifyMetrics implements Comparable<SpinifyMetrics> {
Expand Down

0 comments on commit e65beca

Please sign in to comment.