- Publicity: Public Only All
views-procs.tcl
Tcl library for recoding views
- Location:
- packages/views/tcl/views-procs.tcl
- Created:
- 2004-05-20
- Author:
- Jeff Davis
- CVS Identification:
$Id: views-procs.tcl,v 1.11 2018/07/26 15:12:22 hectorr Exp $
Procedures in this file
- views::get (public)
- views::record_view (public)
- views::viewed_p (public)
Detailed information
views::get (public)
views::get [ -object_id object_id ]
Return an array (which you have to set with "array set your_array [views::get -object_id $object_id]") with the elements:
- views_count
- unique_views
- last_viewed
- Switches:
- -object_id (optional)
- ID of the object for which you want to return the views
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- view_api_test_without_type, view_api_test_with_type
views::record_view (public)
views::record_view [ -object_id object_id ] [ -viewer_id viewer_id ] \ [ -type type ]
Record an object view by viewer_id
- Switches:
- -object_id (optional)
- -viewer_id (optional)
- -type (optional)
- Returns:
- the total view count for the user
- Author:
- Jeff Davis davis@xarg.net
- Created:
- 2004-01-30
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- view_api_test_without_type, view_api_test_with_type
views::viewed_p (public)
views::viewed_p [ -object_id object_id ] [ -user_id user_id ] \ [ -type type ]
Returns whether an object was viewed by specified user.
- Switches:
- -object_id (optional)
- viewed object id
- -user_id (optional, defaults to
"0"
)- viewing user id
- -type (optional)
- filter results by type
- Returns:
- boolean value
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- view_api_test_without_type, view_api_test_with_type