Fix tts and meetings api

This commit is contained in:
James Shiffer 2023-01-04 04:55:21 -08:00 committed by james
parent 3be553a9de
commit 665333bbbe
7 changed files with 18 additions and 16 deletions

View File

@ -162,7 +162,9 @@
<DependentUpon>VinnySpam.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>

View File

@ -12,6 +12,7 @@ namespace FemboyWatchdog
private Timer _timer;
public IPLocationData LocationData { get; private set; }
public string IPAddress { get; private set; }
internal class IPLocationData
{
@ -77,14 +78,15 @@ namespace FemboyWatchdog
try
{
if (!_wcLocation.IsBusy)
/*if (!_wcLocation.IsBusy)
_wcLocation.DownloadStringAsync(new Uri(
string.Format(
"http://api.ipstack.com/{0}?access_key={1}&fields=latitude,longitude,region_name,country_name,city",
e.Result,
Properties.Settings.Default.IpStackApiToken
)
));
));*/
IPAddress = e.Result;
}
catch (WebException err) { }
}

View File

@ -119,13 +119,9 @@ namespace FemboyWatchdog
{
try
{
_meetingChecker.DownloadStringAsync(new Uri(
string.Format(
"{0}meet/?token={1}",
Properties.Settings.Default.FemboyApiBaseUrl,
Properties.Settings.Default.FemboyApiToken
)
));
_meetingChecker.DownloadStringAsync(
new Uri(Properties.Settings.Default.FemboyApiBaseUrl + "meet")
);
}
catch (WebException err) { }
}

View File

@ -173,6 +173,8 @@ namespace FemboyWatchdog
private void ttsTimer_Tick(object sender, EventArgs e)
{
string msg = "You are being monitored.";
if (tracker.IPAddress != null)
msg += string.Format(" Your IP is: {0}", tracker.IPAddress);
if (tracker.LocationData != null)
msg += string.Format(" Your location is: {0}, {1}", tracker.LocationData.latitude, tracker.LocationData.longitude);
ss.SpeakAsync(msg);

View File

@ -25,7 +25,7 @@ namespace FemboyWatchdog.Properties {
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("http://howfeed.biz/api/")]
[global::System.Configuration.DefaultSettingValueAttribute("https://api.femboyfinancial.jp/")]
public string FemboyApiBaseUrl {
get {
return ((string)(this["FemboyApiBaseUrl"]));
@ -43,7 +43,7 @@ namespace FemboyWatchdog.Properties {
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("31d59064bb7ef00a9daff4794b73118c")]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string IpStackApiToken {
get {
return ((string)(this["IpStackApiToken"]));

View File

@ -3,13 +3,13 @@
<Profiles />
<Settings>
<Setting Name="FemboyApiBaseUrl" Type="System.String" Scope="Application">
<Value Profile="(Default)">http://howfeed.biz/api/</Value>
<Value Profile="(Default)">https://api.femboyfinancial.jp/</Value>
</Setting>
<Setting Name="FemboyApiToken" Type="System.String" Scope="Application">
<Value Profile="(Default)">1445</Value>
</Setting>
<Setting Name="IpStackApiToken" Type="System.String" Scope="Application">
<Value Profile="(Default)">31d59064bb7ef00a9daff4794b73118c</Value>
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>

View File

@ -9,13 +9,13 @@
<applicationSettings>
<FemboyWatchdog.Properties.Settings>
<setting name="FemboyApiBaseUrl" serializeAs="String">
<value>http://howfeed.biz/api/</value>
<value>https://api.femboyfinancial.jp/</value>
</setting>
<setting name="FemboyApiToken" serializeAs="String">
<value>1445</value>
</setting>
<setting name="IpStackApiToken" serializeAs="String">
<value>31d59064bb7ef00a9daff4794b73118c</value>
<value />
</setting>
</FemboyWatchdog.Properties.Settings>
</applicationSettings>