Updating a Google Site Listpage/Listitem


Here is a quick and dirty (by fully functional) sample of updating a listpage/listitem in Google Sites using the Data API.

#!/usr/bin/python

import getpass
import gdata.sites.client
import gdata.sites.data

USER = 'test@example.com'
SITE = 'YOUR_SITE_NAME'
DOMAIN = 'YOUR_DOMAIN'  # or 'site' if you're not using a Google Apps domain.

# Setup our client.
client = gdata.sites.client.SitesClient(source='google-SitesListeItemUpdateTest', site=SITE, domain=DOMAIN)
client.ClientLogin(USER, getpass.getpass(), client.source)
client.ssl = True
client.http_client.debug = False

# Only fetch listpages.
feed = client.GetContentFeed(uri=client.MakeContentFeedUri() + '?kind=listpage')

# Work with first listpage we found.
lp = feed.GetListPages()[0]

print 'Listpage columns:'
for col in lp.data.column:
  print 'index: %s, name: %s' % (col.index, col.name)

# Query the listpage's listems and work with first row found.
li = client.GetContentFeed(uri=lp.feed_link.href).entry[0]

print 'Row contents:'
for field in li.field:
  print 'index: %s, name: %s, value: %s' % (field.index, field.name, field.text)

# Update the first fields/column's value.
li.field[0].text = 'Someone else'
entry = client.Update(li)

# Update the listpage's column heading.
#lp.data.column[0].name = 'New Heading'
#entry2 = client.Update(lp)

30 comments:

Drakimor said...

This is great! Any chance you could include a way to add an entry on top of updating existing ones?

dhaval said...

how do you add a new listitem?

GREEN said...

Very good article, thank you for sharing the best tips.
-(:Please visit 2 my blog:)-

SEO Services said...

Awesome! Good job, keep posting few more like this.

dongsheng said...

Et voici la preuve photographique. Cette sneak peek [ci-dessus] illustre la stratgie d'tre abattu par l'oncle Karl lui-mme, et bien que nous tions secrtement cherche voir miss Dellal apportant ses battues cuirs noirs sur la campagne, shes regardant puissante dame comme porter un gilet blanc et arc dlicate dans leur cheveux tresss. Thunk Whoda ci.


Mais ne vous inquitez pas, le bord marque Alices continue tre en raison de tact pour saisines de eye-liner noir en plus d'une lvre rouge vif. Le modle est perch sur une table de toilette l'intrieur d'un appartement somptueux haussmannien, tout en prsentant un sac main gris matelass avec la collection Sac Hermès Mini Plume.

Nous sommes impatients d'en savoir vraiment ce blog Sac Hermès Shoulder Birkin.

Microsoft Office said...

Outlook 2010 provides you with a world-class experience to maintain your efficiency and keep in touch with personal and business networks. You can use download Outlook 2010, through a rich set of features and custom communication with one or more recipients.

sandesh saini said...

SEO Services Dehradun : We are provide affordable seo,sem,smo,ppc services , web design services and web development services in dehradun india.

kosovohp said...

Girl Xinh | Hot Girl | Cute Girl | Sexy Girl | Hot Girl Asian
Hot Girl | Lexi Belle | Sexy Girl | Cute Girl | Hot Asian Girl | Leah Dizon | Hot Girl Asian | Girl Xinh
socks proxy | socks5 | proxy free |proxy list

uknowme said...

We are provide affordable seo,sem,smo,ppc services , web design services and web development services in dehradun india.
build your own website

hirt motorsports service

epictoon said...

This is a helpful tips. Thanks for sharing the knowledge. cheap wow gold

Shahana Shafiuddin said...

Looks great, should work great too.

Teena Seguin said...

Read all the related Posts:


Software Testing FAQ and Interview Questions and Answers

When to use a Test Automation Tool?

What is a Test Case Template?

What is a Test Scenario Template?

What is the structure of a software test plan?

Beginner's Guide to web testing

What is Manual Testing?

How to avoid missing defect in Software Testing?

Overview of Software Testing Risk Management

What is cloud testing - the future of software testing?

What are Entry and Exit Criteria in the Software testing life cycle?

uma jayakumar said...

"Nice blog.. Thanks for sharing this blog information with us…

Web Development Company Chennai

Alex Gold said...

Thanks for a very helpful postYoutube Technical Support

Đào Quân said...

