Changes between Version 1 and Version 4 of Ticket #936


Ignore:
Timestamp:
04/05/11 18:39:04 (3 years ago)
Author:
rgrp
Comment:

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  
    33NB: this is as much (if not more) about showing what packages are interesting to people as giving info to 'watchers'. 
    44 
    5 TODO: finalize terminology (github uses watch for repos and follow for users while bitbucket combines both in 'followers'). 
     5Need to finalize terminology (github uses watch for repos and follow for users while bitbucket combines both in 'followers'). '''Decision: use follow''' 
    66 
    77== Implementation == 
    88 
    9 Become watcher: 
     9=== Interface === 
    1010 
    11  * Watch button on packages (if already watching say 'Unwatch') 
     11Become a follower: 
     12 
     13 * Follow button on packages (if already watching say 'unfollow') 
    1214 
    1315Package-related changes: 
    1416 
    15  * Show number of watchers on a package 
    16  * List number of watchers of a package 
    17   * 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 
     20a package 
    1921User-related changes: 
    2022 
    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 
    2324  * Either on user's page on a separate 'following' page. (NB: called 'following') 
    2425 * Does watching involve notifications (by email) 
    2526  * 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 
    2628 
     29=== Nitty-Gritty === 
    2730 
     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{{{ 
     40follow => PUT / POST 
     41{ 
     42   user_id 
     43   object_type 
     44   object_id 
     45} 
     46}}} 
     47 
     48If this is submitted by a user with user.id != user_id => error (401) 
     49 
     50{{{ 
     51unfollow => DELETE 
     52 
     53/api/2/follower/package/{id} 
     54=> list of followers 
     55[ 
     56    { safe dictized user } 
     57] 
     58}}} 
     59 
     60NB: 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 
     64Called 'follower' 
     65 
     66{{{ 
     67user_id, table, object_id, created 
     68xxx, package, yyy, ... 
     69xxx, user, yyy, ... [future] 
     70}}} 
     71  
    2872=== Random Extras === 
    2973