Skip to content

Instantly share code, notes, and snippets.

@mineta
Last active August 29, 2015 13:58
Show Gist options
  • Save mineta/10020418 to your computer and use it in GitHub Desktop.
Save mineta/10020418 to your computer and use it in GitHub Desktop.
# Pon aquí el identificador de tu lista
LIST_ID = 000
def get_number_of_contacts_in_list(list_id):
endpoint = "/contacts/v1/lists/" + str(list_id)
url = BASE + endpoint + "?hapikey=" + APIKEY_VALUE
response = urllib2.urlopen(url).read()
list_info = json.loads(response)
return list_info["metaData"]["size"]
print get_number_of_contacts_in_list(LIST_ID)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment