11#!/usr/bin/env python
2- """Verify the Cisco Spark APIs are accessible and responding.
2+ """Verify the Cisco Webex APIs are accessible and responding.
33
44Verify that user's provide SPARK_ACCESS_TOKEN is valid and that calls to the
5- Cisco Spark APIs complete successfully.
5+ Cisco Webex (formerly Spark) APIs complete successfully. Uses SPARK_
6+ for variable names; the product name is Cisco Webex.
67
78
8- Copyright (c) 2018 Cisco and/or its affiliates.
9+ Copyright (c) 2018-21 Cisco and/or its affiliates.
910
1011Permission is hereby granted, free of charge, to any person obtaining a copy
1112of this software and associated documentation files (the "Software"), to deal
4849
4950
5051def verify () -> bool :
51- """Verify access to the Cisco Spark APIs."""
52- print ("==> Verifying access to the Cisco Spark APIs" )
52+ """Verify access to the Cisco Webex APIs."""
53+ print ("==> Verifying access to the Cisco Webex APIs" )
5354
54- # Check to ensure the user has provided their Spark Access Token
55+ # Check to ensure the user has provided their Webex Access Token
5556 if not env_user .SPARK_ACCESS_TOKEN :
5657 print (
5758 "\n FAILED: You must provide your SPARK_ACCESS_TOKEN in the "
@@ -63,35 +64,35 @@ def verify() -> bool:
6364 access_token = env_user .SPARK_ACCESS_TOKEN
6465 )
6566
66- # Verify the Cisco Spark APIs are accessible and responding
67+ # Verify the Cisco Webex APIs are accessible and responding
6768 try :
6869 me = spark .people .me ()
6970 except ciscosparkapi .SparkApiError as e :
7071 print (
71- "\n FAILED: The API call to Cisco Spark returned the following "
72+ "\n FAILED: The API call to Cisco Webex returned the following "
7273 "error:\n {}\n " .format (e )
7374 )
7475 return False
7576
7677 else :
7778 print (
78- "\n You are connected to Cisco Spark as: {}\n " .format (me .emails [0 ])
79+ "\n You are connected to Cisco Webex (formerly Cisco Spark) as: {}\n " .format (me .emails [0 ])
7980 )
8081
81- # Check to ensure the user has provided a Spark Room ID
82+ # Check to ensure the user has provided a Webex Room ID
8283 if not env_user .SPARK_ROOM_ID :
8384 print (
8485 "\n FAILED: You must provide the SPARK_ROOM_ID of the room you "
8586 "want to work with in the env_user.py file.\n "
8687 )
8788 return False
8889
89- # Verify the Spark Room exists and is accessible via the access token
90+ # Verify the Webex Room exists and is accessible via the access token
9091 try :
9192 room = spark .rooms .get (env_user .SPARK_ROOM_ID )
9293 except ciscosparkapi .SparkApiError as e :
9394 print (
94- "\n FAILED: There was an error accessing the Spark Room using the "
95+ "\n FAILED: There was an error accessing the Webex Room using the "
9596 "SPARK_ROOM_ID you provided; error details:\n {}\n " .format (e )
9697 )
9798 return False
0 commit comments