To view view in mobile api service we use end point like http://localhost/project/endpoint/node/nid. This is same in web browser like hook_node_view(). I try to check while service api endpoint counter is working or not. I found due to function hook_node_view to count node viewed. But while service api end point call this function is called and counter should not be count. Is there any adequate hook function where I can count node view?

Comments

vimalgoradiya’s picture

Issue summary: View changes
adci_contributor’s picture

Hello.
To add count view you need call function nodeviewcount_insert_node_view($nid, $uid), where $nid - id node and $uid - user id that you need.

adci_contributor’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.