Skip to content

The C# connector is written using Visual Studio 2015 and targets .NET Framework 3.5.

License

Notifications You must be signed in to change notification settings

majestic/Csharp-API-Connector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C# Majestic API Connector

The C# connector is written using Visual Studio 2015 and targets .NET Framework 3.5.

var api = new APIService("MY_API_KEY", "https://api.majestic.com/api_command");

var parameters = new Dictionary<string, string>()
{
	{"items", "1"},
	{"item0", "majestic.com"}
};

Response response = api.ExecuteCommand("GetIndexItemInfo", parameters);

if (response.IsOK())
{
	DataTable dataTable = response.GetTableForName("Results");
	List<Dictionary<string, string>> rows = dataTable.GetTableRows();
	Dictionary<string, string> result = rows[0];

	Console.WriteLine(result["ExtBackLinks"]);
}
else
{
	Console.WriteLine(response.GetErrorMessage());
}

A full list of available commands can be found within the developer documentation.

About

The C# connector is written using Visual Studio 2015 and targets .NET Framework 3.5.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages