Changes between Version 1 and Version 4 of Ticket #936
- Timestamp:
- 04/05/11 18:39:04 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #936
- Property Summary changed from Watch / follow a package to Follow / watch package extension
- Property Repository changed from to ckan
- Property Theme changed from to none
- Property Milestone changed from ckan-v1.4 to ckan-v1.4-sprint-5
- Property Owner set to johnglover
-
Ticket #936 – Description
v1 v4 3 3 NB: this is as much (if not more) about showing what packages are interesting to people as giving info to 'watchers'. 4 4 5 TODO: finalize terminology (github uses watch for repos and follow for users while bitbucket combines both in 'followers'). 5 Need to finalize terminology (github uses watch for repos and follow for users while bitbucket combines both in 'followers'). '''Decision: use follow''' 6 6 7 7 == Implementation == 8 8 9 Become watcher: 9 === Interface === 10 10 11 * Watch button on packages (if already watching say 'Unwatch') 11 Become a follower: 12 13 * Follow button on packages (if already watching say 'unfollow') 12 14 13 15 Package-related changes: 14 16 15 * Show number of watchers on a package16 * List number of watchers of a package17 * On a separate page (a la github) or on the main page (more like bitbucket overview)18 17 * Show number of followers on a package 18 * List followers of a package at /package/{name}/followers 19 * On a separate page 20 a package 19 21 User-related changes: 20 22 21 * Show what packages a user has started/stopped followed on a user's public activity stream on their user page 22 * List watched packages 23 * List followed packages 23 24 * Either on user's page on a separate 'following' page. (NB: called 'following') 24 25 * Does watching involve notifications (by email) 25 26 * Probably not: you can already subscribe to RSS feed after all and email not that necessary (?) 27 * [Future - don't have activity stream yet] Show what packages a user has started/stopped followed on a user's public activity stream on their user page 26 28 29 === Nitty-Gritty === 27 30 31 * Want to do this in ajax-y manner 32 * API endpoint: /api/2/follower 33 * Store data in a new follower table 34 35 ==== API ==== 36 37 /api/2/follower 38 39 {{{ 40 follow => PUT / POST 41 { 42 user_id 43 object_type 44 object_id 45 } 46 }}} 47 48 If this is submitted by a user with user.id != user_id => error (401) 49 50 {{{ 51 unfollow => DELETE 52 53 /api/2/follower/package/{id} 54 => list of followers 55 [ 56 { safe dictized user } 57 ] 58 }}} 59 60 NB: depends on access to a 'safe' dictized user object. Dictization is in nearly done, and current example of doing this by hand is in user API autocomplete method. 61 62 ==== Table ==== 63 64 Called 'follower' 65 66 {{{ 67 user_id, table, object_id, created 68 xxx, package, yyy, ... 69 xxx, user, yyy, ... [future] 70 }}} 71 28 72 === Random Extras === 29 73