Jira Download Attachments Of Issues

Please can anyone share jira document pdf and also sample code to download attachments for issues from jira