From dcec6bf4b16308b2cfbb45f2f136c053f627548f Mon Sep 17 00:00:00 2001 From: mkonecny Date: Wed, 5 Jan 2011 12:31:49 -0500 Subject: [PATCH] -changed references from campcaster to airtime in pypo/ directory --- build/build.properties | 2 +- docs/README.txt | 6 +++--- pypo/api_clients/api_client.py | 28 +++++++++++++------------- pypo/api_clients/api_client_factory.py | 8 ++++---- pypo/config.cfg | 6 +++--- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/build/build.properties b/build/build.properties index 3e7d17c6b..071fae700 100644 --- a/build/build.properties +++ b/build/build.properties @@ -1,4 +1,4 @@ -project.home = /home/naomiaro/dev-campcaster/campcaster +project.home = /path/to/airtime project.build = ${project.home}/build #Database driver diff --git a/docs/README.txt b/docs/README.txt index 1e3c6df4d..f66f64d0f 100644 --- a/docs/README.txt +++ b/docs/README.txt @@ -14,13 +14,13 @@ Setting Up Your VHOST The following is a sample VHOST you might want to consider for your project. - DocumentRoot "/home/naomiaro/campcaster-refactor/campcaster/public" - ServerName campcaster.local + DocumentRoot "/home/naomiaro/campcaster-refactor/airtime/public" + ServerName airtime.local # This should be omitted in the production environment SetEnv APPLICATION_ENV development - + Options Indexes MultiViews FollowSymLinks AllowOverride All Order allow,deny diff --git a/pypo/api_clients/api_client.py b/pypo/api_clients/api_client.py index 4549b6781..b5b700422 100644 --- a/pypo/api_clients/api_client.py +++ b/pypo/api_clients/api_client.py @@ -20,8 +20,8 @@ from urlparse import urlparse def api_client_factory(config): - if config["api_client"] == "campcaster": - return CampcasterApiClient(config) + if config["api_client"] == "airtime": + return AirTimeApiClient(config) elif config["api_client"] == "obp": return ObpApiClient(config) else: @@ -100,15 +100,15 @@ class ApiClientInterface: # nil ################################################################################ -# Campcaster API Client +# Airtime API Client ################################################################################ -class CampcasterApiClient(ApiClientInterface): +class AirTimeApiClient(ApiClientInterface): def __init__(self, config): self.config = config - def __get_campcaster_version(self, verbose = True): + def __get_airtime_version(self, verbose = True): logger = logging.getLogger() url = self.config["base_url"] + self.config["api_base"] + self.config["version_url"] url = url.replace("%%api_key%%", self.config["api_key"]) @@ -120,7 +120,7 @@ class CampcasterApiClient(ApiClientInterface): logger.debug("Data: %s", data) response_json = json.read(data) version = response_json['version'] - logger.debug("Campcaster Version %s detected", version) + logger.debug("Airtime Version %s detected", version) except Exception, e: try: if e[1] == 401: @@ -137,7 +137,7 @@ class CampcasterApiClient(ApiClientInterface): if e[1] == 404: if (verbose): print '#####################################' - print '# Unable to contact the Campcaster-API' + print '# Unable to contact the Airtime-API' print '# ' + url print '#####################################' return False @@ -145,7 +145,7 @@ class CampcasterApiClient(ApiClientInterface): pass version = 0 - logger.error("Unable to detect Campcaster Version - %s, Response: %s", e, response) + logger.error("Unable to detect Airtime Version - %s, Response: %s", e, response) return version @@ -168,22 +168,22 @@ class CampcasterApiClient(ApiClientInterface): def is_server_compatible(self, verbose = True): - version = self.__get_campcaster_version(verbose) + version = self.__get_airtime_version(verbose) if (version == 0 or version == False): if (verbose): - print 'Unable to get Campcaster version number.' + print 'Unable to get Airtime version number.' print return False elif (version[0:4] != "1.6."): if (verbose): - print 'Campcaster version: ' + str(version) - print 'pypo not compatible with this version of Campcaster.' + print 'Airtime version: ' + str(version) + print 'pypo not compatible with this version of Airtime.' print return False else: if (verbose): - print 'Campcaster version: ' + str(version) - print 'pypo is compatible with this version of Campcaster.' + print 'Airtime version: ' + str(version) + print 'pypo is compatible with this version of Airtime.' print return True diff --git a/pypo/api_clients/api_client_factory.py b/pypo/api_clients/api_client_factory.py index 2bc97dc45..4762b0fc7 100644 --- a/pypo/api_clients/api_client_factory.py +++ b/pypo/api_clients/api_client_factory.py @@ -1,9 +1,9 @@ -import campcaster_api_client +import airtime_api_client import obp_api_client def create_api_client(config): - if config["api_client"] == "campcaster": - return campcaster_api_client.CampcasterApiClient(config) + if config["api_client"] == "airtime": + return campcaster_api_client.AirtimeApiClient(config) elif config["api_client"] == "obp": return obp_api_client.ObpApiClient(config) - \ No newline at end of file + diff --git a/pypo/config.cfg b/pypo/config.cfg index 5d012356c..d5b7208bc 100644 --- a/pypo/config.cfg +++ b/pypo/config.cfg @@ -5,9 +5,9 @@ # Set the type of client you are using. # Currently supported types: # 1) "obp" = Open Broadcast Platform -# 2) "campcaster" +# 2) "airtime" # -api_client = "campcaster" +api_client = "airtime" ############################################ # Directories / Hosts # @@ -66,7 +66,7 @@ cue_style = 'pre' ################################################################################ ##################### -# Campcaster Config # +# Airtime Config # ##################### # Value needed to access the API api_key = 'AAA'