{"action":"created","issue":{"url":"https://api.github.com/repos/rubenlagus/TelegramApi/issues/70","repository_url":"https://api.github.com/repos/rubenlagus/TelegramApi","labels_url":"https://api.github.com/repos/rubenlagus/TelegramApi/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/rubenlagus/TelegramApi/issues/70/comments","events_url":"https://api.github.com/repos/rubenlagus/TelegramApi/issues/70/events","html_url":"https://github.com/rubenlagus/TelegramApi/issues/70","id":325579682,"node_id":"MDU6SXNzdWUzMjU1Nzk2ODI=","number":70,"title":"download uploaded file","user":{"login":"khatarat","id":3250509,"node_id":"MDQ6VXNlcjMyNTA1MDk=","avatar_url":"https://avatars2.githubusercontent.com/u/3250509?v=4","gravatar_id":"","url":"https://api.github.com/users/khatarat","html_url":"https://github.com/khatarat","followers_url":"https://api.github.com/users/khatarat/followers","following_url":"https://api.github.com/users/khatarat/following{/other_user}","gists_url":"https://api.github.com/users/khatarat/gists{/gist_id}","starred_url":"https://api.github.com/users/khatarat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khatarat/subscriptions","organizations_url":"https://api.github.com/users/khatarat/orgs","repos_url":"https://api.github.com/users/khatarat/repos","events_url":"https://api.github.com/users/khatarat/events{/privacy}","received_events_url":"https://api.github.com/users/khatarat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-23T07:23:29Z","updated_at":"2018-06-22T03:04:48Z","closed_at":null,"author_association":"NONE","body":"hi\r\ni want to upload a file with telegram api Uploader and then download it. but for request a download task in downloader i need volume_id, secret and localId but i dont know how can i get this parameters.\r\n\r\nuploader just give me a uniqId.\r\n\r\ncan you tell me how can i get this 3 parameters for uploaded file?\r\nvolume_id\r\nsecret\r\nlocalId"},"comment":{"url":"https://api.github.com/repos/rubenlagus/TelegramApi/issues/comments/399306702","html_url":"https://github.com/rubenlagus/TelegramApi/issues/70#issuecomment-399306702","issue_url":"https://api.github.com/repos/rubenlagus/TelegramApi/issues/70","id":399306702,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTMwNjcwMg==","user":{"login":"onixred","id":26665874,"node_id":"MDQ6VXNlcjI2NjY1ODc0","avatar_url":"https://avatars2.githubusercontent.com/u/26665874?v=4","gravatar_id":"","url":"https://api.github.com/users/onixred","html_url":"https://github.com/onixred","followers_url":"https://api.github.com/users/onixred/followers","following_url":"https://api.github.com/users/onixred/following{/other_user}","gists_url":"https://api.github.com/users/onixred/gists{/gist_id}","starred_url":"https://api.github.com/users/onixred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onixred/subscriptions","organizations_url":"https://api.github.com/users/onixred/orgs","repos_url":"https://api.github.com/users/onixred/repos","events_url":"https://api.github.com/users/onixred/events{/privacy}","received_events_url":"https://api.github.com/users/onixred/received_events","type":"User","site_admin":false},"created_at":"2018-06-22T03:04:48Z","updated_at":"2018-06-22T03:04:48Z","author_association":"NONE","body":"I take a message and convert it's structure\r\n\r\npay attention to the line  class TLFileLocation \r\n```\r\nmediaEntity.setLocation(curentLocation);\r\n```\r\n\r\n```\r\n\tpublic static MessageEntity convertTLMessage2MessageEntity(TLMessage message) {\r\n\t\tMessageEntity messageEntity = new MessageEntity();\r\n\t\tmessageEntity.setText(message.getMessage());\r\n\t\tmessageEntity.setId(message.getId());\r\n\t\tTLAbsMessageMedia media = message.getMedia();\r\n\t\tif (media instanceof TLMessageMediaWebPage) {\r\n\t\t\tTLAbsWebPage absWebPage = ((TLMessageMediaWebPage) media).getWebPage();\r\n\t\t\tif (absWebPage instanceof TLWebPage) {\r\n\t\t\t\tMediaEntity mediaEntity = convertTLWebPage2MediaEntity((TLWebPage) absWebPage);\r\n\t\t\t\tmessageEntity.setMedia(mediaEntity);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn messageEntity;\r\n\t}\r\n\r\n\tpublic static MediaEntity convertTLWebPage2MediaEntity(TLWebPage media) {\r\n\t\tMediaEntity mediaEntity = new MediaEntity();\r\n\t\tmediaEntity.setTitle(media.getTitle());\r\n\t\tmediaEntity.setDescription(media.getDescription());\r\n\t\tmediaEntity.setUrlName(media.getDisplay_url());\r\n\t\tmediaEntity.setUrl(media.getUrl());\r\n\r\n\t\tTLAbsPhoto tLAbsPhoto = media.getPhoto();\r\n\t\tif (tLAbsPhoto instanceof TLPhoto) {\r\n\t\t\t// Java timestamp is millisecods past epoch\r\n\t\t\tInstant instant = Instant.ofEpochSecond(((TLPhoto)tLAbsPhoto).getDate());\r\n\t\t\tZonedDateTime zdt = ZonedDateTime.ofInstant(instant, ZoneId.systemDefault());\r\n\t\t\tCalendar cal =  GregorianCalendar.from(zdt);\r\n\t\t\tmediaEntity .setDate(cal.getTime());\r\n\t\t\tTLVector<TLAbsPhotoSize> sizes = ((TLPhoto) tLAbsPhoto).getSizes();\r\n\t\t\tif (sizes != null && !sizes.isEmpty()) {\r\n\t\t\t\tint maxSize = 0;\r\n\t\t\t\tTLFileLocation curentLocation = null;\r\n\t\t\t\tfor (TLAbsPhotoSize tLAbsPhotoSize : sizes) {\r\n\t\t\t\t\tif (tLAbsPhotoSize instanceof TLPhotoSize) {\r\n\t\t\t\t\t\tif (((TLPhotoSize) tLAbsPhotoSize).getSize() > maxSize) {\r\n\t\t\t\t\t\t\tTLAbsFileLocation tLAbsFileLocation = ((TLPhotoSize) tLAbsPhotoSize).getLocation();\r\n\t\t\t\t\t\t\tif (tLAbsFileLocation instanceof TLFileLocation) {\r\n\t\t\t\t\t\t\t\tmaxSize = ((TLPhotoSize) tLAbsPhotoSize).getSize();\r\n\t\t\t\t\t\t\t\tcurentLocation = ((TLFileLocation) tLAbsFileLocation);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tmediaEntity.setLocation(curentLocation);\r\n\t\t\t\tmediaEntity.setSize(maxSize);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn mediaEntity;\r\n\t}\r\n}\r\n```"}}
{"actor":{"display_login":"onixred"}}