使用Google Play API的新功能。试图让他们的样本工作。
https://developers.google.com/api-client-library/dotnet/get_started
他们的using
陈述,
using System;
using System.Threading.Tasks;
using Google.Apis.Discovery.v1;
using Google.Apis.Discovery.v1.Data;
using Google.Apis.Services;
不起作用的行 -
var service = new DiscoveryService(new BaseClientService.Initializer
{
ApplicationName = "Discovery Sample",
ApiKey = "[YOUR_API_KEY_HERE]",
});
foreach (DirectoryList.ItemsData api in result.Items)
不确定它是否适用于任何人,但我似乎无法找到DiscoveryService
和DirectoryList
的命名空间。
有谁知道哪个名称空间DiscoveryService
和DirectoryList
属于哪个?我试图在对象浏览器中探索,但无法找到这些类/方法。
答案 0 :(得分:2)
我找到了它!不得不安装new DiscoveryService()
nugget包,之前它已经丢失了。
using Google.Apis.Discovery.v1.Data;
- > DirectoryList.ItemsData
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName testing.myApp.io
# ProxyPreserveHost On
# ProxyPass / http://127.0.0.1:8888/
# ProxyPassReverse / http://127.0.0.1:8888/
LogLevel info
WSGIDaemonProcess myApp user=myUser threads=1 home=/var/www/myApp/
WSGIScriptAlias / /var/www/myApp/myApp.wsgi
WSGIPassAuthorization On
<Directory /var/www/myApp/app/>
WSGIProcessGroup myApp
WSGIApplicationGroup %{GLOBAL}
Order allow,deny
Allow from all
</Directory>
Alias /static /var/www/myApp/app/static
<Directory /var/www/myApp/app/static/>
Order allow,deny
Allow from all
</Directory>
Include /etc/letsencrypt/options-ssl-apache.conf
#ServerAlias testing.myApp.io
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/testing.myApp.io/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/testing.myApp.io/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
- &gt; #!/usr/bin/python3
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/myApp/")
from app import app as application
现在好了。