The scp tutorial at http://api.libssh.org/master/libssh_tutor_scp.html mentions SSH_SCP_REQUEST_NEWDIRECTORY and SSH_SCP_REQUEST_ENDDIRECTORY. These should be SSH_SCP_REQUEST_NEWDIR and SSH_SCP_REQUEST_ENDDIR instead.
Also the tutorial is a bit sparse, it would be helpful to link to examples/scp_download.c on the git server. I found this example really helpful when trying to understand how to scp directories.