Skip to content

Instantly share code, notes, and snippets.

@DerekHawkins
Last active February 23, 2022 03:32
Show Gist options
  • Save DerekHawkins/967c5d6f67e0e4810c5b7565428ccdbb to your computer and use it in GitHub Desktop.
Save DerekHawkins/967c5d6f67e0e4810c5b7565428ccdbb to your computer and use it in GitHub Desktop.
from time import sleep
client = hubspot.Client.create(api_key="hubspot_api_key")
for i, s in tqdm(zip(main['id'], main['Schema'])):
blog_post = BlogPost(id=i, head_html=s)
try:
api_response = client.cms.blogs.blog_posts.blog_post_api.update(object_id=i,
blog_post=blog_post)
pprint(api_response)
except ApiException as e:
print("Exception when calling blog_posts_api->update: %s\n" % e)
sleep(.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment