コード例 #1
0
ファイル: FileAPI.cs プロジェクト: chanos-dev/VirusChan
        public FileScan FileScan(PostFile file)
        {
            this.ApiParams = new string[] { "scan" };

            string URL = GetFullAPIURL();

            Dictionary <string, object> ApiParams = new Dictionary <string, object>()
            {
                ["file"]   = file,
                ["apikey"] = ApiKey
            };

            ResponseAPI responseAPI = RequestAPI.SendRequest(URL, Method.POST, ApiParams).Result;

            return(CreateFileScan(responseAPI));
        }
コード例 #2
0
ファイル: FileAPI.cs プロジェクト: chanos-dev/VirusChan
        public FileScan FileReport(string resource)
        {
            this.ApiParams = new string[] { "report" };

            Dictionary <string, string> ApiParams = new Dictionary <string, string>()
            {
                ["apikey"]   = ApiKey,
                ["resource"] = resource
            };

            string URL = GetFullAPIURL(ApiParams);

            ResponseAPI responseAPI = RequestAPI.SendRequest(URL, Method.GET).Result;

            return(CreateFileScan(responseAPI));
        }