Line data Source code
1 : import 'package:stream_feed_dart/src/core/models/feed_id.dart'; 2 : 3 : class Routes { 4 : static const _addToManyPath = 'feed/add_to_many'; 5 : static const _followManyPath = 'follow_many'; 6 : static const _unfollowManyPath = 'unfollow_many'; 7 : static const _activitiesPath = 'activities'; 8 : static const _enrichActivitiesPath = 'enrich/$_activitiesPath'; 9 : static const _activityUpdatePath = 'activity'; 10 : static const _reactionsPath = 'reaction'; 11 : static const _usersPath = 'user'; 12 : static const _collectionsPath = 'collections'; 13 : static const _openGraphPath = 'og'; 14 : static const _feedPath = 'feed'; 15 : static const _enrichedFeedPath = 'enrich/$_feedPath'; 16 : static const _filesPath = 'files'; 17 : static const _imagesPath = 'images'; 18 : 19 1 : static String buildFeedUrl(FeedId feed, [String path = '']) => 20 3 : '$_feedPath/${feed.slug}/${feed.userId}/$path'; 21 : 22 1 : static String buildEnrichedFeedUrl(FeedId feed, [String path = '']) => 23 3 : '$_enrichedFeedPath/${feed.slug}/${feed.userId}/$path'; 24 : 25 1 : static String get enrichedActivitiesUrl => _enrichActivitiesPath; 26 : 27 1 : static String buildCollectionsUrl([String? path = '']) => 28 1 : '$_collectionsPath/$path'; 29 : 30 1 : static String buildReactionsUrl([String path = '']) => 31 1 : '$_reactionsPath/$path'; 32 : 33 2 : static String buildUsersUrl([String path = '']) => '$_usersPath/$path'; 34 : 35 2 : static String get filesUrl => _filesPath; 36 : 37 2 : static String get imagesUrl => _imagesPath; 38 : 39 2 : static String get openGraphUrl => _openGraphPath; 40 : 41 2 : static String get activityUpdateUrl => _activityUpdatePath; 42 : 43 1 : static String get addToManyUrl => _addToManyPath; 44 : 45 1 : static String get followManyUrl => _followManyPath; 46 : 47 1 : static String get unfollowManyUrl => _unfollowManyPath; 48 : 49 1 : static String get activitesUrl => _activitiesPath; 50 : }