मीटिंग के लिए इस्तेमाल होने वाले स्पेस

Google Meet REST API का उदाहरण

इस गाइड में, मीटिंग स्पेस बनाने, उसे पाने, और अपडेट करने का तरीका बताया गया है. साथ ही, Google Meet REST API के spaces रिसॉर्स पर, किसी चालू कॉन्फ़्रेंस को खत्म करने का तरीका भी बताया गया है.

मीटिंग स्पेस, किसी वर्चुअल जगह या ऐसे ऑब्जेक्ट (जैसे, मीटिंग रूम) को दिखाता है जहां कॉन्फ़्रेंस आयोजित किए जाते हैं. किसी भी समय, एक स्पेस में सिर्फ़ एक कॉन्फ़्रेंस चालू की जा सकती है. मीटिंग के लिए जगह से, उपयोगकर्ताओं को शेयर किए गए संसाधनों को ढूंढने और उनसे जुड़ने में भी मदद मिलती है.

प्रोग्राम के हिसाब से मीटिंग स्पेस कॉन्फ़िगर करने का तरीका जानने के लिए, मीटिंग स्पेस और सदस्यों को कॉन्फ़िगर करना लेख पढ़ें.

नीचे दी गई टेबल में, मीटिंग स्पेस के तरीकों का इस्तेमाल करने के लिए, मीटिंग में सदस्यों की ज़रूरी भूमिकाओं के बारे में बताया गया है:

तरीका स्वामी पार्टी में शामिल लोग अन्य
endActiveConference() x
get() x x x
     सेटिंग x
     ऐक्टिव कॉन्फ़्रेंस के साथ x x
patch() x

उपयोगकर्ता के क्रेडेंशियल की मदद से पुष्टि करने और अनुमति देने पर, Google Meet ऐप्लिकेशन, उपयोगकर्ता का डेटा ऐक्सेस कर सकते हैं. साथ ही, पुष्टि किए गए उपयोगकर्ता की ओर से कार्रवाइयां कर सकते हैं. डोमेन के लिए ऐक्सेस देने की सुविधा का इस्तेमाल करके पुष्टि करने पर, आपको ऐप्लिकेशन के सेवा खाते को अपने उपयोगकर्ताओं का डेटा ऐक्सेस करने की अनुमति देने की सुविधा मिलती है. इसके लिए, आपको हर उपयोगकर्ता से सहमति लेने की ज़रूरत नहीं होती.

Meet, मीटिंग स्पेस की पहचान कैसे करता है

Google Meet REST API, हर मीटिंग स्पेस के लिए एक spaces रिसॉर्स जनरेट करता है. name फ़ील्ड, संसाधन का नाम होता है.

name फ़ील्ड का इस्तेमाल करके, मीटिंग स्पेस की पहचान करने के दो अहम तरीके यहां दिए गए हैं:

  • space, स्पेस का रिसॉर्स आइडेंटिफ़ायर है, जिसे spaces/{space} के तौर पर फ़ॉर्मैट किया गया है. यह सर्वर से जनरेट किया गया यूनीक आईडी होता है. यह केस-सेंसिटिव होता है. उदाहरण के लिए, spaces/jQCFfuBOdN5z.

  • meetingCode, स्पेस का उपनाम है, जिसे spaces/{meetingCode} के तौर पर फ़ॉर्मैट किया गया है. यह टाइप की जा सकने वाली, यूनीक वर्ण स्ट्रिंग होती है. साथ ही, यह केस-सेंसिटिव (बड़े और छोटे अक्षरों में अंतर) नहीं होती. उदाहरण के लिए, abc-mnop-xyz. इसमें 128 से ज़्यादा वर्ण नहीं हो सकते. यह meetingUri: https://meet.google.com/abc-mnop-xyz का हिस्सा है.

मीटिंग स्पेस को मैनेज करने के लिए, {name} फ़ील्ड के लिए इन वैल्यू का इस्तेमाल करें:

  • मीटिंग स्पेस के बारे में जानकारी पाने के लिए, spaces/{space} या उसका दूसरा नाम spaces/{meetingCode} इस्तेमाल किया जा सकता है. ज़्यादा जानकारी के लिए, मीटिंग के लिए स्फ़ेस पाना लेख पढ़ें.

  • मीटिंग स्पेस की जानकारी अपडेट करने के लिए, सिर्फ़ spaces/{space} का इस्तेमाल किया जा सकता है. ज़्यादा जानकारी के लिए, मीटिंग स्पेस अपडेट करना लेख पढ़ें.

  • मीटिंग स्पेस में चल रही किसी कॉन्फ़्रेंस को खत्म करने के लिए, सिर्फ़ spaces/{space} का इस्तेमाल किया जा सकता है. ज़्यादा जानकारी के लिए, मौजूदा कॉन्फ़्रेंस खत्म करना लेख पढ़ें.

