שיטות אחרות

Mutate, Search ו-SearchStream הן השיטות הנפוצות ביותר ב-Google Ads API, אבל יש עוד הרבה שיטות למטרות ספציפיות. כל השירותים וממשקי ה-API שלהם מתועדים במסמכי העזר של REST.

מיפויים של Protocol buffer RPC ל-REST

כל נקודות הקצה (endpoints) של השירות (בין אם נעשה שימוש ב-REST או ב-gRPC) מוגדרות בסופו של דבר בקובצי ה-‎.proto של חבילת השירותים באמצעות שפת ההגדרה של הממשק proto3.

דוגמה: ListAccessibleCustomers

לדוגמה, בקובץ customer_service.proto מוגדרת שיטה ListAccessibleCustomers, בנוסף לשיטה הרגילה Mutate. ההערה google.api.http שלו מתארת איך המיפוי של ה-method מתבצע ל-HTTP. היא משתמשת ב-HTTP GET עם הפועל המותאם אישית listAccessibleCustomers:

rpc ListAccessibleCustomers(ListAccessibleCustomersRequest)
    returns (ListAccessibleCustomersResponse) {
  option (google.api.http) = {
    get: "/v20/customers:listAccessibleCustomers"
  };
}

המיפוי הזה מתבצע לשיטת ה-REST‏ customers.listAccessibleCustomers.

דוגמה: CreateCustomerClient

דוגמה נוספת מ-customer_service.proto היא השיטה CreateCustomerClient. ההערה google.api.http שלו מתארת HTTP POST באמצעות הפועל המותאם אישית createCustomerClient:

rpc CreateCustomerClient(CreateCustomerClientRequest)
    returns (CreateCustomerClientResponse) {
  option (google.api.http) = {
    post: "/v20/customers/{customer_id=*}:createCustomerClient"
    body: "*"
  };
  option (google.api.method_signature) = "customer_id,customer_client";
}

המיפוי הזה מתבצע לשיטת ה-REST‏ customers.createCustomerClient.