dich vu lam bao cao tai chinh tai my dinh
dich vu lam bao cao tai chinh tai hai ba trung
dich vu lam bao cao tai chinh tai ba dinh
dich vu lam bao cao tai chinh tai thanh tri
dich vu lam bao cao tai chinh tai hoang mai
dich vu lam bao cao tai chinh tai tay ho
dich vu lam bao cao tai chinh tai dong da
==========
dich vu ke toan thue tai dong da
dich vu ke toan thue tai tay ho
dich vu ke toan thue tai bac ninh
dich vu ke toan thue tai hai ba trung
dich vu ke toan thue tai tu liem
dich vu ke toan thue tai hoang mai
dich vu ke toan thue tai ba dinh
dich vu ke toan thue tai thanh tri
dich vu ke toan thue tai thai binh
cong ty lam dich vu ke toan tai vinh phuc
cong ty dich lam vu ke toan tai hung yen
cong ty dich lam vu ke toan tai phu tho
cong ty lam dich vu ke toan tai hai duong
cong ty lam dich vu ke toan tai hai phong
cong ty lam dich vu ke toan tai bac ninh
dich vu ke toan tai vinh phuc
dich vu ke toan tai hung yen
dich vu ke toan tai hai duong

Đào Quân said...

dich vu ke toan tai tay ho
dich vu ke toan tai ba đinh
dich vu ke toan tai hoang mai
dich vu ke toan tai thanh tri
dich vu ke toan tai dong da
dich vu ke toan tai tu liem
dich vu ke toan tai ha dong
dich vu ke toan tai long bien
dich vu ke toan tai thanh xuan
dich vu ke toan tai hai phong
dich vu ke toan tai bac ninh
dich vu ke toan tai hai ba trung
dich vu ke toan tai dong anh
dich vu ke toan tai gia lam
dich vu ke toan tai ung hoa
dich vu ke toan tai quoc oai
dich vu ke toan tai son tay
dich vu ke toan tai thanh oai
hoc ke toan tong hop
dich vu ke toan thue tron goi
dich vu bao cao tai chinh
dia chi hoc ke toan tong hop
khoa hoc ke toan tong hop
hoc chung chi ke toan
dich vu ke toan thue tai tphcm
lớp học kế toán tổng hợp
lớp học kế toán thực hành

Đào Quân said...

dia chi hoc ke toan tai cau giay
dia chi hoc ke toan tai ha dong
dia chi hoc ke toan tai bac ninh
trung tam dao tao ke toan tai ha dong
trung tam dao tao ke toan tai cầu giấy
trung tam dao tao ke toan tai thanh xuan
trung tam dao tao ke toan tai tphcm
khóa học kế toán tổng hợp tại hải phòng
khóa học kế toán tổng hợp tại tại bắc ninh
khóa học kế toán tổng hợp tại tphcm
khóa học kế toán tổng hợp tại hà nội
trung tam dao tao ke toan tai quan 3
trung tam dao tao ke toan tai binh duong
trung tam dao tao ke toan tai bac ninh
trung tam dao tao ke toan tai hai phong

Đào Quân said...

dich vu ke toan thue tai quan 12
dich vu ke toan thue tai quan 11
dich vu ke toan thue tai quan 10
dich vu ke toan thue tai quan 9
dich vu ke toan thue tai quan 8
dich vu ke toan thue tai quan 7
dich vu ke toan thue tai quan 6
dich vu ke toan thue tai quan 5
dich vu ke toan thue tai quan 4
dich vu ke toan thue tai quan 3
dich vu ke toan thue tai quan 2
dich vu ke toan thue tai quan 1
dich vu ke toan thue tai quan tan phu
dich vu ke toan thue tai quan binh tan
dich vu ke toan thue tai quan phu nhuan
dich vu ke toan thue tai quan tan binh
dich vu ke toan thue tai quan go vap
dich vu ke toan thue tai quan thu duc
dich vu ke toan thue tai quan binh thanh
dich vu ke toan thue tai huyen can gio
dich vu ke toan thue tai huyen nha be
dich vu ke toan thue tai huyen binh chanh
dich vu ke toan thue tai huyen hoc mon
dich vu ke toan thue tai huyen cu chi
dich vu ke toan thue tai huyen can gio

babay uyut said...

karya
kuherbal
baca selengkapnya
sumber

babay uyut said...

kami tawar
obat
klik disini
sumber
blognya
read more
karya
kuherbal
baca selengkapnya
sumber

alone said...