मीटिंग स्पेस बनाना

मीटिंग स्पेस बनाने के लिए, spaces संसाधन पर create() तरीके का इस्तेमाल करें.

यह तरीका, spaces संसाधन का एक इंस्टेंस दिखाता है. इसमें SpaceConfig ऑब्जेक्ट शामिल होता है, जो मीटिंग स्पेस का कॉन्फ़िगरेशन होता है. इसमें ActiveConference ऑब्जेक्ट भी शामिल होता है. यह मीटिंग स्पेस में मौजूद मौजूदा conferenceRecords संसाधन का लिंक होता है.

यहां दिए गए कोड सैंपल में, मीटिंग स्पेस बनाने का तरीका बताया गया है:

Java

java-meet/samples/snippets/generated/com/google/apps/meet/v2/spacesservice/createspace/AsyncCreateSpace.java
import com.google.api.core.ApiFuture;
import com.google.apps.meet.v2.CreateSpaceRequest;
import com.google.apps.meet.v2.Space;
import com.google.apps.meet.v2.SpacesServiceClient;

public class AsyncCreateSpace {

  public static void main(String[] args) throws Exception {
    asyncCreateSpace();
  }

  public static void asyncCreateSpace() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
      CreateSpaceRequest request =
          CreateSpaceRequest.newBuilder().setSpace(Space.newBuilder().build()).build();
      ApiFuture<Space> future = spacesServiceClient.createSpaceCallable().futureCall(request);
      // Do something.
      Space response = future.get();
    }
  }
}

Node.js

packages/google-apps-meet/samples/generated/v2/spaces_service.create_space.js
/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Space to be created. As of May 2023, the input space can be empty. Later on
 *  the input space can be non-empty when space configuration is introduced.
 */
// const space = {}

// Imports the Meet library
const {SpacesServiceClient} = require('@google-apps/meet').v2;

// Instantiates a client
const meetClient = new SpacesServiceClient();

async function callCreateSpace() {
  // Construct request
  const request = {
  };

  // Run request
  const response = await meetClient.createSpace(request);
  console.log(response);
}

callCreateSpace();

Python

packages/google-apps-meet/samples/generated_samples/meet_v2_generated_spaces_service_create_space_async.py
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.apps import meet_v2


async def sample_create_space():
    # Create a client
    client = meet_v2.SpacesServiceAsyncClient()

    # Initialize request argument(s)
    request = meet_v2.CreateSpaceRequest(
    )

    # Make the request
    response = await client.create_space(request=request)

    # Handle the response
    print(response)

मीटिंग स्पेस के बारे में जानकारी पाना

किसी चालू मीटिंग स्पेस और उसकी सेटिंग के बारे में जानकारी पाने के लिए, name के साथ spaces संसाधन पर, get() तरीके का इस्तेमाल करें. ज़्यादा जानकारी के लिए, Meet किसी मीटिंग स्पेस की पहचान कैसे करता है लेख पढ़ें.

यह तरीका, मीटिंग स्पेस को spaces संसाधन के इंस्टेंस के तौर पर दिखाता है.

यहां दिए गए कोड सैंपल में, मीटिंग स्पेस को वापस पाने का तरीका बताया गया है:

Java

java-meet/samples/snippets/generated/com/google/apps/meet/v2/spacesservice/getspace/AsyncGetSpace.java
import com.google.api.core.ApiFuture;
import com.google.apps.meet.v2.GetSpaceRequest;
import com.google.apps.meet.v2.Space;
import com.google.apps.meet.v2.SpaceName;
import com.google.apps.meet.v2.SpacesServiceClient;

public class AsyncGetSpace {

  public static void main(String[] args) throws Exception {
    asyncGetSpace();
  }

