@@ -58,9 +58,9 @@ def ios_app(app_id, app=None):
58
58
app: An App instance (optional).
59
59
60
60
Returns:
61
- IosApp : An ``IosApp `` instance.
61
+ IOSApp : An ``IOSApp `` instance.
62
62
"""
63
- return IosApp (app_id = app_id , service = _get_project_management_service (app ))
63
+ return IOSApp (app_id = app_id , service = _get_project_management_service (app ))
64
64
65
65
66
66
def list_android_apps (app = None ):
@@ -83,7 +83,7 @@ def list_ios_apps(app=None):
83
83
app: An App instance (optional).
84
84
85
85
Returns:
86
- list: a list of ``IosApp `` instances referring to each iOS app in the Firebase project.
86
+ list: a list of ``IOSApp `` instances referring to each iOS app in the Firebase project.
87
87
"""
88
88
return _get_project_management_service (app ).list_ios_apps ()
89
89
@@ -111,7 +111,7 @@ def create_ios_app(bundle_id, display_name=None, app=None):
111
111
app: An App instance (optional).
112
112
113
113
Returns:
114
- IosApp : An ``IosApp `` instance that is a reference to the newly created app.
114
+ IOSApp : An ``IOSApp `` instance that is a reference to the newly created app.
115
115
"""
116
116
return _get_project_management_service (app ).create_ios_app (bundle_id , display_name )
117
117
@@ -199,7 +199,7 @@ def get_sha_certificates(self):
199
199
"""Retrieves the entire list of SHA certificates associated with this Android app.
200
200
201
201
Returns:
202
- list: A list of ``ShaCertificate `` instances.
202
+ list: A list of ``SHACertificate `` instances.
203
203
204
204
Raises:
205
205
FirebaseError: If an error occurs while communicating with the Firebase Project
@@ -238,7 +238,7 @@ def delete_sha_certificate(self, certificate_to_delete):
238
238
return self ._service .delete_sha_certificate (certificate_to_delete )
239
239
240
240
241
- class IosApp (object ):
241
+ class IOSApp (object ):
242
242
"""A reference to an iOS app within a Firebase project.
243
243
244
244
Note: Unless otherwise specified, all methods defined in this class make an RPC.
@@ -266,7 +266,7 @@ def get_metadata(self):
266
266
"""Retrieves detailed information about this iOS app.
267
267
268
268
Returns:
269
- IosAppMetadata : An ``IosAppMetadata `` instance.
269
+ IOSAppMetadata : An ``IOSAppMetadata `` instance.
270
270
271
271
Raises:
272
272
FirebaseError: If an error occurs while communicating with the Firebase Project
@@ -359,12 +359,12 @@ def __hash__(self):
359
359
(self ._name , self .app_id , self .display_name , self .project_id , self .package_name ))
360
360
361
361
362
- class IosAppMetadata (_AppMetadata ):
362
+ class IOSAppMetadata (_AppMetadata ):
363
363
"""iOS-specific information about an iOS Firebase app."""
364
364
365
365
def __init__ (self , bundle_id , name , app_id , display_name , project_id ):
366
366
"""Clients should not instantiate this class directly."""
367
- super (IosAppMetadata , self ).__init__ (name , app_id , display_name , project_id )
367
+ super (IOSAppMetadata , self ).__init__ (name , app_id , display_name , project_id )
368
368
self ._bundle_id = _check_is_nonempty_string (bundle_id , 'bundle_id' )
369
369
370
370
@property
@@ -373,7 +373,7 @@ def bundle_id(self):
373
373
return self ._bundle_id
374
374
375
375
def __eq__ (self , other ):
376
- return super (IosAppMetadata , self ).__eq__ (other ) and self .bundle_id == other .bundle_id
376
+ return super (IOSAppMetadata , self ).__eq__ (other ) and self .bundle_id == other .bundle_id
377
377
378
378
def __ne__ (self , other ):
379
379
return not self .__eq__ (other )
@@ -382,7 +382,7 @@ def __hash__(self):
382
382
return hash ((self ._name , self .app_id , self .display_name , self .project_id , self .bundle_id ))
383
383
384
384
385
- class ShaCertificate (object ):
385
+ class SHACertificate (object ):
386
386
"""Represents a SHA-1 or SHA-256 certificate associated with an Android app."""
387
387
388
388
SHA_1 = 'SHA_1'
@@ -392,7 +392,7 @@ class ShaCertificate(object):
392
392
_SHA_256_RE = re .compile ('^[0-9A-Fa-f]{64}$' )
393
393
394
394
def __init__ (self , sha_hash , name = None ):
395
- """Creates a new ShaCertificate instance.
395
+ """Creates a new SHACertificate instance.
396
396
397
397
Args:
398
398
sha_hash: A string; the certificate hash for the Android app.
@@ -407,10 +407,10 @@ def __init__(self, sha_hash, name=None):
407
407
_check_is_nonempty_string_or_none (name , 'name' )
408
408
self ._name = name
409
409
self ._sha_hash = sha_hash .lower ()
410
- if ShaCertificate ._SHA_1_RE .match (sha_hash ):
411
- self ._cert_type = ShaCertificate .SHA_1
412
- elif ShaCertificate ._SHA_256_RE .match (sha_hash ):
413
- self ._cert_type = ShaCertificate .SHA_256
410
+ if SHACertificate ._SHA_1_RE .match (sha_hash ):
411
+ self ._cert_type = SHACertificate .SHA_1
412
+ elif SHACertificate ._SHA_256_RE .match (sha_hash ):
413
+ self ._cert_type = SHACertificate .SHA_256
414
414
else :
415
415
raise ValueError (
416
416
'The supplied certificate hash is neither a valid SHA-1 nor SHA_256 hash.' )
@@ -444,7 +444,7 @@ def cert_type(self):
444
444
return self ._cert_type
445
445
446
446
def __eq__ (self , other ):
447
- if not isinstance (other , ShaCertificate ):
447
+ if not isinstance (other , SHACertificate ):
448
448
return False
449
449
return (self .name == other .name and self .sha_hash == other .sha_hash and
450
450
self .cert_type == other .cert_type )
@@ -496,7 +496,7 @@ def get_ios_app_metadata(self, app_id):
496
496
return self ._get_app_metadata (
497
497
platform_resource_name = _ProjectManagementService .IOS_APPS_RESOURCE_NAME ,
498
498
identifier_name = _ProjectManagementService .IOS_APP_IDENTIFIER_NAME ,
499
- metadata_class = IosAppMetadata ,
499
+ metadata_class = IOSAppMetadata ,
500
500
app_id = app_id )
501
501
502
502
def _get_app_metadata (self , platform_resource_name , identifier_name , metadata_class , app_id ):
@@ -538,7 +538,7 @@ def list_android_apps(self):
538
538
def list_ios_apps (self ):
539
539
return self ._list_apps (
540
540
platform_resource_name = _ProjectManagementService .IOS_APPS_RESOURCE_NAME ,
541
- app_class = IosApp )
541
+ app_class = IOSApp )
542
542
543
543
def _list_apps (self , platform_resource_name , app_class ):
544
544
"""Lists all the Android or iOS apps within the Firebase project."""
@@ -579,7 +579,7 @@ def create_ios_app(self, bundle_id, display_name=None):
579
579
identifier_name = _ProjectManagementService .IOS_APP_IDENTIFIER_NAME ,
580
580
identifier = bundle_id ,
581
581
display_name = display_name ,
582
- app_class = IosApp )
582
+ app_class = IOSApp )
583
583
584
584
def _create_app (
585
585
self ,
@@ -639,7 +639,7 @@ def get_sha_certificates(self, app_id):
639
639
path = '/v1beta1/projects/-/androidApps/{0}/sha' .format (app_id )
640
640
response = self ._make_request ('get' , path )
641
641
cert_list = response .get ('certificates' ) or []
642
- return [ShaCertificate (sha_hash = cert ['shaHash' ], name = cert ['name' ]) for cert in cert_list ]
642
+ return [SHACertificate (sha_hash = cert ['shaHash' ], name = cert ['name' ]) for cert in cert_list ]
643
643
644
644
def add_sha_certificate (self , app_id , certificate_to_add ):
645
645
path = '/v1beta1/projects/-/androidApps/{0}/sha' .format (app_id )
0 commit comments