BingAds API Json响应 [英] BingAds API Json Response

查看:67
本文介绍了BingAds API Json响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨BingAds API团队,

Hey BingAds API team,

我想知道是否有可能获得关键字,广告系列或帐户通过Json响应的性能报告,以便我可以轻松使用数据。是的,我必须获取下载URL,下载文件,解压缩并从CSV解析数据。如果我想自动化分析数据的过程,那真的是
不方便。有没有这么容易做到?>

I would like to know if it is possible to get a keyword, campaign or account performance report through a Json response so that i can easily use the data. Right, i have to get the download URL, download file, Unzip and parse out data from CSV. It is really not handy if i want to automate the process to analyze the data. Is there an easy to do that?>

谢谢,

Alex

推荐答案

您好Alex。

Hi Alex.

JSON 目前不在支持。您可能希望在
https://bingads.uservoice.com 上发布功能建议。

JSON is not currently supported. You may want to post a feature suggestion at https://bingads.uservoice.com.

关于您对自动化的关注,有一些库可用于解压缩下载的文件。你使用哪种编程语言?例如,这是一个C#示例:

With respect to your concern about automation, there are libraries available for unzipping the downloaded file. Which programming language are you using? For example, here is a C# example:

        //解压缩ZIP存档并将内容写入指定的文件路径。
$


        private
static void DecompressFile ( string fromZipArchive,
string toExtractedFile)

   ;      {

           
var
fileInfo = new FileInfo(toExtractedFile);



           
//如果指定路径中的文件夹不存在,请创建它们。




           
if
(fileInfo.Directory!= null &&!fileInfo.Directory.Exists )

            {

                fileInfo.Directory.Create();

            }


           
使用
(ZipArchive archive = ZipFile.OpenRead(fromZipArchive))

             {

               
foreach (ZipArchiveEntry条目
in
archive.Entries)

                {

                    entry.ExtractToFile(toExtractedFile,
true );

         ;        }
            }
        } b $ b

        // Decompresses a ZIP Archive and writes the contents to the specified file path.

        private static void DecompressFile(string fromZipArchive, string toExtractedFile)
        {
            var fileInfo = new FileInfo(toExtractedFile);

            // If the folders in the specified path do not exist, create them.

            if (fileInfo.Directory != null && !fileInfo.Directory.Exists)
            {
                fileInfo.Directory.Create();
            }

            using (ZipArchive archive = ZipFile.OpenRead(fromZipArchive))
            {
                foreach (ZipArchiveEntry entry in archive.Entries)
                {
                    entry.ExtractToFile(toExtractedFile, true);
                }
            }
        }

我希望这有帮助!


这篇关于BingAds API Json响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