  public static void asyncGetSpace() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
      GetSpaceRequest request =
          GetSpaceRequest.newBuilder().setName(SpaceName.of("[SPACE]").toString()).build();
      ApiFuture<Space> future = spacesServiceClient.getSpaceCallable().futureCall(request);
      // Do something.
      Space response = future.get();
    }
  }
}

Node.js

packages/google-apps-meet/samples/generated/v2/spaces_service.get_space.js
/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. Resource name of the space.
 *  Format: `spaces/{space}` or `spaces/{meetingCode}`.
 *  `{space}` is the resource identifier for the space. It's a unique,
 *  server-generated ID and is case sensitive. For example, `jQCFfuBOdN5z`.
 *  `{meetingCode}` is an alias for the space. It's a typeable, unique
 *  character string and is non-case sensitive. For example, `abc-mnop-xyz`.
 *  The maximum length is 128 characters.
 *  A `meetingCode` shouldn't be stored long term as it can become
 *  dissociated from a meeting space and can be reused for different meeting
 *  spaces in the future. Generally, a `meetingCode` expires 365 days after
 *  last use. For more information, see Learn about meeting codes in Google
 *  Meet (https://support.google.com/meet/answer/10710509).
 *  For more information, see How Meet identifies a meeting
 *  space (https://developers.google.com/meet/api/guides/meeting-spaces#identify-meeting-space).
 */
// const name = 'abc123'

// Imports the Meet library
const {SpacesServiceClient} = require('@google-apps/meet').v2;

// Instantiates a client
const meetClient = new SpacesServiceClient();

async function callGetSpace() {
  // Construct request
  const request = {
    name,
  };

  // Run request
  const response = await meetClient.getSpace(request);
  console.log(response);
}

callGetSpace();

Python

packages/google-apps-meet/samples/generated_samples/meet_v2_generated_spaces_service_get_space_async.py
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.apps import meet_v2


async def sample_get_space():
    # Create a client
    client = meet_v2.SpacesServiceAsyncClient()

    # Initialize request argument(s)
    request = meet_v2.GetSpaceRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_space(request=request)

    # Handle the response
    print(response)

मीटिंग स्पेस के लिए, स्पेस के नाम की वैल्यू को सर्वर से जनरेट किए गए यूनीक आईडी से बदलें.

मीटिंग स्पेस की जानकारी अपडेट करना

मीटिंग स्पेस की जानकारी अपडेट करने के लिए, name के साथ spaces संसाधन पर patch() तरीके का इस्तेमाल करें. ज़्यादा जानकारी के लिए, Meet किसी मीटिंग स्पेस की पहचान कैसे करता है लेख पढ़ें.

patch() का तरीका, वैकल्पिक updateMask क्वेरी पैरामीटर भी लेता है. फ़ील्ड का टाइप FieldMask है. यह उन फ़ील्ड की सूची है जिन्हें आपको स्पेस में अपडेट करना है. इन फ़ील्ड को कॉमा लगाकर अलग किया गया है.

यह तरीका, मीटिंग स्पेस को spaces संसाधन के इंस्टेंस के तौर पर दिखाता है.

नीचे दिए गए कोड सैंपल में, मीटिंग स्पेस को अपडेट करने का तरीका बताया गया है:

Java

java-meet/samples/snippets/generated/com/google/apps/meet/v2/spacesservice/updatespace/AsyncUpdateSpace.java
import com.google.api.core.ApiFuture;
import com.google.apps.meet.v2.Space;
import com.google.apps.meet.v2.SpacesServiceClient;
import com.google.apps.meet.v2.UpdateSpaceRequest;
import com.google.protobuf.FieldMask;

public class AsyncUpdateSpace {

  public static void main(String[] args) throws Exception {
    asyncUpdateSpace();
  }

  public static void asyncUpdateSpace() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
      UpdateSpaceRequest request =
          UpdateSpaceRequest.newBuilder()
              .setSpace(Space.newBuilder().build())
              .setUpdateMask(FieldMask.newBuilder().build())
              .build();
      ApiFuture<Space> future = spacesServiceClient.updateSpaceCallable().futureCall(request);
      // Do something.
      Space response = future.get();
    }
  }
}

Node.js

packages/google-apps-meet/samples/generated/v2/spaces_service.update_space.js
/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. Space to be updated.
 */
