print(
                'No invitations for Account ID "%d" and Client Account Id: "%d"'
                % (account_id, client_account_id))
    except HttpError as e:
        print e


if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Lists invitations sent out '
                                     'for a given client buyer.')
    parser.add_argument('-a',
                        '--account_id',
                        default=DEFAULT_ACCOUNT_ID,
                        type=int,
                        help=('The integer id of the Ad Exchange account.'))
    parser.add_argument('-c',
                        '--client_buyer_id',
                        default=DEFAULT_CLIENT_BUYER_ID,
                        type=int,
                        help=('The integer id of the client buyer.'))
    args = parser.parse_args()

    try:
        service = samples_util.GetService(version='v2beta1')
    except IOError, ex:
        print 'Unable to create adexchangebuyer service - %s' % ex
        print 'Did you specify the key file in samples_util.py?'
        sys.exit()

    main(service, args.account_id, args.client_buyer_id)
Example #2
0
              f'"{client_account_id}"')
        pprint.pprint(users)
    except HttpError as e:
        print(e)


if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Lists the client users for '
                                     'a given client buyer.')
    parser.add_argument(
        '-a',
        '--account_id',
        default=DEFAULT_ACCOUNT_ID,
        type=int,
        help='The integer id of the Authorized Buyers account.')
    parser.add_argument('-c',
                        '--client_buyer_id',
                        default=DEFAULT_CLIENT_BUYER_ID,
                        type=int,
                        help='The integer id of the client buyer.')
    args = parser.parse_args()

    try:
        service = samples_util.GetService('v2beta1')
    except IOError as ex:
        print(f'Unable to create adexchangebuyer service - {ex}')
        print('Did you specify the key file in samples_util.py?')
        sys.exit(1)

    main(service, args.account_id, args.client_buyer_id)
Example #3
0
    parser = argparse.ArgumentParser(description='Updates an existing '
                                     'account.')
    parser.add_argument('-a',
                        '--account_id',
                        required=False,
                        type=int,
                        default=DEFAULT_ACCOUNT_ID,
                        help=('The integer id of the account you\'re '
                              'updating.'))
    parser.add_argument('-c',
                        '--cookie_matching_url',
                        required=False,
                        default=DEFAULT_COOKIE_MATCHING_URL,
                        help=('The base URL used in cookie match requests.'))
    args = parser.parse_args()
    # Create a body containing the fields to be updated.
    # This example only updates the cookieMatchingUrl.
    BODY = {
        'accountId': args.account_id,
        'cookieMatchingUrl': args.cookie_matching_url
    }

    try:
        service = samples_util.GetService()
    except IOError, ex:
        print 'Unable to create adexchangebuyer service - %s' % ex
        print 'Did you specify the key file in samples_util.py?'
        sys.exit()

    main(service, BODY['accountId'], BODY)