Skip to content

Commit 89a868b

Browse files
committed
Added more samples for Email Verification API, DNS API, Reverse Whois API, Domain Availability API, Brand ALert API.
Whois API LLC
1 parent 7cff819 commit 89a868b

206 files changed

Lines changed: 13947 additions & 20 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.idea/*
1+
.idea/*
2+
reverseWhoisApi/password/java/ReverseApiExample/.idea/*
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0"?>
2+
<configuration>
3+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
using System;
2+
using System.Xml;
3+
4+
// Note that you need to make sure your Project is set to ".NET Framework 4" and NOT ".NET Framework 4 Client Profile"
5+
// Once that is set, make sure the following references are present under the References tree under the project:
6+
// Microsoft.CSharp, System, System.Web.Extensions, and System.XML
7+
8+
namespace Sample_CSharp_API_Client
9+
{
10+
public class brandAlertApiQuery
11+
{
12+
static void Main(string[] args)
13+
{
14+
//////////////////////////
15+
// Fill in your details //
16+
//////////////////////////
17+
string username = "username";
18+
string password = "xxxxxxxxxx";
19+
20+
string term1 = "cinema";
21+
string exclude_term1 = "online";
22+
23+
/////////////////////////
24+
// Use an XML resource //
25+
/////////////////////////
26+
String format = "XML";
27+
String url = "https://www.whoisxmlapi.com/brand-alert-api/search.php?" + "username=" + username + "&password=" + password + "&output_format=" + format +
28+
"&term1=" + term1 + "&exclude_term1=" + exclude_term1;
29+
// Download JSON into a dynamic object
30+
dynamic result = new System.Net.WebClient().DownloadString(url);
31+
try
32+
{
33+
var xmlDoc = new XmlDocument();
34+
xmlDoc.LoadXml(result);
35+
WriteXml(xmlDoc);
36+
}
37+
catch (Exception e)
38+
{
39+
try
40+
{
41+
Console.WriteLine("JSON:\nErrorMessage:\n\t{0}", result.ErrorMessage.msg);
42+
}
43+
catch (Exception e2)
44+
{
45+
Console.WriteLine("An unkown error has occurred!");
46+
}
47+
}
48+
// Prevent command window from automatically closing during debugging
49+
Console.WriteLine("Press any key to continue...");
50+
Console.ReadKey();
51+
}
52+
53+
public static void WriteXml(XmlDocument doc)
54+
{
55+
XmlTextWriter writer = new XmlTextWriter(Console.Out);
56+
writer.Formatting = System.Xml.Formatting.Indented;
57+
doc.WriteTo(writer);
58+
writer.Flush();
59+
Console.WriteLine();
60+
}
61+
}
62+
}
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{237C394F-02AB-4688-A382-C69B283F4FFA}</ProjectGuid>
9+
<OutputType>Exe</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>brandAlertApi</RootNamespace>
12+
<AssemblyName>brandAlertApi</AssemblyName>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
14+
<TargetFrameworkProfile>
15+
</TargetFrameworkProfile>
16+
<FileAlignment>512</FileAlignment>
17+
<PublishUrl>publish\</PublishUrl>
18+
<Install>true</Install>
19+
<InstallFrom>Disk</InstallFrom>
20+
<UpdateEnabled>false</UpdateEnabled>
21+
<UpdateMode>Foreground</UpdateMode>
22+
<UpdateInterval>7</UpdateInterval>
23+
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
24+
<UpdatePeriodically>false</UpdatePeriodically>
25+
<UpdateRequired>false</UpdateRequired>
26+
<MapFileExtensions>true</MapFileExtensions>
27+
<ApplicationRevision>0</ApplicationRevision>
28+
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
29+
<IsWebBootstrapper>false</IsWebBootstrapper>
30+
<UseApplicationTrust>false</UseApplicationTrust>
31+
<BootstrapperEnabled>true</BootstrapperEnabled>
32+
</PropertyGroup>
33+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
34+
<PlatformTarget>x86</PlatformTarget>
35+
<DebugSymbols>true</DebugSymbols>
36+
<DebugType>full</DebugType>
37+
<Optimize>false</Optimize>
38+
<OutputPath>bin\Debug\</OutputPath>
39+
<DefineConstants>DEBUG;TRACE</DefineConstants>
40+
<ErrorReport>prompt</ErrorReport>
41+
<WarningLevel>4</WarningLevel>
42+
<Prefer32Bit>false</Prefer32Bit>
43+
</PropertyGroup>
44+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
45+
<PlatformTarget>x86</PlatformTarget>
46+
<DebugType>pdbonly</DebugType>
47+
<Optimize>true</Optimize>
48+
<OutputPath>bin\Release\</OutputPath>
49+
<DefineConstants>TRACE</DefineConstants>
50+
<ErrorReport>prompt</ErrorReport>
51+
<WarningLevel>4</WarningLevel>
52+
<Prefer32Bit>false</Prefer32Bit>
53+
</PropertyGroup>
54+
<ItemGroup>
55+
<Compile Include="brandAlertApiExample.cs" />
56+
</ItemGroup>
57+
<ItemGroup>
58+
<Reference Include="Microsoft.CSharp" />
59+
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
60+
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
61+
</Reference>
62+
<Reference Include="System" />
63+
<Reference Include="System.Web.Extensions" />
64+
<Reference Include="System.XML" />
65+
</ItemGroup>
66+
<ItemGroup>
67+
<None Include="app.config" />
68+
<None Include="packages.config" />
69+
</ItemGroup>
70+
<ItemGroup>
71+
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
72+
<Visible>False</Visible>
73+
<ProductName>Microsoft .NET Framework 4.0 %28x86 and x64%29</ProductName>
74+
<Install>true</Install>
75+
</BootstrapperPackage>
76+
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
77+
<Visible>False</Visible>
78+
<ProductName>.NET Framework 3.5 SP1</ProductName>
79+
<Install>false</Install>
80+
</BootstrapperPackage>
81+
</ItemGroup>
82+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
83+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
84+
Other similar extension points exist, see Microsoft.Common.targets.
85+
<Target Name="BeforeBuild">
86+
</Target>
87+
<Target Name="AfterBuild">
88+
</Target>
89+
-->
90+
</Project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26430.16
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "brandAlertApiExample", "brandAlertApi\brandAlertApiExample.csproj", "{237C394F-02AB-4688-A382-C69B283F4FFA}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x86 = Debug|x86
11+
Release|x86 = Release|x86
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{237C394F-02AB-4688-A382-C69B283F4FFA}.Debug|x86.ActiveCfg = Debug|x86
15+
{237C394F-02AB-4688-A382-C69B283F4FFA}.Debug|x86.Build.0 = Debug|x86
16+
{237C394F-02AB-4688-A382-C69B283F4FFA}.Release|x86.ActiveCfg = Release|x86
17+
{237C394F-02AB-4688-A382-C69B283F4FFA}.Release|x86.Build.0 = Release|x86
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- You may freely edit this file. See commented blocks below for -->
3+
<!-- some examples of how to customize the build. -->
4+
<!-- (If you delete it and reopen the project it will be recreated.) -->
5+
<!-- By default, only the Clean and Build commands use this build script. -->
6+
<!-- Commands such as Run, Debug, and Test only use this build script if -->
7+
<!-- the Compile on Save feature is turned off for the project. -->
8+
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
9+
<!-- in the project's Project Properties dialog box.-->
10+
<project name="BrandAlertApiExample" default="default" basedir=".">
11+
<description>Builds, tests, and runs the project BrandAlertApiExample.</description>
12+
<import file="nbproject/build-impl.xml"/>
13+
<!--
14+
15+
There exist several targets which are by default empty and which can be
16+
used for execution of your tasks. These targets are usually executed
17+
before and after some main targets. They are:
18+
19+
-pre-init: called before initialization of project properties
20+
-post-init: called after initialization of project properties
21+
-pre-compile: called before javac compilation
22+
-post-compile: called after javac compilation
23+
-pre-compile-single: called before javac compilation of single file
24+
-post-compile-single: called after javac compilation of single file
25+
-pre-compile-test: called before javac compilation of JUnit tests
26+
-post-compile-test: called after javac compilation of JUnit tests
27+
-pre-compile-test-single: called before javac compilation of single JUnit test
28+
-post-compile-test-single: called after javac compilation of single JUunit test
29+
-pre-jar: called before JAR building
30+
-post-jar: called after JAR building
31+
-post-clean: called after cleaning build products
32+
33+
(Targets beginning with '-' are not intended to be called on their own.)
34+
35+
Example of inserting an obfuscator after compilation could look like this:
36+
37+
<target name="-post-compile">
38+
<obfuscate>
39+
<fileset dir="${build.classes.dir}"/>
40+
</obfuscate>
41+
</target>
42+
43+
For list of available properties check the imported
44+
nbproject/build-impl.xml file.
45+
46+
47+
Another way to customize the build is by overriding existing main targets.
48+
The targets of interest are:
49+
50+
-init-macrodef-javac: defines macro for javac compilation
51+
-init-macrodef-junit: defines macro for junit execution
52+
-init-macrodef-debug: defines macro for class debugging
53+
-init-macrodef-java: defines macro for class execution
54+
-do-jar-with-manifest: JAR building (if you are using a manifest)
55+
-do-jar-without-manifest: JAR building (if you are not using a manifest)
56+
run: execution of project
57+
-javadoc-build: Javadoc generation
58+
test-report: JUnit report generation
59+
60+
An example of overriding the target for project execution could look like this:
61+
62+
<target name="run" depends="BrandAlertApiExample-impl.jar">
63+
<exec dir="bin" executable="launcher.exe">
64+
<arg file="${dist.jar}"/>
65+
</exec>
66+
</target>
67+
68+
Notice that the overridden target depends on the jar target and not only on
69+
the compile target as the regular run target does. Again, for a list of available
70+
properties which you can use, check the target you are overriding in the
71+
nbproject/build-impl.xml file.
72+
73+
-->
74+
</project>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)