#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import getpass

from gdata.contentforshopping.client import ContentForShoppingClient

# Gather merchant information
account_id = raw_input('Merchant Account ID? ').strip()
email = raw_input('Google Email Address? ').strip()

# Create a client
client = ContentForShoppingClient(account_id)

# Perform programmatic login
client.client_login(email, getpass.getpass('Google Password? '),
    'Shopping API for Content sample', 'structuredcontent')

# Get the feed of client accounts
client_account_feed = client.get_client_accounts()

# Display the title and self link for each client account
for client_account in client_account_feed.entry:
  print client_account.title.text, client_account.GetSelfLink().href
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import getpass

from gdata.contentforshopping.data import build_entry
from gdata.contentforshopping.client import ContentForShoppingClient

# Gather merchant information
account_id = raw_input('Merchant Account ID? ').strip()
email = raw_input('Google Email Address? ').strip()

# Create a client
client = ContentForShoppingClient(account_id)

# Perform programmatic login
client.client_login(email, getpass.getpass('Google Password? '),
    'Shopping API for Content sample', 'structuredcontent')

products = []

for color in ['red', 'green', 'white', 'black', 'purple', 'brown', 'yellow',
              'orange', 'magenta']:
  # Generate a product entry
  product_entry = build_entry(
    product_id='ipod%s' % color,
    target_country = 'US',
    content_language = 'EN',
    title='iPod Nano 8GB, %s' % color,
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import getpass

from gdata.contentforshopping.data import build_entry
from gdata.contentforshopping.client import ContentForShoppingClient

# Gather merchant information
account_id = raw_input('Merchant Account ID? ').strip()
email = raw_input('Google Email Address? ').strip()

# Create a client
client = ContentForShoppingClient(account_id)

# Perform programmatic login
client.client_login(email, getpass.getpass('Google Password? '),
                    'Shopping API for Content sample', 'structuredcontent')

products = []

for color in [
        'red', 'green', 'white', 'black', 'purple', 'brown', 'yellow',
        'orange', 'magenta'
]:
    # Generate a product entry
    product_entry = build_entry(
        product_id='ipod%s' % color,
        target_country='US',
Exemple #4
0
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import getpass

from gdata.contentforshopping.client import ContentForShoppingClient

# Gather merchant information
account_id = raw_input('Merchant Account ID? ').strip()
email = raw_input('Google Email Address? ').strip()

# Create a client
client = ContentForShoppingClient(account_id)

# Perform programmatic login
client.client_login(email, getpass.getpass('Google Password? '),
                    'Shopping API for Content sample', 'structuredcontent')

# Get the feed of client accounts
client_account_feed = client.get_client_accounts()

# Display the title and self link for each client account
for client_account in client_account_feed.entry:
    print client_account.title.text, client_account.GetSelfLink().href