Skip to content

Latest commit

 

History

History
486 lines (359 loc) · 19.1 KB

File metadata and controls

486 lines (359 loc) · 19.1 KB

GmbMediaApi

All URIs are relative to https://zernio.com/api

Method HTTP request Description
createGoogleBusinessMedia POST /v1/accounts/{accountId}/gmb-media Upload photo
createGoogleBusinessMediaWithHttpInfo POST /v1/accounts/{accountId}/gmb-media Upload photo
deleteGoogleBusinessMedia DELETE /v1/accounts/{accountId}/gmb-media Delete photo
deleteGoogleBusinessMediaWithHttpInfo DELETE /v1/accounts/{accountId}/gmb-media Delete photo
listGoogleBusinessMedia GET /v1/accounts/{accountId}/gmb-media List media
listGoogleBusinessMediaWithHttpInfo GET /v1/accounts/{accountId}/gmb-media List media

createGoogleBusinessMedia

CreateGoogleBusinessMedia200Response createGoogleBusinessMedia(accountId, createGoogleBusinessMediaRequest, locationId)

Upload photo

Creates a media item (photo) for a location from a publicly accessible URL. Categories determine where the photo appears: COVER, PROFILE, LOGO, EXTERIOR, INTERIOR, FOOD_AND_DRINK, MENU, PRODUCT, TEAMS, ADDITIONAL.

Example

// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.GmbMediaApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://zernio.com/api");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        GmbMediaApi apiInstance = new GmbMediaApi(defaultClient);
        String accountId = "accountId_example"; // String | 
        CreateGoogleBusinessMediaRequest createGoogleBusinessMediaRequest = new CreateGoogleBusinessMediaRequest(); // CreateGoogleBusinessMediaRequest | 
        String locationId = "locationId_example"; // String | Override which location to target. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs.
        try {
            CreateGoogleBusinessMedia200Response result = apiInstance.createGoogleBusinessMedia(accountId, createGoogleBusinessMediaRequest, locationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GmbMediaApi#createGoogleBusinessMedia");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
accountId String
createGoogleBusinessMediaRequest CreateGoogleBusinessMediaRequest
locationId String Override which location to target. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs. [optional]

Return type

CreateGoogleBusinessMedia200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Media created successfully -
400 Invalid request or unsupported media format -
401 Unauthorized -

createGoogleBusinessMediaWithHttpInfo

ApiResponse createGoogleBusinessMedia createGoogleBusinessMediaWithHttpInfo(accountId, createGoogleBusinessMediaRequest, locationId)

Upload photo

Creates a media item (photo) for a location from a publicly accessible URL. Categories determine where the photo appears: COVER, PROFILE, LOGO, EXTERIOR, INTERIOR, FOOD_AND_DRINK, MENU, PRODUCT, TEAMS, ADDITIONAL.

Example

// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.ApiResponse;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.GmbMediaApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://zernio.com/api");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        GmbMediaApi apiInstance = new GmbMediaApi(defaultClient);
        String accountId = "accountId_example"; // String | 
        CreateGoogleBusinessMediaRequest createGoogleBusinessMediaRequest = new CreateGoogleBusinessMediaRequest(); // CreateGoogleBusinessMediaRequest | 
        String locationId = "locationId_example"; // String | Override which location to target. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs.
        try {
            ApiResponse<CreateGoogleBusinessMedia200Response> response = apiInstance.createGoogleBusinessMediaWithHttpInfo(accountId, createGoogleBusinessMediaRequest, locationId);
            System.out.println("Status code: " + response.getStatusCode());
            System.out.println("Response headers: " + response.getHeaders());
            System.out.println("Response body: " + response.getData());
        } catch (ApiException e) {
            System.err.println("Exception when calling GmbMediaApi#createGoogleBusinessMedia");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Response headers: " + e.getResponseHeaders());
            System.err.println("Reason: " + e.getResponseBody());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
accountId String
createGoogleBusinessMediaRequest CreateGoogleBusinessMediaRequest
locationId String Override which location to target. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs. [optional]

Return type

ApiResponse<CreateGoogleBusinessMedia200Response>

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Media created successfully -
400 Invalid request or unsupported media format -
401 Unauthorized -

deleteGoogleBusinessMedia

DeleteGoogleBusinessMedia200Response deleteGoogleBusinessMedia(accountId, mediaId, locationId)

Delete photo

Deletes a photo or media item from a GBP location.

Example

// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.GmbMediaApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://zernio.com/api");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        GmbMediaApi apiInstance = new GmbMediaApi(defaultClient);
        String accountId = "accountId_example"; // String | 
        String mediaId = "mediaId_example"; // String | The media item ID to delete
        String locationId = "locationId_example"; // String | Override which location to target. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs.
        try {
            DeleteGoogleBusinessMedia200Response result = apiInstance.deleteGoogleBusinessMedia(accountId, mediaId, locationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GmbMediaApi#deleteGoogleBusinessMedia");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
accountId String
mediaId String The media item ID to delete
locationId String Override which location to target. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs. [optional]

Return type

DeleteGoogleBusinessMedia200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Media deleted successfully -
400 Invalid request -
401 Unauthorized -

deleteGoogleBusinessMediaWithHttpInfo

ApiResponse deleteGoogleBusinessMedia deleteGoogleBusinessMediaWithHttpInfo(accountId, mediaId, locationId)

Delete photo

Deletes a photo or media item from a GBP location.

Example

// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.ApiResponse;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.GmbMediaApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://zernio.com/api");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        GmbMediaApi apiInstance = new GmbMediaApi(defaultClient);
        String accountId = "accountId_example"; // String | 
        String mediaId = "mediaId_example"; // String | The media item ID to delete
        String locationId = "locationId_example"; // String | Override which location to target. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs.
        try {
            ApiResponse<DeleteGoogleBusinessMedia200Response> response = apiInstance.deleteGoogleBusinessMediaWithHttpInfo(accountId, mediaId, locationId);
            System.out.println("Status code: " + response.getStatusCode());
            System.out.println("Response headers: " + response.getHeaders());
            System.out.println("Response body: " + response.getData());
        } catch (ApiException e) {
            System.err.println("Exception when calling GmbMediaApi#deleteGoogleBusinessMedia");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Response headers: " + e.getResponseHeaders());
            System.err.println("Reason: " + e.getResponseBody());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
accountId String
mediaId String The media item ID to delete
locationId String Override which location to target. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs. [optional]

Return type

ApiResponse<DeleteGoogleBusinessMedia200Response>

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Media deleted successfully -
400 Invalid request -
401 Unauthorized -

listGoogleBusinessMedia

ListGoogleBusinessMedia200Response listGoogleBusinessMedia(accountId, locationId, pageSize, pageToken)

List media

Lists media items (photos) for a Google Business Profile location. Returns photo URLs, descriptions, categories, and metadata.

Example

// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.GmbMediaApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://zernio.com/api");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        GmbMediaApi apiInstance = new GmbMediaApi(defaultClient);
        String accountId = "accountId_example"; // String | 
        String locationId = "locationId_example"; // String | Override which location to query. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs.
        Integer pageSize = 100; // Integer | Number of items to return (max 100)
        String pageToken = "pageToken_example"; // String | Pagination token from previous response
        try {
            ListGoogleBusinessMedia200Response result = apiInstance.listGoogleBusinessMedia(accountId, locationId, pageSize, pageToken);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GmbMediaApi#listGoogleBusinessMedia");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
accountId String
locationId String Override which location to query. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs. [optional]
pageSize Integer Number of items to return (max 100) [optional] [default to 100]
pageToken String Pagination token from previous response [optional]

Return type

ListGoogleBusinessMedia200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Media items fetched successfully -
400 Invalid request -
401 Unauthorized -

listGoogleBusinessMediaWithHttpInfo

ApiResponse listGoogleBusinessMedia listGoogleBusinessMediaWithHttpInfo(accountId, locationId, pageSize, pageToken)

List media

Lists media items (photos) for a Google Business Profile location. Returns photo URLs, descriptions, categories, and metadata.

Example

// Import classes:
import dev.zernio.ApiClient;
import dev.zernio.ApiException;
import dev.zernio.ApiResponse;
import dev.zernio.Configuration;
import dev.zernio.auth.*;
import dev.zernio.models.*;
import dev.zernio.api.GmbMediaApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://zernio.com/api");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        GmbMediaApi apiInstance = new GmbMediaApi(defaultClient);
        String accountId = "accountId_example"; // String | 
        String locationId = "locationId_example"; // String | Override which location to query. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs.
        Integer pageSize = 100; // Integer | Number of items to return (max 100)
        String pageToken = "pageToken_example"; // String | Pagination token from previous response
        try {
            ApiResponse<ListGoogleBusinessMedia200Response> response = apiInstance.listGoogleBusinessMediaWithHttpInfo(accountId, locationId, pageSize, pageToken);
            System.out.println("Status code: " + response.getStatusCode());
            System.out.println("Response headers: " + response.getHeaders());
            System.out.println("Response body: " + response.getData());
        } catch (ApiException e) {
            System.err.println("Exception when calling GmbMediaApi#listGoogleBusinessMedia");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Response headers: " + e.getResponseHeaders());
            System.err.println("Reason: " + e.getResponseBody());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
accountId String
locationId String Override which location to query. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs. [optional]
pageSize Integer Number of items to return (max 100) [optional] [default to 100]
pageToken String Pagination token from previous response [optional]

Return type

ApiResponse<ListGoogleBusinessMedia200Response>

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Media items fetched successfully -
400 Invalid request -
401 Unauthorized -