Bài viết rất hay, thank đã chia sẽ
--------------------------------------------------
Chuyên viên Tư Vấn BĐS DKRS Mai Đình Duy
Click xem chi tiết: Căn hộ dreamhome residence quận Gò Vấp hoặc can ho dreamhome residence quan go vap

Happy Group said...

Diễn Đàn Rao Vặt
Rao Vặt Cấp Platinum
Rao Vặt Cấp Vàng Bạc Đá Quý
Rao vặt Linh Tinh
› Diễn đàn
Địa chỉ hay Địa điểm văn hóa
Địa chỉ hay Ảnh viện, áo cưới
Địa chỉ hay Khu vui chơi, giải trí
Địa chỉ hay Nhà hàng,khách sạn
Địa điểm khác
Bất Động Sản Nhà mặt phố
Bất Động Sản Đất vườn
Bất Động Sản Biệt thự, liền kề
Bất Động Sản Đất nền dự án

phi long said...

Dịch vụ kế toán ACB chuyên cung cấp Dich vu ke toan trọn gói uy tín chuyên nghiêp giá rẻ nhất tại HCM và các tỉnh lân cận với chi phí bỏ ra từ 500.000-1.500.000đ.
Liên hệ: Dịch vụ kế toán , Dich vu ke toan.
Lầu 4, Tòa nhà Long Mã, 602 Cộng Hòa,P.13,Q.Tân Bình,HCM.
Hotline: (08) 62 97 97 97 - 0966 660 888.

Nat Nathalia said...

Thanks
http://rachmadshare.blogspot.com
http://fashionmuslim99.blogspot.com
http://peluangusahasampingan99.blogspot.com
http://sejutadesainrumah.blogspot.com
http://usahasampingan24.blogspot.com/
http://hargamesin24.blogspot.com/
http://bebasjerawatan.blogspot.com
usaha sampingan
peluang usaha sampingan
usaha sampingan modal kecil
usaha sampingan di rumah
usaha sampingan untuk karyawan
macam-macam usaha sampingan
usaha sampingan tanpa modal
jenis usaha sampingan
usaha sampingan ibu rumah tangga
usaha sampingan yang menguntungkan
usaha sampingan karyawan
usaha sampingan mahasiswa
macam usaha sampingan

sixth aly said...

I read few articles on this site and I think that your web blog is real interesting and Power to the People of excellent information.
tank's
www.obatkondiloma.com cara menyembuhkan kutil kelamin

Wijaya Raya said...

Nice informasinya gan? :)

Rosaria Penulis Handal said...

Nice blog :)
Masker Roro Mendut Jerawat Asli
Masker Roro Mendut Untuk Jerawat Murah
Obat Jerawat Roro Mendut Terbaik
Lulur Jerawat Roro Mendut Gratis Ongkir !

Sáng Nguyễn Tiến said...

Very cool! Love reading your blog!
Vid Reaper Review
Vid Reaper Energy
Vid Reaper Bonus
Vid Reaper Review
Vid Reaper Energy
Vid Reaper Bonus
Vid Reaper Review
Vid Reaper Energy
Vid Reaper Bonus
Vid Reaper Review
Vid Reaper Energy
Vid Reaper Bonus

Sáng Nguyễn Tiến said...

I really thank the author of this article, the article has great significance for me, it just leads me to do better things for this life. Very meaningful, thank you very much, wish you happy
Mobimatic Review
Mobimatic App Builder
Mobimatic Bonus
Vid Reaper Bonus
Mobimatic App Builder
Mobimatic Bonus
Vid Reaper Bonus
Mobimatic App Builder
Mobimatic Bonus
Vid Reaper Bonus
Mobimatic App Builder
Mobimatic Bonus
Vid Reaper Bonus
Mobimatic App Builder
Mobimatic Bonus

Sáng Nguyễn Tiến said...

I really thank the author of this article, the article has great significance for me, it just leads me to do better things for this life. Very meaningful, thank you very much, wish you happy
Mobimatic Review
Mobimatic App Builder
Mobimatic Bonus
Mobimatic Review
Mobimatic App Builder
Mobimatic Bonus
Mobimatic Review
Mobimatic App Builder
Mobimatic Bonus
Mobimatic Review
Mobimatic App Builder
Mobimatic Bonus
Mobimatic Review
Mobimatic App Builder
Mobimatic Bonus
Mobimatic Review
Mobimatic App Builder
Mobimatic Bonus