// const space = {}
/**
 *  Optional. Field mask used to specify the fields to be updated in the space.
 *  If update_mask isn't provided(not set, set with empty paths, or only has ""
 *  as paths), it defaults to update all fields provided with values in the
 *  request.
 *  Using "*" as update_mask will update all fields, including deleting fields
 *  not set in the request.
 */
// const updateMask = {}

// Imports the Meet library
const {SpacesServiceClient} = require('@google-apps/meet').v2;

// Instantiates a client
const meetClient = new SpacesServiceClient();

async function callUpdateSpace() {
  // Construct request
  const request = {
    space,
  };

  // Run request
  const response = await meetClient.updateSpace(request);
  console.log(response);
}

callUpdateSpace();

Python

packages/google-apps-meet/samples/generated_samples/meet_v2_generated_spaces_service_update_space_async.py
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.apps import meet_v2


async def sample_update_space():
    # Create a client
    client = meet_v2.SpacesServiceAsyncClient()

    # Initialize request argument(s)
    request = meet_v2.UpdateSpaceRequest(
    )

    # Make the request
    response = await client.update_space(request=request)

    # Handle the response
    print(response)

मीटिंग स्पेस के लिए, स्पेस के नाम की वैल्यू को सर्वर से जनरेट किए गए यूनीक आईडी से बदलें.

चालू कॉन्फ़्रेंस खत्म करना

अगर मीटिंग स्पेस में कोई कॉन्फ़्रेंस चल रहा है, तो उसे खत्म करने के लिए spaces संसाधन पर, endActiveConference() वाला तरीका अपनाएं. अनुरोध और जवाब, दोनों के मुख्य हिस्से खाली हैं. ज़्यादा जानकारी के लिए, Meet, मीटिंग स्पेस की पहचान कैसे करता है लेख पढ़ें.

यहां दिए गए कोड सैंपल में, किसी चालू कॉन्फ़्रेंस को खत्म करने का तरीका बताया गया है:

Java

java-meet/samples/snippets/generated/com/google/apps/meet/v2/spacesservice/endactiveconference/AsyncEndActiveConference.java
import com.google.api.core.ApiFuture;
import com.google.apps.meet.v2.EndActiveConferenceRequest;
import com.google.apps.meet.v2.SpaceName;
import com.google.apps.meet.v2.SpacesServiceClient;
import com.google.protobuf.Empty;

public class AsyncEndActiveConference {

  public static void main(String[] args) throws Exception {
    asyncEndActiveConference();
  }

  public static void asyncEndActiveConference() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (SpacesServiceClient spacesServiceClient = SpacesServiceClient.create()) {
      EndActiveConferenceRequest request =
          EndActiveConferenceRequest.newBuilder()
              .setName(SpaceName.of("[SPACE]").toString())
              .build();
      ApiFuture<Empty> future =
          spacesServiceClient.endActiveConferenceCallable().futureCall(request);
      // Do something.
      future.get();
    }
  }
}

Node.js

packages/google-apps-meet/samples/generated/v2/spaces_service.end_active_conference.js
/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. Resource name of the space.
 *  Format: `spaces/{space}`.
 *  `{space}` is the resource identifier for the space. It's a unique,
 *  server-generated ID and is case sensitive. For example, `jQCFfuBOdN5z`.
 *  For more information, see How Meet identifies a meeting
 *  space (https://developers.google.com/meet/api/guides/meeting-spaces#identify-meeting-space).
 */
// const name = 'abc123'

// Imports the Meet library
const {SpacesServiceClient} = require('@google-apps/meet').v2;

// Instantiates a client
const meetClient = new SpacesServiceClient();

async function callEndActiveConference() {
  // Construct request
  const request = {
    name,
  };

  // Run request
  const response = await meetClient.endActiveConference(request);
  console.log(response);
}

callEndActiveConference();

Python

packages/google-apps-meet/samples/generated_samples/meet_v2_generated_spaces_service_end_active_conference_async.py
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.apps import meet_v2


async def sample_end_active_conference():
    # Create a client
    client = meet_v2.SpacesServiceAsyncClient()

    # Initialize request argument(s)
    request = meet_v2.EndActiveConferenceRequest(
        name="name_value",
    )

    # Make the request
    await client.end_active_conference(request=request)

मीटिंग स्पेस के लिए, स्पेस के नाम की वैल्यू को सर्वर से जनरेट किए गए यूनीक आईडी से बदलें.