วิธีการอื่นๆ

แม้ว่า Mutate, Search และ SearchStream จะเป็นวิธีที่พบบ่อยที่สุดใน Google Ads API แต่ก็ยังมีวิธีอื่นๆ อีกมากมายสำหรับวัตถุประสงค์เฉพาะ บริการทั้งหมดและ API ของบริการจะอยู่ใน เอกสารอ้างอิง

การแมป RPC แบบ Protocol Buffer กับ REST

ในท้ายที่สุด ระบบจะกำหนดปลายทางของบริการทั้งหมด (ไม่ว่าจะใช้ REST หรือ gRPC) ในไฟล์ .proto ของแพ็กเกจบริการ โดยใช้ภาษาคำจำกัดความอินเทอร์เฟซ proto3

ตัวอย่าง: ListAccessibleCustomers

เช่น ไฟล์ customer_service.proto กำหนดเมธอด ListAccessibleCustomers นอกเหนือจาก Mutate มาตรฐาน คำอธิบายประกอบ google.api.http อธิบาย วิธีที่เมธอดนี้เชื่อมโยงกับ HTTP โดยใช้ HTTP GET กับคำกริยาที่กำหนดเอง listAccessibleCustomers:

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

ซึ่งแมปกับเมธอด REST ของ customers.listAccessibleCustomers

ตัวอย่าง: CreateCustomerClient

อีกตัวอย่างหนึ่งจาก customer_service.proto คือเมธอด CreateCustomerClient google.api.httpคำอธิบายประกอบของมันอธิบายPOST HTTP createCustomerClient โดยใช้คำกริยาที่กำหนดเอง

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

ซึ่งจะแมปกับเมธอด REST customers.createCustomerClient