Google Search Appliance Administrative API Developers Gui Manuel d'utilisateur Page 14

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 55
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 13
Google Search Appliance: Administrative API Developer’s Guide: .NET 14
Retrieve an individual crawler access rule as follows:
// Send the request and print the response
GsaEntry myEntry = myService.GetEntry("crawlAccessNTLM", "urlPattern");
Console.WriteLine("URL Pattern: " + myEntry.GetGsaContent("urlPattern"));
Console.WriteLine("User Name: " + myEntry.GetGsaContent("username"));
Console.WriteLine("Order: " + myEntry.GetGsaContent("order"));
Console.WriteLine("Domain: " + myEntry.GetGsaContent("domain"));
Console.WriteLine("Is Public: " + myEntry.GetGsaContent("isPublic"));
Note: The
password
property doesn’t appear when retrieving crawler access rules.
Updating a Crawler Access Rule
Update a crawler access rule as follows:
// Create an entry to hold properties to update
GsaEntry updateEntry = new GsaEntry();
// Add properties to updateEntry
updateEntry.AddGsaContent("urlPattern", "#new URL pattern");
updateEntry.AddGsaContent("domain", "newdomain");
updateEntry.AddGsaContent("isPublic", "0");
updateEntry.AddGsaContent("order", "2");
updateEntry.AddGsaContent("username", "newuser");
updateEntry.AddGsaContent("password", "newpass");
// Send the request
myService.UpdateEntry("crawlAccessNTLM", "urlPattern", updateEntry);
Deleting a Crawler Access Rule
Delete a crawler access rule as follows:
myService.DeleteEntry("crawlAccessNTLM", "urlPattern");
Vue de la page 13
1 2 ... 9 10 11 12 13 14 15 16 17 18 19 ... 54 55

Commentaires sur ces manuels

Pas de commentaire